176: select count(*) into cnt from hr_all_positions_f where position_id = l_position_id and availability_status_id = 1;
177: if cnt = 0 then
178: select hr_general.effective_date into l_expiration_date from dual;
179:
180: wf_event.AddParameterToList( 'USER_NAME', 'POS'||':'||l_position_id, l_plist);
181: wf_event.AddParameterToList( 'DISPLAYNAME', '-', l_plist);
182: wf_event.AddParameterToList( 'DESCRIPTION', '-', l_plist);
183: wf_event.AddParameterToList( 'orclWFOrigSystem','POS',l_plist);
184: wf_event.AddParameterToList( 'orclWFOrigSystemID',l_position_id,l_plist);
177: if cnt = 0 then
178: select hr_general.effective_date into l_expiration_date from dual;
179:
180: wf_event.AddParameterToList( 'USER_NAME', 'POS'||':'||l_position_id, l_plist);
181: wf_event.AddParameterToList( 'DISPLAYNAME', '-', l_plist);
182: wf_event.AddParameterToList( 'DESCRIPTION', '-', l_plist);
183: wf_event.AddParameterToList( 'orclWFOrigSystem','POS',l_plist);
184: wf_event.AddParameterToList( 'orclWFOrigSystemID',l_position_id,l_plist);
185: wf_event.AddParameterToList( 'orclWorkFlowNotificationPref', 'QUERY', l_plist);
178: select hr_general.effective_date into l_expiration_date from dual;
179:
180: wf_event.AddParameterToList( 'USER_NAME', 'POS'||':'||l_position_id, l_plist);
181: wf_event.AddParameterToList( 'DISPLAYNAME', '-', l_plist);
182: wf_event.AddParameterToList( 'DESCRIPTION', '-', l_plist);
183: wf_event.AddParameterToList( 'orclWFOrigSystem','POS',l_plist);
184: wf_event.AddParameterToList( 'orclWFOrigSystemID',l_position_id,l_plist);
185: wf_event.AddParameterToList( 'orclWorkFlowNotificationPref', 'QUERY', l_plist);
186: wf_event.AddParameterToList( 'orclIsEnabled', 'ACTIVE', l_plist);
179:
180: wf_event.AddParameterToList( 'USER_NAME', 'POS'||':'||l_position_id, l_plist);
181: wf_event.AddParameterToList( 'DISPLAYNAME', '-', l_plist);
182: wf_event.AddParameterToList( 'DESCRIPTION', '-', l_plist);
183: wf_event.AddParameterToList( 'orclWFOrigSystem','POS',l_plist);
184: wf_event.AddParameterToList( 'orclWFOrigSystemID',l_position_id,l_plist);
185: wf_event.AddParameterToList( 'orclWorkFlowNotificationPref', 'QUERY', l_plist);
186: wf_event.AddParameterToList( 'orclIsEnabled', 'ACTIVE', l_plist);
187: wf_event.AddParameterToList( 'ExpirationDate',to_char(l_expiration_date,wf_engine.date_format), l_plist);
180: wf_event.AddParameterToList( 'USER_NAME', 'POS'||':'||l_position_id, l_plist);
181: wf_event.AddParameterToList( 'DISPLAYNAME', '-', l_plist);
182: wf_event.AddParameterToList( 'DESCRIPTION', '-', l_plist);
183: wf_event.AddParameterToList( 'orclWFOrigSystem','POS',l_plist);
184: wf_event.AddParameterToList( 'orclWFOrigSystemID',l_position_id,l_plist);
185: wf_event.AddParameterToList( 'orclWorkFlowNotificationPref', 'QUERY', l_plist);
186: wf_event.AddParameterToList( 'orclIsEnabled', 'ACTIVE', l_plist);
187: wf_event.AddParameterToList( 'ExpirationDate',to_char(l_expiration_date,wf_engine.date_format), l_plist);
188: wf_event.AddParameterToList( 'WFSYNCH_OVERWRITE','TRUE',l_plist);
181: wf_event.AddParameterToList( 'DISPLAYNAME', '-', l_plist);
182: wf_event.AddParameterToList( 'DESCRIPTION', '-', l_plist);
183: wf_event.AddParameterToList( 'orclWFOrigSystem','POS',l_plist);
184: wf_event.AddParameterToList( 'orclWFOrigSystemID',l_position_id,l_plist);
185: wf_event.AddParameterToList( 'orclWorkFlowNotificationPref', 'QUERY', l_plist);
186: wf_event.AddParameterToList( 'orclIsEnabled', 'ACTIVE', l_plist);
187: wf_event.AddParameterToList( 'ExpirationDate',to_char(l_expiration_date,wf_engine.date_format), l_plist);
188: wf_event.AddParameterToList( 'WFSYNCH_OVERWRITE','TRUE',l_plist);
189: -- wf_event.AddParameterToList( 'Raiseerrors', 'TRUE', l_plist);
182: wf_event.AddParameterToList( 'DESCRIPTION', '-', l_plist);
183: wf_event.AddParameterToList( 'orclWFOrigSystem','POS',l_plist);
184: wf_event.AddParameterToList( 'orclWFOrigSystemID',l_position_id,l_plist);
185: wf_event.AddParameterToList( 'orclWorkFlowNotificationPref', 'QUERY', l_plist);
186: wf_event.AddParameterToList( 'orclIsEnabled', 'ACTIVE', l_plist);
187: wf_event.AddParameterToList( 'ExpirationDate',to_char(l_expiration_date,wf_engine.date_format), l_plist);
188: wf_event.AddParameterToList( 'WFSYNCH_OVERWRITE','TRUE',l_plist);
189: -- wf_event.AddParameterToList( 'Raiseerrors', 'TRUE', l_plist);
190:
183: wf_event.AddParameterToList( 'orclWFOrigSystem','POS',l_plist);
184: wf_event.AddParameterToList( 'orclWFOrigSystemID',l_position_id,l_plist);
185: wf_event.AddParameterToList( 'orclWorkFlowNotificationPref', 'QUERY', l_plist);
186: wf_event.AddParameterToList( 'orclIsEnabled', 'ACTIVE', l_plist);
187: wf_event.AddParameterToList( 'ExpirationDate',to_char(l_expiration_date,wf_engine.date_format), l_plist);
188: wf_event.AddParameterToList( 'WFSYNCH_OVERWRITE','TRUE',l_plist);
189: -- wf_event.AddParameterToList( 'Raiseerrors', 'TRUE', l_plist);
190:
191: WF_LOCAL_SYNCH.propagate_role(
184: wf_event.AddParameterToList( 'orclWFOrigSystemID',l_position_id,l_plist);
185: wf_event.AddParameterToList( 'orclWorkFlowNotificationPref', 'QUERY', l_plist);
186: wf_event.AddParameterToList( 'orclIsEnabled', 'ACTIVE', l_plist);
187: wf_event.AddParameterToList( 'ExpirationDate',to_char(l_expiration_date,wf_engine.date_format), l_plist);
188: wf_event.AddParameterToList( 'WFSYNCH_OVERWRITE','TRUE',l_plist);
189: -- wf_event.AddParameterToList( 'Raiseerrors', 'TRUE', l_plist);
190:
191: WF_LOCAL_SYNCH.propagate_role(
192: p_orig_system => 'POS',
185: wf_event.AddParameterToList( 'orclWorkFlowNotificationPref', 'QUERY', l_plist);
186: wf_event.AddParameterToList( 'orclIsEnabled', 'ACTIVE', l_plist);
187: wf_event.AddParameterToList( 'ExpirationDate',to_char(l_expiration_date,wf_engine.date_format), l_plist);
188: wf_event.AddParameterToList( 'WFSYNCH_OVERWRITE','TRUE',l_plist);
189: -- wf_event.AddParameterToList( 'Raiseerrors', 'TRUE', l_plist);
190:
191: WF_LOCAL_SYNCH.propagate_role(
192: p_orig_system => 'POS',
193: p_orig_system_id => l_position_id,
204: exception when others then
205: null;
206: end;
207:
208: wf_event.AddParameterToList( 'USER_NAME', 'POS'||':'||l_position_id, l_plist);
209: wf_event.AddParameterToList( 'DISPLAYNAME', l_name, l_plist);
210: wf_event.AddParameterToList( 'DESCRIPTION', l_name, l_plist);
211: wf_event.AddParameterToList( 'orclWFOrigSystem','POS',l_plist);
212: wf_event.AddParameterToList( 'orclWFOrigSystemID',l_position_id,l_plist);
205: null;
206: end;
207:
208: wf_event.AddParameterToList( 'USER_NAME', 'POS'||':'||l_position_id, l_plist);
209: wf_event.AddParameterToList( 'DISPLAYNAME', l_name, l_plist);
210: wf_event.AddParameterToList( 'DESCRIPTION', l_name, l_plist);
211: wf_event.AddParameterToList( 'orclWFOrigSystem','POS',l_plist);
212: wf_event.AddParameterToList( 'orclWFOrigSystemID',l_position_id,l_plist);
213: wf_event.AddParameterToList( 'orclWorkFlowNotificationPref', 'QUERY', l_plist);
206: end;
207:
208: wf_event.AddParameterToList( 'USER_NAME', 'POS'||':'||l_position_id, l_plist);
209: wf_event.AddParameterToList( 'DISPLAYNAME', l_name, l_plist);
210: wf_event.AddParameterToList( 'DESCRIPTION', l_name, l_plist);
211: wf_event.AddParameterToList( 'orclWFOrigSystem','POS',l_plist);
212: wf_event.AddParameterToList( 'orclWFOrigSystemID',l_position_id,l_plist);
213: wf_event.AddParameterToList( 'orclWorkFlowNotificationPref', 'QUERY', l_plist);
214: wf_event.AddParameterToList( 'orclIsEnabled', 'ACTIVE', l_plist);
207:
208: wf_event.AddParameterToList( 'USER_NAME', 'POS'||':'||l_position_id, l_plist);
209: wf_event.AddParameterToList( 'DISPLAYNAME', l_name, l_plist);
210: wf_event.AddParameterToList( 'DESCRIPTION', l_name, l_plist);
211: wf_event.AddParameterToList( 'orclWFOrigSystem','POS',l_plist);
212: wf_event.AddParameterToList( 'orclWFOrigSystemID',l_position_id,l_plist);
213: wf_event.AddParameterToList( 'orclWorkFlowNotificationPref', 'QUERY', l_plist);
214: wf_event.AddParameterToList( 'orclIsEnabled', 'ACTIVE', l_plist);
215: wf_event.AddParameterToList( 'ExpirationDate',to_char(l_expiration_date,wf_engine.date_format), l_plist);
208: wf_event.AddParameterToList( 'USER_NAME', 'POS'||':'||l_position_id, l_plist);
209: wf_event.AddParameterToList( 'DISPLAYNAME', l_name, l_plist);
210: wf_event.AddParameterToList( 'DESCRIPTION', l_name, l_plist);
211: wf_event.AddParameterToList( 'orclWFOrigSystem','POS',l_plist);
212: wf_event.AddParameterToList( 'orclWFOrigSystemID',l_position_id,l_plist);
213: wf_event.AddParameterToList( 'orclWorkFlowNotificationPref', 'QUERY', l_plist);
214: wf_event.AddParameterToList( 'orclIsEnabled', 'ACTIVE', l_plist);
215: wf_event.AddParameterToList( 'ExpirationDate',to_char(l_expiration_date,wf_engine.date_format), l_plist);
216: wf_event.AddParameterToList( 'WFSYNCH_OVERWRITE','TRUE',l_plist);
209: wf_event.AddParameterToList( 'DISPLAYNAME', l_name, l_plist);
210: wf_event.AddParameterToList( 'DESCRIPTION', l_name, l_plist);
211: wf_event.AddParameterToList( 'orclWFOrigSystem','POS',l_plist);
212: wf_event.AddParameterToList( 'orclWFOrigSystemID',l_position_id,l_plist);
213: wf_event.AddParameterToList( 'orclWorkFlowNotificationPref', 'QUERY', l_plist);
214: wf_event.AddParameterToList( 'orclIsEnabled', 'ACTIVE', l_plist);
215: wf_event.AddParameterToList( 'ExpirationDate',to_char(l_expiration_date,wf_engine.date_format), l_plist);
216: wf_event.AddParameterToList( 'WFSYNCH_OVERWRITE','TRUE',l_plist);
217: -- wf_event.AddParameterToList( 'Raiseerrors', 'TRUE', l_plist);
210: wf_event.AddParameterToList( 'DESCRIPTION', l_name, l_plist);
211: wf_event.AddParameterToList( 'orclWFOrigSystem','POS',l_plist);
212: wf_event.AddParameterToList( 'orclWFOrigSystemID',l_position_id,l_plist);
213: wf_event.AddParameterToList( 'orclWorkFlowNotificationPref', 'QUERY', l_plist);
214: wf_event.AddParameterToList( 'orclIsEnabled', 'ACTIVE', l_plist);
215: wf_event.AddParameterToList( 'ExpirationDate',to_char(l_expiration_date,wf_engine.date_format), l_plist);
216: wf_event.AddParameterToList( 'WFSYNCH_OVERWRITE','TRUE',l_plist);
217: -- wf_event.AddParameterToList( 'Raiseerrors', 'TRUE', l_plist);
218:
211: wf_event.AddParameterToList( 'orclWFOrigSystem','POS',l_plist);
212: wf_event.AddParameterToList( 'orclWFOrigSystemID',l_position_id,l_plist);
213: wf_event.AddParameterToList( 'orclWorkFlowNotificationPref', 'QUERY', l_plist);
214: wf_event.AddParameterToList( 'orclIsEnabled', 'ACTIVE', l_plist);
215: wf_event.AddParameterToList( 'ExpirationDate',to_char(l_expiration_date,wf_engine.date_format), l_plist);
216: wf_event.AddParameterToList( 'WFSYNCH_OVERWRITE','TRUE',l_plist);
217: -- wf_event.AddParameterToList( 'Raiseerrors', 'TRUE', l_plist);
218:
219: if g_debug then
212: wf_event.AddParameterToList( 'orclWFOrigSystemID',l_position_id,l_plist);
213: wf_event.AddParameterToList( 'orclWorkFlowNotificationPref', 'QUERY', l_plist);
214: wf_event.AddParameterToList( 'orclIsEnabled', 'ACTIVE', l_plist);
215: wf_event.AddParameterToList( 'ExpirationDate',to_char(l_expiration_date,wf_engine.date_format), l_plist);
216: wf_event.AddParameterToList( 'WFSYNCH_OVERWRITE','TRUE',l_plist);
217: -- wf_event.AddParameterToList( 'Raiseerrors', 'TRUE', l_plist);
218:
219: if g_debug then
220: hr_utility.set_location('l_start_date is '||l_start_date, 20);
213: wf_event.AddParameterToList( 'orclWorkFlowNotificationPref', 'QUERY', l_plist);
214: wf_event.AddParameterToList( 'orclIsEnabled', 'ACTIVE', l_plist);
215: wf_event.AddParameterToList( 'ExpirationDate',to_char(l_expiration_date,wf_engine.date_format), l_plist);
216: wf_event.AddParameterToList( 'WFSYNCH_OVERWRITE','TRUE',l_plist);
217: -- wf_event.AddParameterToList( 'Raiseerrors', 'TRUE', l_plist);
218:
219: if g_debug then
220: hr_utility.set_location('l_start_date is '||l_start_date, 20);
221: end if;
231:
232: end if;
233: elsif (l_action = 'UPDATE' and l_date_chk = 'FUTURE') then
234:
235: wf_event.addparametertolist(p_name => 'CONTEXT',
236: p_value => 'POSITION',
237: p_parameterlist => l_plist);
238:
239: wf_event.addparametertolist(p_name => 'POSITIONID',
235: wf_event.addparametertolist(p_name => 'CONTEXT',
236: p_value => 'POSITION',
237: p_parameterlist => l_plist);
238:
239: wf_event.addparametertolist(p_name => 'POSITIONID',
240: p_value => l_position_id_canonical,
241: p_parameterlist => l_plist);
242:
243: wf_event.addparametertolist(p_name => 'STARTDATE',
239: wf_event.addparametertolist(p_name => 'POSITIONID',
240: p_value => l_position_id_canonical,
241: p_parameterlist => l_plist);
242:
243: wf_event.addparametertolist(p_name => 'STARTDATE',
244: p_value => l_start_date_canonical,
245: p_parameterlist => l_plist);
246:
247: wf_event.addparametertolist(p_name => 'ENDDATE',
243: wf_event.addparametertolist(p_name => 'STARTDATE',
244: p_value => l_start_date_canonical,
245: p_parameterlist => l_plist);
246:
247: wf_event.addparametertolist(p_name => 'ENDDATE',
248: p_value => l_end_date_canonical,
249: p_parameterlist => l_plist);
250:
251:
1372:
1373:
1374: Begin
1375: hr_utility.set_location('Entering hr_psf_shd.call_back',10);
1376: l_entity := wf_event.getvalueforparameter(p_name => 'CONTEXT',
1377: p_parameterlist => p_parameters);
1378:
1379: l_position_id_canonical := wf_event.getvalueforparameter(p_name => 'POSITIONID',
1380: p_parameterlist => p_parameters);
1375: hr_utility.set_location('Entering hr_psf_shd.call_back',10);
1376: l_entity := wf_event.getvalueforparameter(p_name => 'CONTEXT',
1377: p_parameterlist => p_parameters);
1378:
1379: l_position_id_canonical := wf_event.getvalueforparameter(p_name => 'POSITIONID',
1380: p_parameterlist => p_parameters);
1381:
1382: l_start_date_canonical := wf_event.getvalueforparameter(p_name => 'STARTDATE',
1383: p_parameterlist => p_parameters);
1378:
1379: l_position_id_canonical := wf_event.getvalueforparameter(p_name => 'POSITIONID',
1380: p_parameterlist => p_parameters);
1381:
1382: l_start_date_canonical := wf_event.getvalueforparameter(p_name => 'STARTDATE',
1383: p_parameterlist => p_parameters);
1384:
1385: l_end_date_canonical := wf_event.getvalueforparameter(p_name => 'ENDDATE',
1386: p_parameterlist => p_parameters);
1381:
1382: l_start_date_canonical := wf_event.getvalueforparameter(p_name => 'STARTDATE',
1383: p_parameterlist => p_parameters);
1384:
1385: l_end_date_canonical := wf_event.getvalueforparameter(p_name => 'ENDDATE',
1386: p_parameterlist => p_parameters);
1387:
1388: l_start_date := FND_DATE.canonical_to_date(l_start_date_canonical);
1389: l_end_date := FND_DATE.canonical_to_date(l_end_date_canonical);