81: ELSE
82: WF_DIRECTORY.getusername('PER',tempApprover.person_id,
83: g_name, g_display_name);
84:
85: WF_ENGINE.SetItemAttrText(itemtype,
86: itemkey,
87: 'APPROVER_NAME',
88: g_name);
89:
86: itemkey,
87: 'APPROVER_NAME',
88: g_name);
89:
90: WF_ENGINE.SetItemAttrText(itemtype,
91: itemkey,
92: 'APPROVAL_DISPLAY_NAME',
93: g_display_name);
94:
91: itemkey,
92: 'APPROVAL_DISPLAY_NAME',
93: g_display_name);
94:
95: WF_ENGINE.SetItemAttrNumber(itemtype,
96: itemkey,
97: 'APPROVER_PERSON_ID',
98: tempapprover.person_id);
99:
134: -- RUN mode - normal process execution
135: --
136: if (funcmode = 'RUN') then
137:
138: G_signatory_id := WF_ENGINE.GetItemAttrNumber(
139: itemtype,
140: itemkey,
141: 'SIGNATORY_ID');
142:
139: itemtype,
140: itemkey,
141: 'SIGNATORY_ID');
142:
143: G_approver_person_id := WF_ENGINE.GetItemAttrNumber(
144: itemtype,
145: itemkey,
146: 'APPROVER_PERSON_ID');
147:
193: --
194: if (funcmode = 'RUN') then
195:
196:
197: G_signatory_id := WF_ENGINE.GetItemAttrNumber(
198: itemtype,
199: itemkey,
200: 'SIGNATORY_ID');
201:
198: itemtype,
199: itemkey,
200: 'SIGNATORY_ID');
201:
202: G_approver_person_id := WF_ENGINE.GetItemAttrText(
203: itemtype,
204: itemkey,
205: 'APPROVER_PERSON_ID');
206:
251: --
252: -- RUN mode - normal process execution
253: --
254: if (funcmode = 'RUN') then
255: l_signatory_id := WF_ENGINE.GetItemAttrNumber(itemtype,
256: itemkey,
257: 'SIGNATORY_ID');
258: UPDATE ce_ba_signatories
259: SET status = 'APPROVED'
297: -- RUN mode - normal process execution
298: --
299: if (funcmode = 'RUN') then
300:
301: l_signatory_id := WF_ENGINE.GetItemAttrNumber(itemtype,
302: itemkey,
303: 'SIGNATORY_ID');
304:
305: UPDATE ce_ba_signatories
345: l_resp_id number;
346: l_resp_appl_id number;
347:
348: BEGIN
349: l_n_org_id := WF_ENGINE.GetItemAttrNumber(itemtype,
350: itemkey,
351: 'ORG_ID');
352:
353: IF (command = 'RUN') THEN
353: IF (command = 'RUN') THEN
354: result := 'CEBASIG';
355: return;
356: ELSIF command = 'SET_CTX' THEN
357: l_user_id := to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,
358: 'USER_ID'));
359: l_resp_id := to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,
360: 'RESPONSIBILITY_ID'));
361: l_resp_appl_id := to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,
355: return;
356: ELSIF command = 'SET_CTX' THEN
357: l_user_id := to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,
358: 'USER_ID'));
359: l_resp_id := to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,
360: 'RESPONSIBILITY_ID'));
361: l_resp_appl_id := to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,
362: 'APPLICATION_ID'));
363: l_n_org_id := WF_ENGINE.GetItemAttrText(itemtype,
357: l_user_id := to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,
358: 'USER_ID'));
359: l_resp_id := to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,
360: 'RESPONSIBILITY_ID'));
361: l_resp_appl_id := to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,
362: 'APPLICATION_ID'));
363: l_n_org_id := WF_ENGINE.GetItemAttrText(itemtype,
364: itemkey,
365: 'ORG_ID');
359: l_resp_id := to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,
360: 'RESPONSIBILITY_ID'));
361: l_resp_appl_id := to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,
362: 'APPLICATION_ID'));
363: l_n_org_id := WF_ENGINE.GetItemAttrText(itemtype,
364: itemkey,
365: 'ORG_ID');
366:
367: fnd_global.apps_initialize(l_user_id,
371: fnd_client_info.set_org_context(l_n_org_id);
372:
373: return;
374: ELSIF (command = 'TEST_CTX') THEN
375: l_n_org_id := WF_ENGINE.GetItemAttrText(itemtype,
376: itemkey,
377: 'ORG_ID');
378:
379: IF (nvl(rtrim(substrb(USERENV('CLIENT_INFO'), 1, 10)),'NULL') =
456: l_user_id := fnd_profile.value('USER_ID');
457: l_resp_id := fnd_profile.value('RESP_ID');
458: l_resp_appl_id := fnd_profile.value('RESP_APPL_ID');
459:
460: WF_ENGINE.setItemAttrText('CEBASIG',id,'ORG_ID',to_char(l_org_id));
461: WF_ENGINE.setItemAttrText('CEBASIG',id,'USER_ID',to_char(l_user_id));
462: WF_ENGINE.setItemAttrText('CEBASIG',id,'RESPONSIBILITY_ID',to_char(l_resp_id));
463: WF_ENGINE.setItemAttrText('CEBASIG',id,'APPLICATION_ID',to_char(l_resp_appl_id));
464:
457: l_resp_id := fnd_profile.value('RESP_ID');
458: l_resp_appl_id := fnd_profile.value('RESP_APPL_ID');
459:
460: WF_ENGINE.setItemAttrText('CEBASIG',id,'ORG_ID',to_char(l_org_id));
461: WF_ENGINE.setItemAttrText('CEBASIG',id,'USER_ID',to_char(l_user_id));
462: WF_ENGINE.setItemAttrText('CEBASIG',id,'RESPONSIBILITY_ID',to_char(l_resp_id));
463: WF_ENGINE.setItemAttrText('CEBASIG',id,'APPLICATION_ID',to_char(l_resp_appl_id));
464:
465: l_signatory_id := id;
458: l_resp_appl_id := fnd_profile.value('RESP_APPL_ID');
459:
460: WF_ENGINE.setItemAttrText('CEBASIG',id,'ORG_ID',to_char(l_org_id));
461: WF_ENGINE.setItemAttrText('CEBASIG',id,'USER_ID',to_char(l_user_id));
462: WF_ENGINE.setItemAttrText('CEBASIG',id,'RESPONSIBILITY_ID',to_char(l_resp_id));
463: WF_ENGINE.setItemAttrText('CEBASIG',id,'APPLICATION_ID',to_char(l_resp_appl_id));
464:
465: l_signatory_id := id;
466:
459:
460: WF_ENGINE.setItemAttrText('CEBASIG',id,'ORG_ID',to_char(l_org_id));
461: WF_ENGINE.setItemAttrText('CEBASIG',id,'USER_ID',to_char(l_user_id));
462: WF_ENGINE.setItemAttrText('CEBASIG',id,'RESPONSIBILITY_ID',to_char(l_resp_id));
463: WF_ENGINE.setItemAttrText('CEBASIG',id,'APPLICATION_ID',to_char(l_resp_appl_id));
464:
465: l_signatory_id := id;
466:
467: -- populate ce_security_profiles_tmp table with ce_security_profiles_v
492:
493: WF_DIRECTORY.getusername('PER',g_requester_id,
494: g_name, g_display_name);
495:
496: WF_ENGINE.SetItemAttrText(itemtype,
497: itemkey,
498: 'REQUESTER_NAME',
499: g_name);
500:
497: itemkey,
498: 'REQUESTER_NAME',
499: g_name);
500:
501: WF_ENGINE.SetItemAttrText(itemtype,
502: itemkey,
503: 'REQUESTER_DISPLAY_NAME',
504: g_display_name);
505:
502: itemkey,
503: 'REQUESTER_DISPLAY_NAME',
504: g_display_name);
505:
506: WF_ENGINE.SetItemAttrNumber(itemtype,
507: itemkey,
508: 'SIGNATORY_ID',
509: l_signatory_id);
510:
510:
511: WF_DIRECTORY.getusername('PER',l_signatory_id,
512: g_name, g_display_name);
513:
514: WF_ENGINE.SetItemAttrText(itemtype,
515: itemkey,
516: 'SIGNATORY_NAME',
517: g_signatory_name);
518:
515: itemkey,
516: 'SIGNATORY_NAME',
517: g_signatory_name);
518:
519: WF_ENGINE.SetItemAttrText(itemtype,
520: itemkey,
521: 'SINGLE_LIMIT_AMOUNT',
522: g_single_limit_amount);
523:
520: itemkey,
521: 'SINGLE_LIMIT_AMOUNT',
522: g_single_limit_amount);
523:
524: WF_ENGINE.SetItemAttrText(itemtype,
525: itemkey,
526: 'JOINT_LIMIT_AMOUNT',
527: g_joint_limit_amount);
528:
525: itemkey,
526: 'JOINT_LIMIT_AMOUNT',
527: g_joint_limit_amount);
528:
529: WF_ENGINE.SetItemAttrText(itemtype,
530: itemkey,
531: 'BANK_ACCOUNT_NAME',
532: g_bank_Account_name);
533:
530: itemkey,
531: 'BANK_ACCOUNT_NAME',
532: g_bank_Account_name);
533:
534: WF_ENGINE.SetItemAttrText(itemtype,
535: itemkey,
536: 'BANK_ACCOUNT_CURRENCY_CODE',
537: g_currency_code);
538:
535: itemkey,
536: 'BANK_ACCOUNT_CURRENCY_CODE',
537: g_currency_code);
538:
539: WF_ENGINE.SetItemAttrText(itemtype,
540: itemkey,
541: 'PERSON_TYPE',
542: g_person_type);
543:
540: itemkey,
541: 'PERSON_TYPE',
542: g_person_type);
543:
544: WF_ENGINE.SetItemAttrText(itemtype,
545: itemkey,
546: 'PERSON_JOB',
547: g_person_job);
548:
545: itemkey,
546: 'PERSON_JOB',
547: g_person_job);
548:
549: WF_ENGINE.SetItemAttrText(itemtype,
550: itemkey,
551: 'PERSON_LOCATION',
552: g_person_location);
553:
550: itemkey,
551: 'PERSON_LOCATION',
552: g_person_location);
553:
554: WF_ENGINE.SetItemAttrText(itemtype,
555: itemkey,
556: 'HR_ORGANIZATION',
557: g_person_org_name);
558:
555: itemkey,
556: 'HR_ORGANIZATION',
557: g_person_org_name);
558:
559: WF_ENGINE.SetItemAttrText(itemtype,
560: itemkey,
561: 'PERSON_GROUP',
562: g_signer_group);
563:
560: itemkey,
561: 'PERSON_GROUP',
562: g_signer_group);
563:
564: WF_ENGINE.SetItemAttrText(itemtype,
565: itemkey,
566: 'OTHER_LIMITATIONS',
567: g_other_limits);
568:
565: itemkey,
566: 'OTHER_LIMITATIONS',
567: g_other_limits);
568:
569: WF_ENGINE.SetItemAttrText(itemtype,
570: itemkey,
571: 'START_DATE',
572: g_start_date);
573:
570: itemkey,
571: 'START_DATE',
572: g_start_date);
573:
574: WF_ENGINE.SetItemAttrText(itemtype,
575: itemkey,
576: 'END_DATE',
577: g_end_date);
578:
575: itemkey,
576: 'END_DATE',
577: g_end_date);
578:
579: WF_ENGINE.SetItemAttrText(itemtype,
580: itemkey,
581: 'BANK_ACCOUNT_NUMBER',
582: g_bank_account_number);
583:
580: itemkey,
581: 'BANK_ACCOUNT_NUMBER',
582: g_bank_account_number);
583:
584: WF_ENGINE.SetItemAttrText(itemtype,
585: itemkey,
586: 'BANK_BRANCH_NAME',
587: g_bank_branch_name);
588:
612: itemkey NUMBER;
613: BEGIN
614:
615: initialize(260,id,'CEBASIG');
616: WF_ENGINE.CREATEPROCESS('CEBASIG',
617: id,
618: 'CEBASIG');
619:
620: fnd_global.apps_initialize(fnd_profile.value('USER_ID'),
627: l_user_id := fnd_profile.value('USER_ID');
628: l_resp_id := fnd_profile.value('RESP_ID');
629: l_resp_appl_id := fnd_profile.value('RESP_APPL_ID');
630:
631: WF_ENGINE.setItemAttrText('CEBASIG',id,'ORG_ID',to_char(l_org_id));
632: WF_ENGINE.setItemAttrText('CEBASIG',id,'USER_ID',to_char(l_user_id));
633: WF_ENGINE.setItemAttrText('CEBASIG',id,'RESPONSIBILITY_ID',to_char(l_resp_id));
634: WF_ENGINE.setItemAttrText('CEBASIG',id,'APPLICATION_ID',to_char(l_resp_appl_id));
635:
628: l_resp_id := fnd_profile.value('RESP_ID');
629: l_resp_appl_id := fnd_profile.value('RESP_APPL_ID');
630:
631: WF_ENGINE.setItemAttrText('CEBASIG',id,'ORG_ID',to_char(l_org_id));
632: WF_ENGINE.setItemAttrText('CEBASIG',id,'USER_ID',to_char(l_user_id));
633: WF_ENGINE.setItemAttrText('CEBASIG',id,'RESPONSIBILITY_ID',to_char(l_resp_id));
634: WF_ENGINE.setItemAttrText('CEBASIG',id,'APPLICATION_ID',to_char(l_resp_appl_id));
635:
636: WF_ENGINE.STARTPROCESS('CEBASIG',
629: l_resp_appl_id := fnd_profile.value('RESP_APPL_ID');
630:
631: WF_ENGINE.setItemAttrText('CEBASIG',id,'ORG_ID',to_char(l_org_id));
632: WF_ENGINE.setItemAttrText('CEBASIG',id,'USER_ID',to_char(l_user_id));
633: WF_ENGINE.setItemAttrText('CEBASIG',id,'RESPONSIBILITY_ID',to_char(l_resp_id));
634: WF_ENGINE.setItemAttrText('CEBASIG',id,'APPLICATION_ID',to_char(l_resp_appl_id));
635:
636: WF_ENGINE.STARTPROCESS('CEBASIG',
637: id);
630:
631: WF_ENGINE.setItemAttrText('CEBASIG',id,'ORG_ID',to_char(l_org_id));
632: WF_ENGINE.setItemAttrText('CEBASIG',id,'USER_ID',to_char(l_user_id));
633: WF_ENGINE.setItemAttrText('CEBASIG',id,'RESPONSIBILITY_ID',to_char(l_resp_id));
634: WF_ENGINE.setItemAttrText('CEBASIG',id,'APPLICATION_ID',to_char(l_resp_appl_id));
635:
636: WF_ENGINE.STARTPROCESS('CEBASIG',
637: id);
638: COMMIT;
632: WF_ENGINE.setItemAttrText('CEBASIG',id,'USER_ID',to_char(l_user_id));
633: WF_ENGINE.setItemAttrText('CEBASIG',id,'RESPONSIBILITY_ID',to_char(l_resp_id));
634: WF_ENGINE.setItemAttrText('CEBASIG',id,'APPLICATION_ID',to_char(l_resp_appl_id));
635:
636: WF_ENGINE.STARTPROCESS('CEBASIG',
637: id);
638: COMMIT;
639: END startit;
640: