1 PACKAGE hr_workflow_ss AUTHID CURRENT_USER AS
2 /* $Header: hrwkflss.pkh 120.1.12010000.4 2010/03/14 18:56:21 ckondapi ship $ */
3 /*
4 This package contails new (v4.0+)workflow related business logic
5 */
6 -- ----------------------------------------------------------------------------
7 -- |-------------------------< branch_on_approval_flag>------------------------|
8 -- ----------------------------------------------------------------------------
9 -- Purpose: This procedure will read the HR_RUNTIME_APPROVAL_REQ_FLAG item level
10 -- attribute value and branch accordingly. This value will be set by the review
11 -- page by reading its attribute level attribute HR_APPROVAL_REQ_FLAG
12 -- (YES/NO/YES_DYNAMIC)
13 -- For
14 -- YES => branch with Yes result
15 -- YES_DYNAMIC => branch with Yes result
16 -- NO => branch with No result
17 -- ----------------------------------------------------------------------------
18 --
19 PROCEDURE branch_on_approval_flag
20 (itemtype in varchar2
21 ,itemkey in varchar2
22 ,actid in number
23 ,funcmode in varchar2
24 ,resultout out nocopy varchar2);
25
26
27 -- ----------------------------------------------------------------------------
28 -- |----------------------< set_rejected_by_payroll > -------------------------|
29 -- ----------------------------------------------------------------------------
30 -- Purpose: This procedure will set the item attribute HR_REJECTED_BY_PAYROLL
31 -- to 'Y'.
32 -- ----------------------------------------------------------------------------
33 PROCEDURE set_rejected_by_payroll
34 (itemtype in varchar2
35 ,itemkey in varchar2
36 ,actid in number
37 ,funcmode in varchar2
38 ,resultout out nocopy varchar2);
39
40
41 -- ----------------------------------------------------------------------------
42 -- |----------------------- < copy_payroll_comment > -------------------------|
43 -- ----------------------------------------------------------------------------
44 -- Purpose: This procedure will populate the wf_note from WF and set the item
45 -- attribute HR_SALBASISCHG_PAYROLL_COMMENT with that value.
46 -- ----------------------------------------------------------------------------
47 PROCEDURE copy_payroll_comment
48 (itemtype in varchar2
49 ,itemkey in varchar2
50 ,actid in number
51 ,funcmode in varchar2
52 ,resultout out nocopy varchar2);
53
54 function get_item_type
55 (p_transaction_id IN hr_api_transactions.transaction_id%TYPE)
56 return varchar2;
57 function get_item_key
58 (p_transaction_id IN hr_api_transactions.transaction_id%TYPE)
59 return varchar2;
60 function get_process_name
61 (p_transaction_id IN hr_api_transactions.transaction_id%TYPE)
62 return varchar2;
63 function get_approval_level
64 (p_transaction_id IN hr_api_transactions.transaction_id%TYPE)
65 return number;
66 function get_effective_date
67 (p_transaction_id IN hr_api_transactions.transaction_id%TYPE)
68 return date;
69 function get_assignment_id
70 (p_transaction_id IN hr_api_transactions.transaction_id%TYPE)
71 return number;
72 function get_final_approver
73 (p_transaction_id IN hr_api_transactions.transaction_id%TYPE)
74 return number;
75
76 --
77 -- ------------------------------------------------------------------------
78 -- |------------------------< Get_next_approver >-------------------------|
79 -- ------------------------------------------------------------------------
80 --
81 -- Description
82 --
83 -- Get the next approver in the chain
84 -- This procedure confirms to the Workflow API specification standards.
85 --
86 --
87 procedure Get_Next_Approver ( itemtype in varchar2,
88 itemkey in varchar2,
89 actid in number,
90 funmode in varchar2,
91 result out nocopy varchar2 );
92
93
94 --
95 -- ------------------------------------------------------------------------
96 -- |------------------------< update_approval_status >-------------------------|
97 -- ------------------------------------------------------------------------
98 --
99 -- Description
100 --
101 -- Update the status of the current approvers' approval notification
102 -- This procedure confirms to the Workflow API specification standards.
103 --
104 --
105 procedure update_approval_status ( itemtype in varchar2,
106 itemkey in varchar2,
107 actid in number,
108 funmode in varchar2,
109 result out nocopy varchar2 );
110
111
112 function allow_requestor_approval
113 (p_transaction_id IN hr_api_transactions.transaction_id%TYPE)
114 return varchar2;
115 --
116 -- ------------------------------------------------------------------------
117 -- |------------------ < check_mid_pay_period_change > --------------------|
118 -- ------------------------------------------------------------------------
119 --
120 -- Description
121 --
122 -- Determine if a mid pay period change was performed when a salary basis
123 -- was changed. If yes, we need to set the WF item attribute
124 -- HR_MID_PAY_PERIOD_CHANGE ='Y' so that a notification will be sent to the
125 -- Payroll Contact.
126 --
127 -- This procedure is invoked by the WF HR_CHK_SAL_BASIS_MID_PAY_PERIOD process.
128 -- ------------------------------------------------------------------------
129 --
130 procedure check_mid_pay_period_change
131 (p_item_type in varchar2,
132 p_item_key in varchar2,
133 p_act_id in number,
134 funmode in varchar2,
135 result out nocopy varchar2 );
136
137
138 --
139 -- ------------------------------------------------------------------------
140 -- |------------------ < APPS_INITIALIZE > --------------------|
141 -- Method to initialize the session apps context if there is no context already
142 -- set.
143 -- ------------------------------------------------------------------------
144
145 PROCEDURE apps_initialize
146 ( p_itemtype in varchar2
147 , p_itemkey in varchar2
148 , p_actid in number
149 , p_funcmode in varchar2
150 , p_result in out nocopy varchar2
151 );
152
153
154 --
155 -- ------------------------------------------------------------------------
156 -- |------------------ < DEFER_COMMIT > --------------------|
157 -- Method to read profile value (HR_DEFER_UPDATE)
161 (p_item_type in varchar2,
158 -- and branch the workflow accordingly.
159 -- ------------------------------------------------------------------------
160 procedure defer_commit
162 p_item_key in varchar2,
163 p_act_id in number,
164 funmode in varchar2,
165 result in out nocopy varchar2 ) ;
166 --
167
168
169 --
170 -- |------------------ <GetActivityAttrText > --------------------|
171 -- Get the value of a text item attribute.
172 -- If the attribute is a NUMBER or DATE type, then translate the
173 -- number/date value to a text-string representation using attrbute format.
174 -- For all other types, get the value directly.
175 -- IN:
176 -- itemtype - Item type
177 -- itemkey - Item key
178 -- actid - Process activity id
179 -- aname - Attribute Name
180 -- RETURNS:
181 -- Attribute value
182 --
183 function GetActivityAttrText(itemtype in varchar2,
184 itemkey in varchar2,
185 actid in number,
186 aname in varchar2,
187 ignore_notfound in varchar2 default 'FALSE')
188 return varchar2;
189
190 --
191 -- |------------------ <GetActivityAttrNumber > --------------------|
192 -- Get the value of a number item attribute.
193 -- Attribute must be a NUMBER-type attribute.
194 -- IN:
195 -- itemtype - Item type
196 -- itemkey - Item key
197 -- actid - Process activity id
198 -- aname - Attribute Name
199 -- RETURNS:
200 -- Attribute value
201 --
202 function GetActivityAttrNumber(itemtype in varchar2,
203 itemkey in varchar2,
204 actid in number,
205 aname in varchar2,
206 ignore_notfound in varchar2 default 'FALSE')
207 return number;
208
209 --
210 -- |------------------ <GetActivityAttrDate > --------------------|
211 -- Get the value of a date item attribute.
212 -- Attribute must be a DATE-type attribute.
213 -- IN:
214 -- itemtype - Item type
215 -- itemkey - Item key
216 -- actid - Process activity id
217 -- aname - Attribute Name
218 -- RETURNS:
219 -- Attribute value
220 --
221 function GetActivityAttrDate(itemtype in varchar2,
222 itemkey in varchar2,
223 actid in number,
224 aname in varchar2,
225 ignore_notfound in varchar2 default 'FALSE')
226 return date;
227
228
229 procedure getPageDetails
230 (p_item_type in varchar2,
231 p_item_key in varchar2,
232 p_activityId out nocopy number,
233 p_page out nocopy varchar2,
234 p_page_type out nocopy varchar2,
235 p_page_applicationId out nocopy varchar2,
236 p_additional_params out nocopy varchar2 ) ;
237
238 function GetItemAttrText(itemtype in varchar2,
239 itemkey in varchar2,
240 aname in varchar2,
241 ignore_notfound in varchar2 default 'FALSE')
242 return varchar2;
243
244 procedure get_item_type_and_key (
245 p_ntfId IN NUMBER
246 ,p_itemType OUT NOCOPY VARCHAR2
247 ,p_itemKey OUT NOCOPY VARCHAR2 );
248
249 procedure build_edit_link(document_id IN Varchar2,
250 display_type IN Varchar2,
251 document IN OUT NOCOPY varchar2,
252 document_type IN OUT NOCOPY Varchar2) ;
253
254 function GetAttrText (nid in number,
255 aname in varchar2,
256 ignore_notfound in varchar2 default 'FALSE') return varchar2;
257
258 function getApprStartingPointPersonId
259 (p_transaction_id IN hr_api_transactions.transaction_id%TYPE) return number;
260
261
262 procedure updateSFLTransaction (itemtype in varchar2,
263 itemkey in varchar2,
264 actid in number,
265 funmode in varchar2,
266 result out nocopy varchar2 );
267
268
269 procedure getProcessDisplayName(document_id IN Varchar2,
270 display_type IN Varchar2,
271 document IN OUT NOCOPY varchar2,
272 document_type IN OUT NOCOPY Varchar2) ;
273
274 function getProcessDisplayName(itemtype in varchar2,
275 itemkey in varchar2)
276 return wf_runnable_processes_v.display_name%type;
277
278
279
280 procedure getApprovalMsgSubject(document_id IN Varchar2,
281 display_type IN Varchar2,
282 document IN OUT NOCOPY varchar2,
283 document_type IN OUT NOCOPY Varchar2) ;
284 function getNextApproverForHist(p_item_type in varchar2,
285 p_item_key in varchar2) return varchar2;
286
287 function Authenticate(
288 p_username in varchar2,
289 p_nid in number,
290 p_nkey in varchar2)
291 return varchar2;
292
293 function Authenticate(p_username in varchar2,
294 p_txn_id in number
295 )
296 return varchar2;
297
298 function getOrganizationManagersubject
299 (p_item_type IN varchar2,
300 p_item_key IN varchar2)
301 return varchar2;
302
303 PROCEDURE isFyiNtfDet
304 (itemtype in varchar2
305 ,itemkey in varchar2
306 ,actid in number
307 ,funcmode in varchar2
308 ,resultout out nocopy varchar2);
309
310 END hr_workflow_ss;