71:
72:
73: -- Do nothing in cancel or timeout mode
74: --
75: if (funcmode <> wf_engine.eng_run) then
76:
77: resultout := wf_engine.eng_null;
78: return; --do not raise the exception, as it would end the wflow.
79:
73: -- Do nothing in cancel or timeout mode
74: --
75: if (funcmode <> wf_engine.eng_run) then
76:
77: resultout := wf_engine.eng_null;
78: return; --do not raise the exception, as it would end the wflow.
79:
80: end if;
81:
86: -- document_type = 'POO';
87: -- else
88: -- document_type = 'POCO'
89:
90: l_doc_id := wf_engine.GetItemAttrNumber (itemtype => itemtype,
91: itemkey => itemkey,
92: aname => 'DOCUMENT_ID');
93:
94: l_doc_type := wf_engine.GetItemAttrText (itemtype => itemtype,
90: l_doc_id := wf_engine.GetItemAttrNumber (itemtype => itemtype,
91: itemkey => itemkey,
92: aname => 'DOCUMENT_ID');
93:
94: l_doc_type := wf_engine.GetItemAttrText (itemtype => itemtype,
95: itemkey => itemkey,
96: aname => 'DOCUMENT_TYPE');
97: begin
98: if l_doc_type = 'RELEASE' then
132: /* removed ecx_document.send . To avoid unnecessary dependency on ECX. */
133:
134:
135:
136: resultout := wf_engine.eng_completed || ':' || 'ACTIVITY_PERFORMED';
137: x_progress := 'PO_XML_DELIVERY.call_txn_delivery: 03';
138: IF (g_po_wf_debug = 'Y') THEN
139: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
140: END IF;
167: begin
168:
169: -- Do nothing in cancel or timeout mode
170: --
171: if (funcmode <> wf_engine.eng_run) then
172:
173: resultout := wf_engine.eng_null;
174: return; --do not raise the exception, as it would end the wflow.
175:
169: -- Do nothing in cancel or timeout mode
170: --
171: if (funcmode <> wf_engine.eng_run) then
172:
173: resultout := wf_engine.eng_null;
174: return; --do not raise the exception, as it would end the wflow.
175:
176: end if;
177:
175:
176: end if;
177:
178:
179: l_po_header_id := wf_engine.GetItemAttrNumber (itemtype => itemtype,
180: itemkey => itemkey,
181: aname => 'DOCUMENT_ID');
182: l_po_type := wf_engine.GetItemAttrText (itemtype => itemtype,
183: itemkey => itemkey,
178:
179: l_po_header_id := wf_engine.GetItemAttrNumber (itemtype => itemtype,
180: itemkey => itemkey,
181: aname => 'DOCUMENT_ID');
182: l_po_type := wf_engine.GetItemAttrText (itemtype => itemtype,
183: itemkey => itemkey,
184: aname => 'DOCUMENT_TYPE');
185: l_revision_num := wf_engine.GetItemAttrNumber (itemtype => itemtype,
186: itemkey => itemkey,
181: aname => 'DOCUMENT_ID');
182: l_po_type := wf_engine.GetItemAttrText (itemtype => itemtype,
183: itemkey => itemkey,
184: aname => 'DOCUMENT_TYPE');
185: l_revision_num := wf_engine.GetItemAttrNumber (itemtype => itemtype,
186: itemkey => itemkey,
187: aname => 'PO_REVISION_NUM');
188:
189:
223:
224: end if;
225:
226: --
227: wf_engine.SetItemAttrText ( itemtype => itemType,
228: itemkey => itemkey,
229: aname => 'PO_NUMBER' ,
230: avalue => l_po_number);
231: --
228: itemkey => itemkey,
229: aname => 'PO_NUMBER' ,
230: avalue => l_po_number);
231: --
232: wf_engine.SetItemAttrNumber ( itemtype => itemtype,
233: itemkey => itemkey,
234: aname => 'ORG_ID',
235: avalue => l_org_id);
236: --
233: itemkey => itemkey,
234: aname => 'ORG_ID',
235: avalue => l_org_id);
236: --
237: wf_engine.SetItemAttrNumber ( itemtype => itemtype,
238: itemkey => itemkey,
239: aname => 'ECX_PARTY_ID',
240: avalue => l_party_id);
241: --
238: itemkey => itemkey,
239: aname => 'ECX_PARTY_ID',
240: avalue => l_party_id);
241: --
242: wf_engine.SetItemAttrNumber ( itemtype => itemtype,
243: itemkey => itemkey,
244: aname => 'ECX_PARTY_SITE_ID',
245: avalue => l_party_site_id);
246: --
243: itemkey => itemkey,
244: aname => 'ECX_PARTY_SITE_ID',
245: avalue => l_party_site_id);
246: --
247: wf_engine.SetItemAttrText ( itemtype => itemType,
248: itemkey => itemkey,
249: aname => 'PO_DESCRIPTION' ,
250: avalue => l_po_desc);
251:
249: aname => 'PO_DESCRIPTION' ,
250: avalue => l_po_desc);
251:
252: --
253: wf_engine.SetItemAttrText ( itemtype => itemType,
254: itemkey => itemkey,
255: aname => 'DOCUMENT_SUBTYPE' ,
256: avalue => l_po_subtype);
257:
255: aname => 'DOCUMENT_SUBTYPE' ,
256: avalue => l_po_subtype);
257:
258: -- CLN scpecific attributes
259: wf_engine.SetItemAttrText ( itemtype => itemType,
260: itemkey => itemkey,
261: aname => 'XMLG_DOCUMENT_ID' ,
262: avalue => to_char(l_po_header_id));
263:
260: itemkey => itemkey,
261: aname => 'XMLG_DOCUMENT_ID' ,
262: avalue => to_char(l_po_header_id));
263:
264: wf_engine.SetItemAttrText ( itemtype => itemType,
265: itemkey => itemkey,
266: aname => 'TRADING_PARTNER_ID' ,
267: avalue => to_char(l_party_id));
268: wf_engine.SetItemAttrText ( itemtype => itemType,
264: wf_engine.SetItemAttrText ( itemtype => itemType,
265: itemkey => itemkey,
266: aname => 'TRADING_PARTNER_ID' ,
267: avalue => to_char(l_party_id));
268: wf_engine.SetItemAttrText ( itemtype => itemType,
269: itemkey => itemkey,
270: aname => 'TRADING_PARTNER_SITE' ,
271: avalue => to_char(l_party_site_id));
272:
272:
273:
274:
275: --
276: wf_engine.SetItemAttrText ( itemtype => itemType,
277: itemkey => itemkey,
278: aname => 'DOCUMENT_NO' ,
279: avalue => l_po_number);
280:
277: itemkey => itemkey,
278: aname => 'DOCUMENT_NO' ,
279: avalue => l_po_number);
280:
281: wf_engine.SetItemAttrText ( itemtype => itemType,
282: itemkey => itemkey,
283: aname => 'TRADING_PARTNER_TYPE' ,
284: avalue => 'S');
285: wf_engine.SetItemAttrText ( itemtype => itemType,
281: wf_engine.SetItemAttrText ( itemtype => itemType,
282: itemkey => itemkey,
283: aname => 'TRADING_PARTNER_TYPE' ,
284: avalue => 'S');
285: wf_engine.SetItemAttrText ( itemtype => itemType,
286: itemkey => itemkey,
287: aname => 'DOCUMENT_DIRECTION' ,
288: avalue => 'OUT');
289:
286: itemkey => itemkey,
287: aname => 'DOCUMENT_DIRECTION' ,
288: avalue => 'OUT');
289:
290: wf_engine.SetItemAttrText ( itemtype => itemType,
291: itemkey => itemkey,
292: aname => 'DOCUMENT_CREATION_DATE',
293: avalue => TO_CHAR(l_doc_creation_date,
294: 'YYYY/MM/DD HH24:MI:SS'));
335: BEGIN
336: -- dbms_output.put_line('here in set_delivery_date ' || itemkey);
337:
338: -- set the org context
339: x_org_id := wf_engine.GetItemAttrNumber ( itemtype => itemtype,
340: itemkey => itemkey,
341: aname => 'ORG_ID');
342: if (x_org_id is not null) then
343: PO_MOAC_UTILS_PVT.set_org_context(x_org_id) ; --
350:
351:
352: -- Do nothing in cancel or timeout mode
353: --
354: if (funcmode <> wf_engine.eng_run) then
355:
356: resultout := wf_engine.eng_null;
357: return; --do not raise the exception, as it would end the wflow.
358:
352: -- Do nothing in cancel or timeout mode
353: --
354: if (funcmode <> wf_engine.eng_run) then
355:
356: resultout := wf_engine.eng_null;
357: return; --do not raise the exception, as it would end the wflow.
358:
359: end if;
360:
366: -- document_type = 'POO';
367: -- else
368: -- document_type = 'POCO'
369:
370: l_doc_id := wf_engine.GetItemAttrNumber (itemtype => itemtype,
371: itemkey => itemkey,
372: aname => 'DOCUMENT_ID');
373:
374: l_doc_type := wf_engine.GetItemAttrText (itemtype => itemtype,
370: l_doc_id := wf_engine.GetItemAttrNumber (itemtype => itemtype,
371: itemkey => itemkey,
372: aname => 'DOCUMENT_ID');
373:
374: l_doc_type := wf_engine.GetItemAttrText (itemtype => itemtype,
375: itemkey => itemkey,
376: aname => 'DOCUMENT_TYPE');
377:
378: l_user_id := wf_engine.GetItemAttrNumber ( itemtype => itemtype,
374: l_doc_type := wf_engine.GetItemAttrText (itemtype => itemtype,
375: itemkey => itemkey,
376: aname => 'DOCUMENT_TYPE');
377:
378: l_user_id := wf_engine.GetItemAttrNumber ( itemtype => itemtype,
379: itemkey => itemkey,
380: aname => 'USER_ID');
381:
382: l_responsibility_id := wf_engine.GetItemAttrNumber ( itemtype => itemtype,
378: l_user_id := wf_engine.GetItemAttrNumber ( itemtype => itemtype,
379: itemkey => itemkey,
380: aname => 'USER_ID');
381:
382: l_responsibility_id := wf_engine.GetItemAttrNumber ( itemtype => itemtype,
383: itemkey => itemkey,
384: aname => 'RESPONSIBILITY_ID');
385: --bug#5442045
386: /*l_application_id := wf_engine.GetItemAttrNumber ( itemtype => itemtype,
382: l_responsibility_id := wf_engine.GetItemAttrNumber ( itemtype => itemtype,
383: itemkey => itemkey,
384: aname => 'RESPONSIBILITY_ID');
385: --bug#5442045
386: /*l_application_id := wf_engine.GetItemAttrNumber ( itemtype => itemtype,
387: itemkey => itemkey,
388: aname => 'APPLICATION_ID');*/
389:
390: l_application_id := wf_engine.GetItemAttrText ( itemtype => itemtype,
386: /*l_application_id := wf_engine.GetItemAttrNumber ( itemtype => itemtype,
387: itemkey => itemkey,
388: aname => 'APPLICATION_ID');*/
389:
390: l_application_id := wf_engine.GetItemAttrText ( itemtype => itemtype,
391: itemkey => itemkey,
392: aname => 'APPLICATION_ID');
393:
394: x_progress := 'PO_XML_DELIVERY.set_delivery_data : 01.1';
400: end if;
401:
402: x_progress := 'PO_XML_DELIVERY.set_delivery_data : 01.3';
403:
404: wf_engine.SetItemAttrText ( itemtype => itemtype,
405: itemkey => itemkey,
406: aname => 'APPLICATION_ID',
407: avalue => l_application_id);
408: --bug#5442045 ends
409:
410:
411: l_user_resp_appl := l_user_id || ':' || l_responsibility_id || ':' || l_application_id;
412:
413: l_po_num := wf_engine.GetItemAttrText ( itemtype => itemtype,
414: itemkey => itemkey,
415: aname => 'PO_NUMBER');
416:
417: begin
415: aname => 'PO_NUMBER');
416:
417: begin
418:
419: wf_engine.SetItemAttrText ( itemtype => itemtype,
420: itemkey => itemkey,
421: aname => 'ECX_TRANSACTION_TYPE',
422: avalue => 'PO');
423:
424: if l_doc_type = 'RELEASE' then
425:
426: l_doc_rel_id := l_doc_id;
427:
428: wf_engine.SetItemAttrText ( itemtype => itemtype,
429: itemkey => itemkey,
430: aname => 'ECX_PARAMETER1',
431: avalue => l_doc_id);
432:
463:
464: l_xml_event_key := to_char(l_doc_id) || '-' ||
465: to_char(l_wf_item_seq);
466:
467: wf_engine.SetItemAttrText ( itemtype => itemType,
468: itemkey => itemkey,
469: aname => 'XML_EVENT_KEY',
470: avalue => l_xml_event_key);
471:
468: itemkey => itemkey,
469: aname => 'XML_EVENT_KEY',
470: avalue => l_xml_event_key);
471:
472: wf_engine.SetItemAttrText ( itemtype => itemType,
473: itemkey => itemkey,
474: aname => 'ECX_PARAMETER2',
475: avalue => to_char(l_revision_num));
476:
475: avalue => to_char(l_revision_num));
476:
477: l_trnx_doc_id := l_po_num||':'||l_revision_num||':'||to_char(x_org_id);
478:
479: wf_engine.SetItemAttrText ( itemtype => itemType,
480: itemkey => itemkey,
481: aname => 'ECX_DOCUMENT_ID',
482: avalue => l_trnx_doc_id);
483:
481: aname => 'ECX_DOCUMENT_ID',
482: avalue => l_trnx_doc_id);
483:
484:
485: wf_engine.SetItemAttrText ( itemtype => itemType,
486: itemkey => itemkey,
487: aname => 'ECX_PARTY_ID',
488: avalue => to_char(l_vendor_id));
489:
486: itemkey => itemkey,
487: aname => 'ECX_PARTY_ID',
488: avalue => to_char(l_vendor_id));
489:
490: wf_engine.SetItemAttrText ( itemtype => itemType,
491: itemkey => itemkey,
492: aname => 'ECX_PARTY_SITE_ID',
493: avalue => to_char(l_vendor_site_id));
494:
491: itemkey => itemkey,
492: aname => 'ECX_PARTY_SITE_ID',
493: avalue => to_char(l_vendor_site_id));
494:
495: wf_engine.SetItemAttrText ( itemtype => itemType,
496: itemkey => itemkey,
497: aname => 'ECX_PARAMETER3',
498: avalue => l_user_resp_appl);
499:
496: itemkey => itemkey,
497: aname => 'ECX_PARAMETER3',
498: avalue => l_user_resp_appl);
499:
500: wf_engine.SetItemAttrText ( itemtype => itemType,
501: itemkey => itemkey,
502: aname => 'ECX_PARAMETER4',
503: avalue => to_char(l_doc_id));
504:
502: aname => 'ECX_PARAMETER4',
503: avalue => to_char(l_doc_id));
504:
505:
506: wf_engine.SetItemAttrText ( itemtype => itemType,
507: itemkey => itemkey,
508: aname => 'ECX_PARAMETER5',
509: avalue => to_char(x_org_id));
510:
509: avalue => to_char(x_org_id));
510:
511:
512:
513: wf_engine.SetItemAttrText ( itemtype => itemType,
514: itemkey => itemkey,
515: aname => 'XMLG_INTERNAL_TXN_TYPE' ,
516: avalue => 'PO');
517:
517:
518:
519:
520: if nvl(l_revision_num,0)=0 then
521: wf_engine.SetItemAttrText ( itemtype => itemtype,
522: itemkey => itemkey,
523: aname => 'ECX_TRANSACTION_SUBTYPE',
524: avalue => 'PRO');
525: wf_engine.SetItemAttrText ( itemtype => itemType,
521: wf_engine.SetItemAttrText ( itemtype => itemtype,
522: itemkey => itemkey,
523: aname => 'ECX_TRANSACTION_SUBTYPE',
524: avalue => 'PRO');
525: wf_engine.SetItemAttrText ( itemtype => itemType,
526: itemkey => itemkey,
527: aname => 'XMLG_INTERNAL_TXN_SUBTYPE' ,
528: avalue => 'PRO');
529: else
533: -- If yes, check if a rosettanet txn is defined for the supplier
534: -- and set the transaction type, subtype accordingly
535: if nvl(l_cancel_flag,'N') = 'Y' and isRosettaNetTxn(l_vendor_id, l_vendor_site_id) then
536:
537: wf_engine.SetItemAttrText ( itemtype => itemtype,
538: itemkey => itemkey,
539: aname => 'ECX_TRANSACTION_TYPE',
540: avalue => 'M4R');
541:
538: itemkey => itemkey,
539: aname => 'ECX_TRANSACTION_TYPE',
540: avalue => 'M4R');
541:
542: wf_engine.SetItemAttrText ( itemtype => itemType,
543: itemkey => itemkey,
544: aname => 'XMLG_INTERNAL_TXN_TYPE' ,
545: avalue => 'M4R');
546:
543: itemkey => itemkey,
544: aname => 'XMLG_INTERNAL_TXN_TYPE' ,
545: avalue => 'M4R');
546:
547: wf_engine.SetItemAttrText ( itemtype => itemtype,
548: itemkey => itemkey,
549: aname => 'ECX_TRANSACTION_SUBTYPE',
550: avalue => 'CANCELPO_REQ');
551:
548: itemkey => itemkey,
549: aname => 'ECX_TRANSACTION_SUBTYPE',
550: avalue => 'CANCELPO_REQ');
551:
552: wf_engine.SetItemAttrText ( itemtype => itemType,
553: itemkey => itemkey,
554: aname => 'XMLG_INTERNAL_TXN_SUBTYPE',
555: avalue => 'CANCELPO_REQ');
556:
555: avalue => 'CANCELPO_REQ');
556:
557: else
558:
559: wf_engine.SetItemAttrText ( itemtype => itemtype,
560: itemkey => itemkey,
561: aname => 'ECX_TRANSACTION_SUBTYPE',
562: avalue => 'POCO');
563:
560: itemkey => itemkey,
561: aname => 'ECX_TRANSACTION_SUBTYPE',
562: avalue => 'POCO');
563:
564: wf_engine.SetItemAttrText ( itemtype => itemType,
565: itemkey => itemkey,
566: aname => 'XMLG_INTERNAL_TXN_SUBTYPE' ,
567: avalue => 'POCO');
568: end if;
567: avalue => 'POCO');
568: end if;
569: end if;
570:
571: resultout := wf_engine.eng_completed || ':' || 'ACTIVITY_PERFORMED';
572: x_progress := 'PO_XML_DELIVERY.set_delivery_data: 03';
573: IF (g_po_wf_debug = 'Y') THEN
574: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
575: END IF;
617: END IF;
618:
619: -- Do nothing in cancel or timeout mode
620: --
621: if (funcmode <> wf_engine.eng_run) then
622:
623: resultout := wf_engine.eng_null;
624: return; --do not raise the exception, as it would end the wflow.
625:
619: -- Do nothing in cancel or timeout mode
620: --
621: if (funcmode <> wf_engine.eng_run) then
622:
623: resultout := wf_engine.eng_null;
624: return; --do not raise the exception, as it would end the wflow.
625:
626: end if;
627:
627:
628: --
629: -- Retreive Activity Attributes
630: --
631: transaction_type := Wf_Engine.GetActivityAttrText(itemtype, itemkey, actid, 'ECX_TRANSACTION_TYPE');
632:
633: if ( transaction_type is null ) then
634: wf_core.token('ECX_TRANSACTION_TYPE','NULL');
635: wf_core.raise('WFSQL_ARGS');
634: wf_core.token('ECX_TRANSACTION_TYPE','NULL');
635: wf_core.raise('WFSQL_ARGS');
636: end if;
637: --
638: transaction_subtype := Wf_Engine.GetActivityAttrText(itemtype, itemkey, actid, 'ECX_TRANSACTION_SUBTYPE');
639:
640: if ( transaction_subtype is null ) then
641: wf_core.token('ECX_TRANSACTION_SUBTYPE','NULL');
642: wf_core.raise('WFSQL_ARGS');
642: wf_core.raise('WFSQL_ARGS');
643: end if;
644:
645: --
646: party_site_id := Wf_Engine.GetActivityAttrText(itemtype, itemkey, actid, 'ECX_PARTY_SITE_ID');
647:
648: if ( party_site_id is null ) then
649: wf_core.token('ECX_PARTY_SITE_ID','NULL');
650: wf_core.raise('WFSQL_ARGS');
652:
653: --
654: -- party_id is optional. Only party_site_id is required
655: --
656: party_id := Wf_Engine.GetActivityAttrText(itemtype, itemkey, actid, 'ECX_PARTY_ID');
657: --
658:
659: ecx_document.isDeliveryRequired
660: (
674: -- Reached Here. Successful execution.
675:
676: resultout := 'COMPLETE:T';
677:
678: l_document_type := wf_engine.GetItemAttrText (itemtype => itemtype,
679: itemkey => itemkey,
680: aname => 'DOCUMENT_TYPE');
681:
682: l_document_subtype := wf_engine.GetItemAttrText (itemtype => itemtype,
678: l_document_type := wf_engine.GetItemAttrText (itemtype => itemtype,
679: itemkey => itemkey,
680: aname => 'DOCUMENT_TYPE');
681:
682: l_document_subtype := wf_engine.GetItemAttrText (itemtype => itemtype,
683: itemkey => itemkey,
684: aname => 'DOCUMENT_SUBTYPE');
685:
686: l_document_id := wf_engine.GetItemAttrNumber (itemtype => itemtype,
682: l_document_subtype := wf_engine.GetItemAttrText (itemtype => itemtype,
683: itemkey => itemkey,
684: aname => 'DOCUMENT_SUBTYPE');
685:
686: l_document_id := wf_engine.GetItemAttrNumber (itemtype => itemtype,
687: itemkey => itemkey,
688: aname => 'DOCUMENT_ID');
689:
690: --
736: l_buyer_user_name varchar2(100);
737: x_progress VARCHAR2(100) := '000';
738: BEGIN
739: x_progress := 'PO_XML_DELIVERY.is_xml_chosen : 01';
740: if (funcmode <> wf_engine.eng_run) then
741:
742: resultout := wf_engine.eng_null;
743: return; --do not raise the exception, as it would end the wflow.
744:
738: BEGIN
739: x_progress := 'PO_XML_DELIVERY.is_xml_chosen : 01';
740: if (funcmode <> wf_engine.eng_run) then
741:
742: resultout := wf_engine.eng_null;
743: return; --do not raise the exception, as it would end the wflow.
744:
745: end if;
746: resultout := 'COMPLETE:F';
743: return; --do not raise the exception, as it would end the wflow.
744:
745: end if;
746: resultout := 'COMPLETE:F';
747: l_doc_id := wf_engine.GetItemAttrNumber (itemtype => itemtype,
748: itemkey => itemkey,
749: aname => 'DOCUMENT_ID');
750:
751:
748: itemkey => itemkey,
749: aname => 'DOCUMENT_ID');
750:
751:
752: l_doc_type := wf_engine.GetItemAttrText (itemtype => itemtype,
753: itemkey => itemkey,
754: aname => 'DOCUMENT_TYPE');
755:
756: x_progress := 'PO_XML_DELIVERY.is_xml_chosen : 02';
1349: l_document_type varchar2(15);
1350:
1351: begin
1352:
1353: l_doc_id := wf_engine.GetItemAttrNumber (itemtype => itemtype,
1354: itemkey => itemkey,
1355: aname => 'DOCUMENT_ID');
1356:
1357:
1361:
1362: l_xml_event_key := to_char(l_doc_id) || '-' ||
1363: to_char(l_wf_item_seq);
1364:
1365: wf_engine.SetItemAttrText ( itemtype => itemType,
1366: itemkey => itemkey,
1367: aname => 'XML_EVENT_KEY',
1368: avalue => l_xml_event_key);
1369:
1399:
1400: begin
1401:
1402: x_progress := 'PO_XML_DELIVERY.setwfUserKey : 01';
1403: l_document_id := to_number(wf_engine.GetItemAttrText (itemtype => itemtype,
1404: itemkey => itemkey,
1405: aname => 'ECX_DOCUMENT_ID'));
1406:
1407: l_release_id := to_number(wf_engine.GetItemAttrText (itemtype => itemtype,
1403: l_document_id := to_number(wf_engine.GetItemAttrText (itemtype => itemtype,
1404: itemkey => itemkey,
1405: aname => 'ECX_DOCUMENT_ID'));
1406:
1407: l_release_id := to_number(wf_engine.GetItemAttrText (itemtype => itemtype,
1408: itemkey => itemkey,
1409: aname => 'ECX_PARAMETER1'));
1410: l_revision_num := to_number(wf_engine.GetItemAttrText (itemtype => itemtype,
1411: itemkey => itemkey,
1406:
1407: l_release_id := to_number(wf_engine.GetItemAttrText (itemtype => itemtype,
1408: itemkey => itemkey,
1409: aname => 'ECX_PARAMETER1'));
1410: l_revision_num := to_number(wf_engine.GetItemAttrText (itemtype => itemtype,
1411: itemkey => itemkey,
1412: aname => 'ECX_PARAMETER2'));
1413:
1414: x_progress := 'PO_XML_DELIVERY.setwfUserKey : 02';
1438: end if;
1439: x_progress := 'PO_XML_DELIVERY.setwfUserKey : 05';
1440:
1441:
1442: wf_engine.SetItemUserKey(itemtype => itemtype,
1443: itemkey => itemkey,
1444: userkey => l_user_key);
1445: x_progress := 'PO_XML_DELIVERY.setwfUserKey : 06';
1446:
1447: resultout := 'COMPLETE:T';
1448: wf_core.context('PO_XML_DELIVERY','setwfUserKey','completed');
1449:
1450: exception when others then
1451: wf_engine.SetItemUserKey(itemtype => itemtype,
1452: itemkey => itemkey,
1453: userkey => 'Cannot set item key');
1454: wf_core.context('PO_XML_DELIVERY','setwfUserKey',x_progress || ':' || to_char(l_document_id));
1455:
1708:
1709:
1710: -- Do nothing in cancel or timeout mode
1711: --
1712: if (funcmode <> wf_engine.eng_run) then
1713:
1714: resultout := wf_engine.eng_null;
1715: return; --do not raise the exception, as it would end the wflow.
1716:
1710: -- Do nothing in cancel or timeout mode
1711: --
1712: if (funcmode <> wf_engine.eng_run) then
1713:
1714: resultout := wf_engine.eng_null;
1715: return; --do not raise the exception, as it would end the wflow.
1716:
1717: end if;
1718:
1757: (l_resp_id = l_cur_resp_id or (l_resp_id is null and l_cur_resp_id is null)) and
1758: (l_appl_id = l_cur_appl_id or (l_appl_id is null and l_cur_appl_id is null))
1759: )
1760: ) then
1761: resultout := wf_engine.eng_completed || ':' || 'ACTIVITY_IGNORED';
1762: else
1763: FND_GLOBAL.apps_initialize( user_id => l_user_id,
1764: resp_id => l_resp_id,
1765: resp_appl_id => l_appl_id);
1763: FND_GLOBAL.apps_initialize( user_id => l_user_id,
1764: resp_id => l_resp_id,
1765: resp_appl_id => l_appl_id);
1766:
1767: resultout := wf_engine.eng_completed || ':' || 'ACTIVITY_PERFORMED';
1768: end if;
1769:
1770: x_progress := 'PO_XML_DELIVERY.set_user_context: 004 ' || resultout;
1771: IF (g_po_wf_debug = 'Y') THEN
1774:
1775: EXCEPTION
1776: WHEN OTHERS THEN
1777: wf_core.context('PO_XML_DELIVERY','set_user_context',x_progress);
1778: resultout := wf_engine.eng_completed || ':' || 'SET CONTEXT ERROR';
1779: return;
1780: END set_user_context;
1781:
1782: /*bug#6912518*/