1 package PAY_ASSG_COST_WF AUTHID CURRENT_USER as
2 /* $Header: pyacoswf.pkh 120.3.12020000.2 2012/07/04 20:18:26 amnaraya ship $ */
3 -- ----------------------------------------------------------------------------
4 -- |--------------------------< CHECK_APPROVERS_EXIST >-----------------------|
5 -- ----------------------------------------------------------------------------
6 -- {Start Of Comments}
7 --
8 -- Description:
9 -- This API creates finds if any approvers exists and populate the out
10 -- parameter accrodingly.
11 --
12 -- Prerequisites:
13 -- The workflow must have started.
14 --
15 -- In Parameters:
16 -- Name Reqd Type Description
17 -- itemtype Yes varchar2 Itemtype of the workflow process.
18 -- itemkey Yes varchar2 Instance of the workflow process.
19 -- actid Yes Number The ID number of the activity that this
20 -- procedure is called from.
21 -- funmode Yes varchar2 Function mode either CANCEL or RUN.
22 --
23 -- Post Success:
24 -- Assign true/false to out parameter depening upon the approvers exists or not.
25 --
26 -- Out Parameters
27 -- resultout Yes varchar2 Either true/false depending on the approvers
28 -- exists or not.
29 -- Post Failure:
30 -- An exception is raised and nothing will be set to out parameter.
31 --
32 -- Access Status:
33 -- Internal Development Use Only.
34 --
35 -- {End Of Comments}
36 --
37 procedure check_approvers_exist(
38 itemtype in varchar2,
39 itemkey in varchar2,
40 actid in number,
41 funcmode in varchar2,
42 resultout out nocopy varchar2);
43
44 -- -------------------------------------------------------------------------
45 -- |-------------------------< GET_NEXT_APPROVER >-------------------------|
46 -- -------------------------------------------------------------------------
47 -- {Start Of Comments}
48 --
49 -- Description:
50 -- Control comes to this procedure once the previous approver approves the
51 -- notification. This function set the previous approver's approval status
52 -- to true and then get the next approver.
53 --
54 -- Prerequisites:
55 -- The workflow must have started.
56 --
57 -- In Parameters:
58 -- Name Reqd Type Description
59 -- itemtype Yes varchar2 Itemtype of the workflow process.
60 -- itemkey Yes varchar2 Instance of the workflow process.
61 -- actid Yes Number The ID number of the activity that this
62 -- procedure is called from.
63 -- funmode Yes varchar2 Function mode either CANCEL or RUN.
64 --
65 --
66 -- Post Success:
67 -- Find out the next approver and send the same to workflow. If no approvers
68 -- are there then notify the workflow that there are no approvers.
69 --
70 -- Out Parameters
71 -- resultout : Set to 'T' if any approver and 'F' if no approver.
72 -- Post Failure:
73 -- An exception is raised.
74 --
75 -- Access Status:
76 -- Internal Development Use Only.
77 --
78 -- {End Of Comments}
79 --
80 procedure get_next_approver
81 (itemtype in varchar2,
82 itemkey in varchar2,
83 actid in number,
84 funcmode in varchar2,
85 resultout out nocopy varchar2);
86 -- ----------------------------------------------------------------------------
87 -- |----------------------------< START_WF_PROCESS >--------------------------|
88 -- ----------------------------------------------------------------------------
89 -- {Start Of Comments}
90 --
91 -- Description:
92 -- This API initialize the Assignment Costing Workflow process.
93 --
94 -- Prerequisites:
95 -- The workflow must have started.
96 --
97 -- In Parameters:
98 -- Name Reqd Type Description
99 -- p_person_id Yes Number Person ID
100 -- p_assignment_id Yes varchar2 Assignment ID
101 -- p_performer_name Yes Number Performer login name who is
102 -- changing costing details.
103 -- p_performer_display_name Yes varchar2 Disply name of the performer.
104 -- p_effective_date Yed Date Effective Date.
105 -- Post Success:
106 -- Initializes the Assignment Costing workflow process.
107 --
108 -- Out Parameters
109 -- N/A
110 -- Post Failure:
111 -- An exception is raised and no workflow starts.
112 --
113 -- Access Status:
114 -- Internal Development Use Only.
115 --
116 -- {End Of Comments}
117 --
118 procedure START_WF_PROCESS ( p_person_id in number
119 ,p_assignment_id in number
120 ,p_item_key in varchar2
121 ,p_performer_login_name in varchar2
122 ,P_PERFORMER_ID in number
123 ,P_EFFECTIVE_DATE in date
124 ,P_CALLED_FROM IN VARCHAR2 DEFAULT NULL
125 );
126 -- ----------------------------------------------------------------------------
127 -- |------------------------------< APPROVE_PROCESS >--------------------------|
128 -- ----------------------------------------------------------------------------
129 -- {Start Of Comments}
130 --
131 -- Description:
132 -- This API delete the transaction, transaction steps
133 -- and transaction values pertaining the item type and item key.
134 --
135 -- Prerequisites:
136 -- The transaction must exist.
137 --
138 -- In Parameters:
139 -- Name Reqd Type Description
140 -- p_item_type Yes varchar2 Identifies Item type
141 -- p_item_key Yes varchar2 Identifies Item key
142 -- p_actid Yes number The ID number of the activity that this procedure is
143 -- called from.
144 -- p_funmode Yes varchar2 The mode of the function activity. Either 'RUN' or 'CANCEL'.
145
146 -- Post Success:
147 -- The data pertaining to item key and item type will be deleted from the
148 -- transaction tables completely.
149 --
150 -- Out Parameters:
151 -- p_result varchar2 Gets 'SUCCESS' if the transaction successfully deleted.
152 -- Post Failure:
153 -- An exception is raised and nothing will be created.
154 --
155 -- Access Status:
156 -- Internal Development Use Only.
157 --
158 -- {End Of Comments}
159 --
160 PROCEDURE APPROVE_PROCESS(
161 itemtype in varchar2
162 ,itemkey in varchar2
163 ,actid in number
164 ,funmode in varchar2
165 ,result out nocopy varchar2);
166 -- ----------------------------------------------------------------------------
167 -- |------------------------------< REJECT_PROCESS >--------------------------|
168 -- ----------------------------------------------------------------------------
169 -- {Start Of Comments}
170 --
171 -- Description:
172 -- This API delete the transaction, transaction steps
173 -- and transaction values pertaining the item type and item key.
174 --
175 -- Prerequisites:
176 -- The transaction must exist.
177 --
178 -- In Parameters:
179 -- Name Reqd Type Description
180 -- p_item_type Yes varchar2 Identifies Item type
181 -- p_item_key Yes varchar2 Identifies Item key
182 -- p_actid Yes number The ID number of the activity that this procedure is
183 -- called from.
184 -- p_funmode Yes varchar2 The mode of the function activity. Either 'RUN' or 'CANCEL'.
185
186 -- Post Success:
187 -- The data pertaining to item key and item type will be deleted from the
188 -- transaction tables completely.
189 --
190 -- Out Parameters:
191 -- p_result varchar2 Gets 'SUCCESS' if the transaction successfully deleted.
192 -- Post Failure:
193 -- An exception is raised and nothing will be created.
194 --
195 -- Access Status:
196 -- Internal Development Use Only.
197 --
198 -- {End Of Comments}
199 --
200 PROCEDURE REJECT_PROCESS(
201 itemtype in varchar2
202 ,itemkey in varchar2
203 ,actid in number
204 ,funmode in varchar2
205 ,result out nocopy varchar2);
206
207 END PAY_ASSG_COST_WF;