123: ln_complete := 0;
124: ln_error := 0;
125: ln_unprocessed := 0;
126:
127: hr_utility.trace('B4 ASG Info');
128: hr_utility.trace('Document Id '||document_id);
129:
130: ln_request_id := substr(document_id,1,instr(document_id,':') -1 );
131: ln_business_group_id := substr(document_id,instr(document_id,':',1,1)+1 ,
124: ln_error := 0;
125: ln_unprocessed := 0;
126:
127: hr_utility.trace('B4 ASG Info');
128: hr_utility.trace('Document Id '||document_id);
129:
130: ln_request_id := substr(document_id,1,instr(document_id,':') -1 );
131: ln_business_group_id := substr(document_id,instr(document_id,':',1,1)+1 ,
132: instr(document_id,':',1,2) -instr(document_id,':',1,1)-1 );
133: ln_payroll_id := substr(document_id,instr(document_id,':',1,2)+1 ,
134: instr(document_id,':',1,3) -instr(document_id,':',1,2)-1 );
135: ld_payroll_date_paid := substr(document_id,instr(document_id,':',1,3)+1 );
136:
137: hr_utility.trace('ln_request_id = '||ln_request_id);
138: hr_utility.trace('ln_business_group_id = '||ln_business_group_id);
139: hr_utility.trace('ln_payroll_id = '||ln_payroll_id);
140: hr_utility.trace('ld_payroll_date_paid = '||ld_payroll_date_paid);
141:
134: instr(document_id,':',1,3) -instr(document_id,':',1,2)-1 );
135: ld_payroll_date_paid := substr(document_id,instr(document_id,':',1,3)+1 );
136:
137: hr_utility.trace('ln_request_id = '||ln_request_id);
138: hr_utility.trace('ln_business_group_id = '||ln_business_group_id);
139: hr_utility.trace('ln_payroll_id = '||ln_payroll_id);
140: hr_utility.trace('ld_payroll_date_paid = '||ld_payroll_date_paid);
141:
142: begin
135: ld_payroll_date_paid := substr(document_id,instr(document_id,':',1,3)+1 );
136:
137: hr_utility.trace('ln_request_id = '||ln_request_id);
138: hr_utility.trace('ln_business_group_id = '||ln_business_group_id);
139: hr_utility.trace('ln_payroll_id = '||ln_payroll_id);
140: hr_utility.trace('ld_payroll_date_paid = '||ld_payroll_date_paid);
141:
142: begin
143: select pbg.name into lv_business_group_name
136:
137: hr_utility.trace('ln_request_id = '||ln_request_id);
138: hr_utility.trace('ln_business_group_id = '||ln_business_group_id);
139: hr_utility.trace('ln_payroll_id = '||ln_payroll_id);
140: hr_utility.trace('ld_payroll_date_paid = '||ld_payroll_date_paid);
141:
142: begin
143: select pbg.name into lv_business_group_name
144: from per_business_groups pbg
143: select pbg.name into lv_business_group_name
144: from per_business_groups pbg
145: where pbg.business_group_id = ln_business_group_id;
146:
147: hr_utility.trace('ln_business_group_id = '||ln_business_group_id);
148: exception when others then
149: null;
150: end;
151:
181: document := '
'||X_segment3||'
'||X_segment4||'
'||X_segment5||'
186:
187:
188: document_type := 'text/html';
189: Exception When others then
190: hr_utility.trace('In Exception ');
191:
192: End Get_Assignment_Info;
193:
194: --
208: resultout := wf_engine.eng_null;
209: else
210:
211: lv_aname := PAY_WORKFLOW_API_PKG.set_value(itemtype,itemkey,actid);
212: hr_utility.trace('lv_aname = '|| lv_aname);
213: -- put this activity in wait/notified state
214: if lv_aname is not null then
215: resultout := 'COMPLETE'||':'||wf_engine.eng_null;
216: else
287: BEGIN
288: l_payroll_flag := 'N';
289: l_bg_flag := 'N';
290: l_space := ' ';
291: hr_utility.trace('B4 MSG Details ');
292: hr_utility.trace('Document Id '||document_id);
293:
294: args := document_id;
295: -- args has format itemtype:itemkey:attr_name
288: l_payroll_flag := 'N';
289: l_bg_flag := 'N';
290: l_space := ' ';
291: hr_utility.trace('B4 MSG Details ');
292: hr_utility.trace('Document Id '||document_id);
293:
294: args := document_id;
295: -- args has format itemtype:itemkey:attr_name
296: firstcolon := instr(args,':');
295: -- args has format itemtype:itemkey:attr_name
296: firstcolon := instr(args,':');
297: nextcolon := instr(args,':',firstcolon+1);
298: lv_itemtype := substr(args,1, firstcolon-1);
299: hr_utility.trace('Item Type '||lv_itemtype);
300: lv_itemkey := substr(args,firstcolon+1,nextcolon -(firstcolon-1));
301: hr_utility.trace('Item Key '||lv_itemkey);
302: lv_attr_name := substr(args,nextcolon+1);
303: hr_utility.trace('Attr Name '||lv_attr_name);
297: nextcolon := instr(args,':',firstcolon+1);
298: lv_itemtype := substr(args,1, firstcolon-1);
299: hr_utility.trace('Item Type '||lv_itemtype);
300: lv_itemkey := substr(args,firstcolon+1,nextcolon -(firstcolon-1));
301: hr_utility.trace('Item Key '||lv_itemkey);
302: lv_attr_name := substr(args,nextcolon+1);
303: hr_utility.trace('Attr Name '||lv_attr_name);
304:
305: -- l_cur_req_id := get_value(lv_itemtype,lv_itemkey,lv_attr_name);
299: hr_utility.trace('Item Type '||lv_itemtype);
300: lv_itemkey := substr(args,firstcolon+1,nextcolon -(firstcolon-1));
301: hr_utility.trace('Item Key '||lv_itemkey);
302: lv_attr_name := substr(args,nextcolon+1);
303: hr_utility.trace('Attr Name '||lv_attr_name);
304:
305: -- l_cur_req_id := get_value(lv_itemtype,lv_itemkey,lv_attr_name);
306:
307: X_segment1 := '
The Function GET_VALUE retrives the value of the request id for the given attribute name Request Id :'||l_cur_req_id||wf_core.newline ||'
306:
307: X_segment1 := '
The Function GET_VALUE retrives the value of the request id for the given attribute name Request Id :'||l_cur_req_id||wf_core.newline ||'
308: document := document || X_segment1||wf_core.newline;
309: document_type := 'text/html';
310: hr_utility.trace('Document '||document);
311: Exception When others then
312: hr_utility.trace('In Exception of Get message_details');
313:
314: End get_message_details;
315:
316: /*
331:
332: return attr_value;
333:
334: Exception When others then
335: hr_utility.trace('In Exception of get_value');
336:
337: End get_value;
338: */
339:
358: lv_attr_value := wf_engine.GetActivityAttrText(wf_item_type,wf_item_key,wf_actid, 'ATTR_VALUE');
359: -- aname(1) := lv_attr_name;
360: -- avalue(1) := lv_attr_value;
361:
362: hr_utility.trace('aname = '|| lv_attr_name);
363: hr_utility.trace('avalue = '|| lv_attr_value);
364: if aname is not null then
365: --WF_Engine.AddItemAttr(wf_item_type, wf_item_key, aname, avalue);
366: WF_Engine.AddItemAttr(wf_item_type, wf_item_key, lv_attr_name, lv_attr_value);
359: -- aname(1) := lv_attr_name;
360: -- avalue(1) := lv_attr_value;
361:
362: hr_utility.trace('aname = '|| lv_attr_name);
363: hr_utility.trace('avalue = '|| lv_attr_value);
364: if aname is not null then
365: --WF_Engine.AddItemAttr(wf_item_type, wf_item_key, aname, avalue);
366: WF_Engine.AddItemAttr(wf_item_type, wf_item_key, lv_attr_name, lv_attr_value);
367: --return aname;
369: else
370: return null;
371: end if;
372: Exception When others then
373: hr_utility.trace('In Exception of set_value');
374:
375: End set_value;
376: */
377:
397:
398: lv_result := 'SKIP';
399: ignore_notfound := FALSE;
400:
401: hr_utility.trace(' In GetRetroInformation ');
402: if ( funcmode = 'RUN' ) then
403: hr_utility.trace('Function Mode = '||funcmode);
404: -- get attr value
405: --
399: ignore_notfound := FALSE;
400:
401: hr_utility.trace(' In GetRetroInformation ');
402: if ( funcmode = 'RUN' ) then
403: hr_utility.trace('Function Mode = '||funcmode);
404: -- get attr value
405: --
406: hr_utility.trace('itemtype = '||itemtype);
407: hr_utility.trace('itemkey = '||itemkey);
402: if ( funcmode = 'RUN' ) then
403: hr_utility.trace('Function Mode = '||funcmode);
404: -- get attr value
405: --
406: hr_utility.trace('itemtype = '||itemtype);
407: hr_utility.trace('itemkey = '||itemkey);
408: hr_utility.trace('actid = '||to_char(actid));
409:
410: aname := 'RETRO_ASSIGNMENT_SET_NAME';
403: hr_utility.trace('Function Mode = '||funcmode);
404: -- get attr value
405: --
406: hr_utility.trace('itemtype = '||itemtype);
407: hr_utility.trace('itemkey = '||itemkey);
408: hr_utility.trace('actid = '||to_char(actid));
409:
410: aname := 'RETRO_ASSIGNMENT_SET_NAME';
411: lv_retro_asg_set := Wf_Engine.GetItemAttrText(
404: -- get attr value
405: --
406: hr_utility.trace('itemtype = '||itemtype);
407: hr_utility.trace('itemkey = '||itemkey);
408: hr_utility.trace('actid = '||to_char(actid));
409:
410: aname := 'RETRO_ASSIGNMENT_SET_NAME';
411: lv_retro_asg_set := Wf_Engine.GetItemAttrText(
412: itemtype ,
422: aname,
423: ignore_notfound);
424:
425:
426: hr_utility.trace(' BG Id = '|| to_char(X_bg_id));
427: hr_utility.trace(' Retro Asg Set = '|| lv_retro_asg_set);
428:
429: begin
430: select assignment_set_id
423: ignore_notfound);
424:
425:
426: hr_utility.trace(' BG Id = '|| to_char(X_bg_id));
427: hr_utility.trace(' Retro Asg Set = '|| lv_retro_asg_set);
428:
429: begin
430: select assignment_set_id
431: into ln_retro_asg_set_id
432: from hr_assignment_sets
433: where business_group_id = X_bg_id
434: and assignment_set_name like lv_retro_asg_set||'%';
435:
436: hr_utility.trace(' Retro Asg Set ID = '|| to_char(ln_retro_asg_set_id));
437: exception when others then
438: result := 'SKIP';
439: hr_utility.trace('Skiping Retro Pay By Element as Assignment Set Not Found');
440: end;
435:
436: hr_utility.trace(' Retro Asg Set ID = '|| to_char(ln_retro_asg_set_id));
437: exception when others then
438: result := 'SKIP';
439: hr_utility.trace('Skiping Retro Pay By Element as Assignment Set Not Found');
440: end;
441:
442: if ln_retro_asg_set_id is not null then
443:
446: itemkey,
447: 'RETRO_ASSIGNMENT_SET_ID',
448: ln_retro_asg_set_id);
449: result := 'RUN';
450: hr_utility.trace('result = '||result);
451: else
452: result := 'SKIP';
453:
454: hr_utility.trace('result = '||result);
450: hr_utility.trace('result = '||result);
451: else
452: result := 'SKIP';
453:
454: hr_utility.trace('result = '||result);
455: end if;
456:
457: resultout := 'COMPLETE:'||result;
458: hr_utility.trace(' Resultout = '|| resultout);
454: hr_utility.trace('result = '||result);
455: end if;
456:
457: resultout := 'COMPLETE:'||result;
458: hr_utility.trace(' Resultout = '|| resultout);
459: return;
460: elsif ( funcmode = 'CANCEL' ) then
461: --
462: null;
461: --
462: null;
463: result := 'SKIP';
464: resultout := 'COMPLETE:'||result;
465: hr_utility.trace('In Skip Resultout = '|| resultout);
466: return;
467:
468: end if;
469:
495:
496: lv_result := 'SKIP';
497: ignore_notfound := FALSE;
498:
499: hr_utility.trace('1. Function Mode = '||funcmode);
500: if ( funcmode = 'RUN' ) then
501: ln_get_retro_asgset_id := Wf_Engine.GetItemAttrNumber(
502: itemtype,
503: itemkey,
502: itemtype,
503: itemkey,
504: 'RETRO_ASSIGNMENT_SET_ID');
505:
506: hr_utility.trace('Function Mode = '||funcmode);
507: hr_utility.trace('1. ln_get_retro_asgset_id = '||to_char(ln_get_retro_asgset_id));
508:
509: if ln_get_retro_asgset_id is not null then
510: resultout := 'COMPLETE:RUN';
503: itemkey,
504: 'RETRO_ASSIGNMENT_SET_ID');
505:
506: hr_utility.trace('Function Mode = '||funcmode);
507: hr_utility.trace('1. ln_get_retro_asgset_id = '||to_char(ln_get_retro_asgset_id));
508:
509: if ln_get_retro_asgset_id is not null then
510: resultout := 'COMPLETE:RUN';
511: hr_utility.trace(' Resultout = '|| resultout);
507: hr_utility.trace('1. ln_get_retro_asgset_id = '||to_char(ln_get_retro_asgset_id));
508:
509: if ln_get_retro_asgset_id is not null then
510: resultout := 'COMPLETE:RUN';
511: hr_utility.trace(' Resultout = '|| resultout);
512: else
513: resultout := 'COMPLETE:SKIP';
514: hr_utility.trace(' Resultout = '|| resultout);
515: end if;
510: resultout := 'COMPLETE:RUN';
511: hr_utility.trace(' Resultout = '|| resultout);
512: else
513: resultout := 'COMPLETE:SKIP';
514: hr_utility.trace(' Resultout = '|| resultout);
515: end if;
516:
517: return;
518: end if;
518: end if;
519:
520:
521: if ( funcmode = 'RESPOND' ) then
522: hr_utility.trace('Function Mode = '||funcmode);
523: -- get attr value
524: --
525: hr_utility.trace('itemtype = '||itemtype);
526: hr_utility.trace('itemkey = '||itemkey);
521: if ( funcmode = 'RESPOND' ) then
522: hr_utility.trace('Function Mode = '||funcmode);
523: -- get attr value
524: --
525: hr_utility.trace('itemtype = '||itemtype);
526: hr_utility.trace('itemkey = '||itemkey);
527: hr_utility.trace('actid = '||to_char(actid));
528: l_notification_id2:= wf_engine.context_nid;
529: hr_utility.trace('2. l_notification_id = '||to_char(l_notification_id2));
522: hr_utility.trace('Function Mode = '||funcmode);
523: -- get attr value
524: --
525: hr_utility.trace('itemtype = '||itemtype);
526: hr_utility.trace('itemkey = '||itemkey);
527: hr_utility.trace('actid = '||to_char(actid));
528: l_notification_id2:= wf_engine.context_nid;
529: hr_utility.trace('2. l_notification_id = '||to_char(l_notification_id2));
530:
523: -- get attr value
524: --
525: hr_utility.trace('itemtype = '||itemtype);
526: hr_utility.trace('itemkey = '||itemkey);
527: hr_utility.trace('actid = '||to_char(actid));
528: l_notification_id2:= wf_engine.context_nid;
529: hr_utility.trace('2. l_notification_id = '||to_char(l_notification_id2));
530:
531: if (l_notification_id is not null ) then
525: hr_utility.trace('itemtype = '||itemtype);
526: hr_utility.trace('itemkey = '||itemkey);
527: hr_utility.trace('actid = '||to_char(actid));
528: l_notification_id2:= wf_engine.context_nid;
529: hr_utility.trace('2. l_notification_id = '||to_char(l_notification_id2));
530:
531: if (l_notification_id is not null ) then
532: lv_result := WF_NOTIFICATION.GetAttrText( l_notification_id, 'RESULT');
533: hr_utility.trace('1. lv_result = '||lv_result);
529: hr_utility.trace('2. l_notification_id = '||to_char(l_notification_id2));
530:
531: if (l_notification_id is not null ) then
532: lv_result := WF_NOTIFICATION.GetAttrText( l_notification_id, 'RESULT');
533: hr_utility.trace('1. lv_result = '||lv_result);
534: elsif ( l_notification_id2 is not null) then
535: lv_result := WF_NOTIFICATION.GetAttrText( l_notification_id2, 'RESULT');
536: hr_utility.trace('2.lv_result = '||lv_result);
537: end if;
532: lv_result := WF_NOTIFICATION.GetAttrText( l_notification_id, 'RESULT');
533: hr_utility.trace('1. lv_result = '||lv_result);
534: elsif ( l_notification_id2 is not null) then
535: lv_result := WF_NOTIFICATION.GetAttrText( l_notification_id2, 'RESULT');
536: hr_utility.trace('2.lv_result = '||lv_result);
537: end if;
538:
539: if (lv_result <> 'SKIP') then
540: aname := 'RETRO_ASSIGNMENT_SET_NAME';
552: aname,
553: ignore_notfound);
554:
555:
556: hr_utility.trace(' BG Id = '|| to_char(X_bg_id));
557: hr_utility.trace(' Retro Asg Set = '|| lv_retro_asg_set);
558:
559: begin
560: select assignment_set_id
553: ignore_notfound);
554:
555:
556: hr_utility.trace(' BG Id = '|| to_char(X_bg_id));
557: hr_utility.trace(' Retro Asg Set = '|| lv_retro_asg_set);
558:
559: begin
560: select assignment_set_id
561: into ln_retro_asg_set_id
562: from hr_assignment_sets
563: where business_group_id = X_bg_id
564: and assignment_set_name like lv_retro_asg_set||'%';
565:
566: hr_utility.trace(' Retro Asg Set ID = '|| to_char(ln_retro_asg_set_id));
567: exception when others then
568: result := 'SKIP';
569: hr_utility.trace('Skiping Retro Pay By Element as Assignment Set Not Found');
570: end;
565:
566: hr_utility.trace(' Retro Asg Set ID = '|| to_char(ln_retro_asg_set_id));
567: exception when others then
568: result := 'SKIP';
569: hr_utility.trace('Skiping Retro Pay By Element as Assignment Set Not Found');
570: end;
571:
572: if ln_retro_asg_set_id is not null then
573:
576: itemkey,
577: 'RETRO_ASSIGNMENT_SET_ID',
578: ln_retro_asg_set_id);
579: result := 'RUN';
580: hr_utility.trace('result = '||result);
581: else
582: result := 'SKIP';
583:
584: hr_utility.trace('result = '||result);
580: hr_utility.trace('result = '||result);
581: else
582: result := 'SKIP';
583:
584: hr_utility.trace('result = '||result);
585: end if;
586:
587: resultout := 'COMPLETE:'||result;
588: hr_utility.trace(' Resultout = '|| resultout);
584: hr_utility.trace('result = '||result);
585: end if;
586:
587: resultout := 'COMPLETE:'||result;
588: hr_utility.trace(' Resultout = '|| resultout);
589: return;
590: else
591: result := 'SKIP';
592: resultout := 'COMPLETE:'||result;
589: return;
590: else
591: result := 'SKIP';
592: resultout := 'COMPLETE:'||result;
593: hr_utility.trace('In Skip Resultout = '|| resultout);
594: return;
595:
596: end if;
597: -- result := 'SKIP';
595:
596: end if;
597: -- result := 'SKIP';
598: -- resultout := 'COMPLETE:'||result;
599: -- hr_utility.trace('In Skip Resultout = '|| resultout);
600: -- return;
601:
602: end if;
603:
661: -- get Item Attributes for user_id, responsibility_id and application_id
662: -- this assumes that they were set as item attribute, probably through
663: -- definition.
664:
665: hr_utility.trace('In set context of ExecuteConcProgram');
666: l_user_id:= wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'USER_ID');
667: l_resp_appl_id:= wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'APPLICATION_ID');
668: l_resp_id:= wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'RESPONSIBILITY_ID');
669: l_org_id:= wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'ORG_ID');
675: l_resp_appl_id:= crec.responsibility_application_id;
676: l_resp_id:= crec.responsibility_id;
677:
678: */
679: hr_utility.trace('l_user_id = '|| l_user_id);
680: hr_utility.trace('l_resp_appl_id: = '|| l_resp_appl_id);
681: hr_utility.trace('l_resp_id = '|| l_resp_id);
682: hr_utility.trace('l_org_id = '|| l_org_id);
683: hr_utility.trace('l_security_group_id = '|| l_security_group_id);
676: l_resp_id:= crec.responsibility_id;
677:
678: */
679: hr_utility.trace('l_user_id = '|| l_user_id);
680: hr_utility.trace('l_resp_appl_id: = '|| l_resp_appl_id);
681: hr_utility.trace('l_resp_id = '|| l_resp_id);
682: hr_utility.trace('l_org_id = '|| l_org_id);
683: hr_utility.trace('l_security_group_id = '|| l_security_group_id);
684: hr_utility.trace('l_per_security_id = '|| l_per_security_id);
677:
678: */
679: hr_utility.trace('l_user_id = '|| l_user_id);
680: hr_utility.trace('l_resp_appl_id: = '|| l_resp_appl_id);
681: hr_utility.trace('l_resp_id = '|| l_resp_id);
682: hr_utility.trace('l_org_id = '|| l_org_id);
683: hr_utility.trace('l_security_group_id = '|| l_security_group_id);
684: hr_utility.trace('l_per_security_id = '|| l_per_security_id);
685:
678: */
679: hr_utility.trace('l_user_id = '|| l_user_id);
680: hr_utility.trace('l_resp_appl_id: = '|| l_resp_appl_id);
681: hr_utility.trace('l_resp_id = '|| l_resp_id);
682: hr_utility.trace('l_org_id = '|| l_org_id);
683: hr_utility.trace('l_security_group_id = '|| l_security_group_id);
684: hr_utility.trace('l_per_security_id = '|| l_per_security_id);
685:
686: -- Set the database session context which also sets the org
679: hr_utility.trace('l_user_id = '|| l_user_id);
680: hr_utility.trace('l_resp_appl_id: = '|| l_resp_appl_id);
681: hr_utility.trace('l_resp_id = '|| l_resp_id);
682: hr_utility.trace('l_org_id = '|| l_org_id);
683: hr_utility.trace('l_security_group_id = '|| l_security_group_id);
684: hr_utility.trace('l_per_security_id = '|| l_per_security_id);
685:
686: -- Set the database session context which also sets the org
687: --FND_GLOBAL.Apps_Initialize(l_user_id, l_resp_id, l_resp_appl_id,l_security_group_id);
680: hr_utility.trace('l_resp_appl_id: = '|| l_resp_appl_id);
681: hr_utility.trace('l_resp_id = '|| l_resp_id);
682: hr_utility.trace('l_org_id = '|| l_org_id);
683: hr_utility.trace('l_security_group_id = '|| l_security_group_id);
684: hr_utility.trace('l_per_security_id = '|| l_per_security_id);
685:
686: -- Set the database session context which also sets the org
687: --FND_GLOBAL.Apps_Initialize(l_user_id, l_resp_id, l_resp_appl_id,l_security_group_id);
688: FND_GLOBAL.Apps_Initialize(l_user_id, l_resp_id, l_resp_appl_id,l_per_security_id);
686: -- Set the database session context which also sets the org
687: --FND_GLOBAL.Apps_Initialize(l_user_id, l_resp_id, l_resp_appl_id,l_security_group_id);
688: FND_GLOBAL.Apps_Initialize(l_user_id, l_resp_id, l_resp_appl_id,l_per_security_id);
689:
690: hr_utility.trace('In funcmode RUN of ExecuteConcProgram');
691: -- HR_SIGNON.Initialize_HR_Security;
692: hr_utility.trace('A4 HR_SIGNON.Initialize_HR_Security of ExecuteConcProgram');
693: fnd_wf_standard.ExecuteConcProgram(p_itemtype ,
694: p_itemkey ,
688: FND_GLOBAL.Apps_Initialize(l_user_id, l_resp_id, l_resp_appl_id,l_per_security_id);
689:
690: hr_utility.trace('In funcmode RUN of ExecuteConcProgram');
691: -- HR_SIGNON.Initialize_HR_Security;
692: hr_utility.trace('A4 HR_SIGNON.Initialize_HR_Security of ExecuteConcProgram');
693: fnd_wf_standard.ExecuteConcProgram(p_itemtype ,
694: p_itemkey ,
695: p_actid ,
696: p_funcmode ,
699: p_result := l_resultout;
700: return;
701:
702: ELSIF (p_funcmode = 'TEST_CTX') THEN
703: hr_utility.trace('In Test context of ExecuteConcProgram');
704: -- Code that compares current session context
705: -- with the work item context required to execute
706: -- the workflow safely
707:
733: -- get Item Attributes for user_id, responsibility_id and application_id
734: -- this assumes that they were set as item attribute, probably through
735: -- definition.
736:
737: hr_utility.trace('In set context of ExecuteConcProgram');
738: l_user_id:= wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'USER_ID');
739: l_resp_appl_id:= wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'APPLICATION_ID');
740: l_resp_id:= wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'RESPONSIBILITY_ID');
741: l_org_id:= wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'ORG_ID');
789: l_per_security_id NUMBER;
790:
791: BEGIN
792:
793: hr_utility.trace('In CheckProcessInputs');
794:
795: IF (p_funcmode = 'RUN') THEN
796:
797: -- Code that determines Start Process
798: -- p_result := 'COMPLETE:RUN';
799: -- get Item Attributes for user_id, responsibility_id and application_id
800: -- this assumes that they were set as item attribute, probably through
801: -- definition.
802: hr_utility.trace('In set context of ExecuteConcProgram');
803: l_user_id:= wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'USER_ID');
804: l_resp_appl_id:= wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'APPLICATION_ID');
805: l_resp_id:= wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'RESPONSIBILITY_ID');
806: l_org_id:= wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'ORG_ID');
807:
808: l_security_group_id := wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'SECURITY_GROUP_ID');
809: l_per_security_id := wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'PER_SECURITY_PROFILE_ID');
810:
811: hr_utility.trace('l_user_id = '|| l_user_id);
812: hr_utility.trace('l_resp_appl_id: = '|| l_resp_appl_id);
813: hr_utility.trace('l_resp_id = '|| l_resp_id);
814: hr_utility.trace('l_org_id = '|| l_org_id);
815: hr_utility.trace('l_security_group_id = '|| l_security_group_id);
808: l_security_group_id := wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'SECURITY_GROUP_ID');
809: l_per_security_id := wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'PER_SECURITY_PROFILE_ID');
810:
811: hr_utility.trace('l_user_id = '|| l_user_id);
812: hr_utility.trace('l_resp_appl_id: = '|| l_resp_appl_id);
813: hr_utility.trace('l_resp_id = '|| l_resp_id);
814: hr_utility.trace('l_org_id = '|| l_org_id);
815: hr_utility.trace('l_security_group_id = '|| l_security_group_id);
816: hr_utility.trace('l_per_security_id = '|| l_per_security_id);
809: l_per_security_id := wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'PER_SECURITY_PROFILE_ID');
810:
811: hr_utility.trace('l_user_id = '|| l_user_id);
812: hr_utility.trace('l_resp_appl_id: = '|| l_resp_appl_id);
813: hr_utility.trace('l_resp_id = '|| l_resp_id);
814: hr_utility.trace('l_org_id = '|| l_org_id);
815: hr_utility.trace('l_security_group_id = '|| l_security_group_id);
816: hr_utility.trace('l_per_security_id = '|| l_per_security_id);
817:
810:
811: hr_utility.trace('l_user_id = '|| l_user_id);
812: hr_utility.trace('l_resp_appl_id: = '|| l_resp_appl_id);
813: hr_utility.trace('l_resp_id = '|| l_resp_id);
814: hr_utility.trace('l_org_id = '|| l_org_id);
815: hr_utility.trace('l_security_group_id = '|| l_security_group_id);
816: hr_utility.trace('l_per_security_id = '|| l_per_security_id);
817:
818: -- Set the database session context which also sets the org
811: hr_utility.trace('l_user_id = '|| l_user_id);
812: hr_utility.trace('l_resp_appl_id: = '|| l_resp_appl_id);
813: hr_utility.trace('l_resp_id = '|| l_resp_id);
814: hr_utility.trace('l_org_id = '|| l_org_id);
815: hr_utility.trace('l_security_group_id = '|| l_security_group_id);
816: hr_utility.trace('l_per_security_id = '|| l_per_security_id);
817:
818: -- Set the database session context which also sets the org
819: --FND_GLOBAL.Apps_Initialize(l_user_id, l_resp_id, l_resp_appl_id,l_security_group_id);
812: hr_utility.trace('l_resp_appl_id: = '|| l_resp_appl_id);
813: hr_utility.trace('l_resp_id = '|| l_resp_id);
814: hr_utility.trace('l_org_id = '|| l_org_id);
815: hr_utility.trace('l_security_group_id = '|| l_security_group_id);
816: hr_utility.trace('l_per_security_id = '|| l_per_security_id);
817:
818: -- Set the database session context which also sets the org
819: --FND_GLOBAL.Apps_Initialize(l_user_id, l_resp_id, l_resp_appl_id,l_security_group_id);
820: FND_GLOBAL.Apps_Initialize(l_user_id, l_resp_id, l_resp_appl_id,l_per_security_id);
869: l_per_security_id NUMBER;
870:
871: BEGIN
872:
873: hr_utility.trace('In IsResponseRequired');
874:
875: IF (p_funcmode = 'RUN') THEN
876:
877: -- Code that determines Start Process
878: -- p_result := 'COMPLETE:RUN';
879: -- get Item Attributes for user_id, responsibility_id and application_id
880: -- this assumes that they were set as item attribute, probably through
881: -- definition.
882: hr_utility.trace('In set context of ExecuteConcProgram');
883: l_user_id:= wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'USER_ID');
884: l_resp_appl_id:= wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'APPLICATION_ID');
885: l_resp_id:= wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'RESPONSIBILITY_ID');
886: l_org_id:= wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'ORG_ID');
887:
888: l_security_group_id := wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'SECURITY_GROUP_ID');
889: l_per_security_id := wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'PER_SECURITY_PROFILE_ID');
890:
891: hr_utility.trace('l_user_id = '|| l_user_id);
892: hr_utility.trace('l_resp_appl_id: = '|| l_resp_appl_id);
893: hr_utility.trace('l_resp_id = '|| l_resp_id);
894: hr_utility.trace('l_org_id = '|| l_org_id);
895: hr_utility.trace('l_security_group_id = '|| l_security_group_id);
888: l_security_group_id := wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'SECURITY_GROUP_ID');
889: l_per_security_id := wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'PER_SECURITY_PROFILE_ID');
890:
891: hr_utility.trace('l_user_id = '|| l_user_id);
892: hr_utility.trace('l_resp_appl_id: = '|| l_resp_appl_id);
893: hr_utility.trace('l_resp_id = '|| l_resp_id);
894: hr_utility.trace('l_org_id = '|| l_org_id);
895: hr_utility.trace('l_security_group_id = '|| l_security_group_id);
896: hr_utility.trace('l_per_security_id = '|| l_per_security_id);
889: l_per_security_id := wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'PER_SECURITY_PROFILE_ID');
890:
891: hr_utility.trace('l_user_id = '|| l_user_id);
892: hr_utility.trace('l_resp_appl_id: = '|| l_resp_appl_id);
893: hr_utility.trace('l_resp_id = '|| l_resp_id);
894: hr_utility.trace('l_org_id = '|| l_org_id);
895: hr_utility.trace('l_security_group_id = '|| l_security_group_id);
896: hr_utility.trace('l_per_security_id = '|| l_per_security_id);
897:
890:
891: hr_utility.trace('l_user_id = '|| l_user_id);
892: hr_utility.trace('l_resp_appl_id: = '|| l_resp_appl_id);
893: hr_utility.trace('l_resp_id = '|| l_resp_id);
894: hr_utility.trace('l_org_id = '|| l_org_id);
895: hr_utility.trace('l_security_group_id = '|| l_security_group_id);
896: hr_utility.trace('l_per_security_id = '|| l_per_security_id);
897:
898: -- Set the database session context which also sets the org
891: hr_utility.trace('l_user_id = '|| l_user_id);
892: hr_utility.trace('l_resp_appl_id: = '|| l_resp_appl_id);
893: hr_utility.trace('l_resp_id = '|| l_resp_id);
894: hr_utility.trace('l_org_id = '|| l_org_id);
895: hr_utility.trace('l_security_group_id = '|| l_security_group_id);
896: hr_utility.trace('l_per_security_id = '|| l_per_security_id);
897:
898: -- Set the database session context which also sets the org
899: --FND_GLOBAL.Apps_Initialize(l_user_id, l_resp_id, l_resp_appl_id,l_security_group_id);
892: hr_utility.trace('l_resp_appl_id: = '|| l_resp_appl_id);
893: hr_utility.trace('l_resp_id = '|| l_resp_id);
894: hr_utility.trace('l_org_id = '|| l_org_id);
895: hr_utility.trace('l_security_group_id = '|| l_security_group_id);
896: hr_utility.trace('l_per_security_id = '|| l_per_security_id);
897:
898: -- Set the database session context which also sets the org
899: --FND_GLOBAL.Apps_Initialize(l_user_id, l_resp_id, l_resp_appl_id,l_security_group_id);
900: FND_GLOBAL.Apps_Initialize(l_user_id, l_resp_id, l_resp_appl_id,l_per_security_id);
931:
932: END IsResponseRequired;
933:
934: --begin
935: -- hr_utility.trace_on(null,'PYWF');
936:
937: END PAY_US_WORKFLOW_API_PKG;