1 PACKAGE GMD_SS_APPROVAL_WF_PKG AUTHID CURRENT_USER AS
2 /* $Header: GMDQMSAS.pls 115.0 2003/04/16 18:50:38 hsaleeb noship $ */
3
4 /*********************************************************************************************************
5 Description from workflow user documentation for common parameters used in this package
6
7 p_itemtype : The internal name for the item type. Item types are defined in the Oracle Workflow Builder.
8 p_itemkey : A string that represents a primary key generated by the workflow-enabled application
9 for the item type. The string uniquely identifies the item within an item type.
10 p_actid : The ID number of the activity from which this procedure is called.
11 p_funcmode : The execution mode of the activity. If the activity is a function activity, the mode is
12 either 'RUN' or 'CANCEL'. If the activity is a notification activity, with a post-notification
13 function, then the mode can be 'RESPOND', 'FORWARD', 'TRANSFER', 'TIMEOUT', or 'RUN'. Other
14 execution modes may be added in the future.
15 p_resultout : If a result type is specified in the Activities properties page for the activity in the
16 Oracle Workflow Builder, this parameter represents the expected result that is returned when
17 the procedure completes. The possible results are:
18
19
20 ************************************************************************************************************/
21
22 /********************************************************************************
23 *** This procedure is associated with GMDQMSAP_ISAPROVAL_REQUIRED workflow. **
24 *** This code will execute when stability Study Status Change Event. **
25 *** This verfifies whether approval required for this transaction or not **
26 *** If approval is required then udated spec status to pending as defined **
27 *** GMD_QC_STATUS_NEXT and populates workflow attributes **
28 ********************************************************************************/
29
30
31 PROCEDURE IS_APPROVAL_REQ (
32 p_itemtype IN VARCHAR2,
33 p_itemkey IN VARCHAR2,
34 p_actid IN NUMBER,
35 p_funcmode IN VARCHAR2,
36 p_resultout OUT NOCOPY VARCHAR2);
37
38 /**************************************************************************************
39 *** This procedure is associated with GMDQMSAP_APP_COMMENT activity of the workflow **
40 *** When user enters comments in response to a notification this procedure appends **
41 *** comments to internal variable so that full history can be shoed in notification **
42 *** body. **
43 **************************************************************************************/
44
45 PROCEDURE APPEND_COMMENTS (
46 p_itemtype IN VARCHAR2,
47 p_itemkey IN VARCHAR2,
48 p_actid IN NUMBER,
49 p_funcmode IN VARCHAR2,
50 p_resultout OUT NOCOPY VARCHAR2);
51
52 /***************************************************************************************
53 *** This procedure is associated with VERIFY_ANY_MORE_APPR activity of the workflow **
54 *** once current approver approves status change request this procedure call AME API **
55 *** to verify any more approvers need to approve this request. if it needs some more **
56 *** approvals then it sets approver info to workflow attrbute. now workflow moves to **
57 *** next approval processing. this will continue either all approves approves the **
58 *** request or any one of the rejects. if all approvals are complete then it sets **
59 *** spec status to target status **
60 ***************************************************************************************/
61
62
63 PROCEDURE ANY_MORE_APPROVERS (
64 p_itemtype IN VARCHAR2,
65 p_itemkey IN VARCHAR2,
66 p_actid IN NUMBER,
67 p_funcmode IN VARCHAR2,
68 p_resultout OUT NOCOPY VARCHAR2);
69
70 /****************************************************************************************
71 *** This procedure is associated with GMDQSPAP_NOTI_NOT_RESP activity of the workflow **
72 *** When approver fails to respond to notification defined in GMD: Workflow timeout **
73 *** profile this procedure sets spec status to start status and ends the workflow **
74 *** approval process. **
75 ****************************************************************************************/
76
77
78 PROCEDURE NO_RESPONSE (
79 p_itemtype IN VARCHAR2,
80 p_itemkey IN VARCHAR2,
81 p_actid IN NUMBER,
82 p_funcmode IN VARCHAR2,
83 p_resultout OUT NOCOPY VARCHAR2);
84
85 /****************************************************************************************
86 *** This procedure is associated with GMDQSPAP_NOTI_REWORK activity of the workflow **
87 *** When approver rejects status change request procedure sets spec status to **
88 *** rework status and ends the workflow approval process. **
89 ****************************************************************************************/
90
91 PROCEDURE REQ_REJECTED (
92 p_itemtype IN VARCHAR2,
93 p_itemkey IN VARCHAR2,
94 p_actid IN NUMBER,
95 p_funcmode IN VARCHAR2,
96 p_resultout OUT NOCOPY VARCHAR2);
97
98 /****************************************************************************************
99 *** This procedure is associated with GMDQSPAP_NOTI_APPROVED activity of the workflow **
100 *** When approver approves status change request procedure sets AME Approver status **
101 *** to approved status and continues with approval process to verify any more **
102 *** approvals required **
103 ****************************************************************************************/
104
105 PROCEDURE REQ_APPROVED (
106 p_itemtype IN VARCHAR2,
107 p_itemkey IN VARCHAR2,
108 p_actid IN NUMBER,
109 p_funcmode IN VARCHAR2,
110 p_resultout OUT NOCOPY VARCHAR2);
111
112 /*************************************************************************************
113 *** Following procedure is to verify any reminder is required when workflow timeout**
114 *** occurs **
115 *************************************************************************************/
116
117 PROCEDURE REMINDAR_CHECK (
118 p_itemtype IN VARCHAR2,
119 p_itemkey IN VARCHAR2,
120 p_actid IN NUMBER,
121 p_funcmode IN VARCHAR2,
122 p_resultout OUT NOCOPY VARCHAR2);
123
124 /**************************************************************************************
125 *** Following procedure accepts Status Code and entity type and resolves to Meaning **
126 **************************************************************************************/
127
128 FUNCTION GET_STATUS_MEANING(P_STATUS_CODE NUMBER,
129 P_ENTITY_TYPE VARCHAR2) RETURN VARCHAR2;
130
131 FUNCTION GET_STATUS_NEXT_MEANING(P_STATUS_CODE NUMBER,
132 P_ENTITY_TYPE VARCHAR2) RETURN VARCHAR2;
133
134 /**************************************************************************************
135 *** Following procedure is to raise Spec approval business event **
136 **************************************************************************************/
137
138 PROCEDURE RAISE_SS_APPR_EVENT(p_SS_ID NUMBER,
139 p_START_STATUS NUMBER,
140 p_TARGET_STATUS NUMBER);
141
142 END;