DBA Data[Home] [Help]

PACKAGE: APPS.GMDQSVRS_APPROVAL_WF_PKG

Source


1 PACKAGE GMDQSVRS_APPROVAL_WF_PKG AS
2 /* $Header: GMDQSVRS.pls 120.0 2005/05/26 01:02:47 appldev 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 GMDQSVRS_ISAPROVAL_REQUIRED workflow. **
24    ***   This code will execute when Spec Validity Rule Approval Business Event  **
25    ***   is raised. This verfifies whether approval required for this transaction**
26    ***   or not. If approval is required then udated spec status to pending as   **
27    ***   defined 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 GMDQSVRS_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 
46   PROCEDURE APPEND_COMMENTS (
47       p_itemtype      IN VARCHAR2,
48       p_itemkey       IN VARCHAR2,
49       p_actid         IN NUMBER,
50       p_funcmode      IN VARCHAR2,
51       p_resultout     OUT NOCOPY VARCHAR2);
52 
53 /***************************************************************************************
54  *** This procedure is associated with VERIFY_ANY_MORE_APPR activity of the workflow  **
55  *** once current approver approves status change request this procedure call AME API **
56  *** to verify any more approvers need to approve this request. if it needs some more **
57  *** approvals then it sets approver info to workflow attrbute. now workflow moves to **
58  *** next approval processing. this will continue either all approves approves the    **
59  *** request or any one of the rejects. if all approvals are complete then it sets    **
60  *** spec status to target status                                                     **
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 GMDQSVRS_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 Validity Rule status to start status and ends    **
74  *** the workflow approval process.                                                    **
75  ****************************************************************************************/
76 
77   PROCEDURE NO_RESPONSE (
78       p_itemtype      IN VARCHAR2,
79       p_itemkey       IN VARCHAR2,
80       p_actid         IN NUMBER,
81       p_funcmode      IN VARCHAR2,
82       p_resultout     OUT NOCOPY VARCHAR2);
83 
84 /****************************************************************************************
85  *** This procedure is associated with GMDQSVRS_NOTI_REWORK activity of the workflow   **
86  *** When approver rejects status change request procedure sets spec Validity rule     **
87  *** status to rework status and ends the workflow approval process.                   **
88  ****************************************************************************************/
89 
90   PROCEDURE REQ_REJECTED (
91       p_itemtype      IN VARCHAR2,
92       p_itemkey       IN VARCHAR2,
93       p_actid         IN NUMBER,
94       p_funcmode      IN VARCHAR2,
95       p_resultout     OUT NOCOPY VARCHAR2);
96 
97 /****************************************************************************************
98  *** This procedure is associated with GMDQSVRS_NOTI_APPROVED activity of the workflow **
99  *** When approver approves status change request procedure sets AME Approver status   **
100  *** to approved status and continues with approval process to verify any more         **
101  *** approvals required                                                                **
102  ****************************************************************************************/
103 
104   PROCEDURE REQ_APPROVED (
105       p_itemtype      IN VARCHAR2,
106       p_itemkey       IN VARCHAR2,
107       p_actid         IN NUMBER,
108       p_funcmode      IN VARCHAR2,
109       p_resultout     OUT NOCOPY VARCHAR2);
110 
111  /*************************************************************************************
112   *** Following procedure is to verify any reminder is required when workflow timeout**
113   *** occurs                                                                         **
114   *************************************************************************************/
115 
116   PROCEDURE REMINDAR_CHECK (
117       p_itemtype      IN VARCHAR2,
118       p_itemkey       IN VARCHAR2,
119       p_actid         IN NUMBER,
120       p_funcmode      IN VARCHAR2,
121       p_resultout     OUT NOCOPY VARCHAR2);
122 
123  /**************************************************************************************
124   *** Following procedure accepts Status Code and entity type and resolves to Meaning **
125   **************************************************************************************/
126 
127   FUNCTION GET_STATUS_MEANING(P_STATUS_CODE NUMBER,
128                               P_ENTITY_TYPE VARCHAR2) RETURN VARCHAR2;
129 
130  /***********************************************************************************************
131   *** Following procedure is to raise Spec Validity Rule Status change approval business event **
132   ***********************************************************************************************/
133 
134   PROCEDURE RAISE_SPEC_VR_APPR_EVENT(p_SPEC_VR_ID     NUMBER,
135                                   P_EVENT_NAME        VARCHAR2,
136                                   P_TABLE_NAME        VARCHAR2,
137                                   p_START_STATUS      NUMBER,
138                                   p_TARGET_STATUS     NUMBER);
139 
140 END ;