DBA Data[Home] [Help]

APPS.WF_ITEM_ACTIVITY_STATUS dependencies on WF_ENGINE

Line 68: if (itemkey = wf_engine.eng_synch) then

64: return;
65: end if;
66:
67: -- SYNCHMODE: Error if this is not current activity.
68: if (itemkey = wf_engine.eng_synch) then
69: Wf_Core.Token('ITEMTYPE', itemtype);
70: Wf_Core.Token('ITEMKEY', itemkey);
71: Wf_Core.Token('ACTID', to_char(actid));
72: Wf_Core.Raise('WFSQL_INTERNAL');

Line 154: if (Wf_Engine.Debug) then

150: wf_item_activity_status.c_assigned_user := user;
151: wf_item_activity_status.c_notification_id := notid;
152: end if;
153:
154: if (Wf_Engine.Debug) then
155: commit;
156: end if;
157: exception
158: when OTHERS then

Line 464: if (itemkey = wf_engine.eng_synch) then

460: -- original error.
461:
462: -- SYNCHMODE: This should NEVER happen in synchmode, since
463: -- error processes are not allowed.
464: if (itemkey = wf_engine.eng_synch) then
465: wf_core.token('OPERATION',
466: 'Wf_Item_Activity_Status.Set_Error(error_process)');
467: wf_core.raise('WFENG_SYNCH_DISABLED');
468: end if;

Line 520: wf_item_activity_status.c_status := wf_engine.eng_error;

516:
517: wf_item_activity_status.c_errname := errname;
518: wf_item_activity_status.c_errmsg := errmsg;
519: wf_item_activity_status.c_errstack := errstack;
520: wf_item_activity_status.c_status := wf_engine.eng_error;
521: wf_item_activity_status.c_result := errcode;
522:
523: end if;
524:

Line 529: if (itemkey = wf_engine.eng_synch) then

525: -- SYNCHMODE: In synch mode stop after updating internal cache.
526: -- Note the ONLY place this should be called in synchmode
527: -- is function_call or execute_activity if an activity raises
528: -- an unhandled exception.
529: if (itemkey = wf_engine.eng_synch) then
530: return;
531: end if;
532:
533: -- Store error info and set status/result

Line 537: ACTIVITY_STATUS = wf_engine.eng_error,

533: -- Store error info and set status/result
534:
535: update
536: WF_ITEM_ACTIVITY_STATUSES set
537: ACTIVITY_STATUS = wf_engine.eng_error,
538: ACTIVITY_RESULT_CODE = errcode,
539: ERROR_NAME = errname,
540: ERROR_MESSAGE = errmsg,
541: ERROR_STACK = errstack

Line 567: if (Wf_Engine.Debug) then

563: and rownum < 2;
564: --raise NO_DATA_FOUND;
565: end if;
566:
567: if (Wf_Engine.Debug) then
568: commit;
569: end if;
570: exception
571: when NO_DATA_FOUND then

Line 613: if (Wf_Engine.Debug) then

609: wf_item_activity_status.c_itemkey := '';
610: wf_item_activity_status.c_actid := '';
611: end if;
612:
613: if (Wf_Engine.Debug) then
614: commit;
615: end if;
616: exception
617: when OTHERS then

Line 670: if (itemkey = wf_engine.eng_synch) then

666: -- status flags
667: l_newStatus boolean default FALSE;
668:
669: begin
670: if (itemkey = wf_engine.eng_synch) then
671:
672: -- SYNCHMODE: Only update runtime cache.
673: if ((wf_item_activity_status.c_itemtype = itemtype) and
674: (wf_item_activity_status.c_itemkey = itemkey) and

Line 712: timeout := Wf_Engine.GetActivityAttrNumber(itemtype, itemkey,

708: -- Calculate new timeout date if begin_date is being changed.
709: if (beginning is not null) then
710: begin
711: -- 1. Look first for a '#TIMEOUT' NUMBER attribute
712: timeout := Wf_Engine.GetActivityAttrNumber(itemtype, itemkey,
713: actid, wf_engine.eng_timeout_attr,
714: ignore_notfound=>TRUE);
715:
716: if (nvl(timeout, 0) <> 0) then

Line 713: actid, wf_engine.eng_timeout_attr,

709: if (beginning is not null) then
710: begin
711: -- 1. Look first for a '#TIMEOUT' NUMBER attribute
712: timeout := Wf_Engine.GetActivityAttrNumber(itemtype, itemkey,
713: actid, wf_engine.eng_timeout_attr,
714: ignore_notfound=>TRUE);
715:
716: if (nvl(timeout, 0) <> 0) then
717: -- Figure duedate as offset from begin time.

Line 723: duedate := Wf_Engine.GetActivityAttrDate(itemtype, itemkey,

719: -- all other 'date as number' values, thus the 1440 fudge factor.
720: duedate := beginning + (timeout / 1440);
721: else
722: -- 2. Look for a '#TIMEOUT' DATE attribute
723: duedate := Wf_Engine.GetActivityAttrDate(itemtype, itemkey,
724: actid, wf_engine.eng_timeout_attr,
725: ignore_notfound=>TRUE);
726: end if;
727: exception

Line 724: actid, wf_engine.eng_timeout_attr,

720: duedate := beginning + (timeout / 1440);
721: else
722: -- 2. Look for a '#TIMEOUT' DATE attribute
723: duedate := Wf_Engine.GetActivityAttrDate(itemtype, itemkey,
724: actid, wf_engine.eng_timeout_attr,
725: ignore_notfound=>TRUE);
726: end if;
727: exception
728: when others then

Line 742: if create_status.status = wf_engine.eng_deferred

738:
739: -- DEFERRED QUEUE PROCESSING
740: -- if deferred, insert into the deferred queue
741: -- but not if parent is SUSPENDED or we get infinite loop in queue
742: if create_status.status = wf_engine.eng_deferred
743: and (not create_status.suspended )then
744:
745: act_fname:= Wf_Activity.activity_function(itemtype,itemkey,actid);
746: act_ftype:= Wf_Activity.activity_function_type(itemtype,itemkey,actid);

Line 793: wf_engine.eng_error, wf_engine.eng_exception,

789: exception
790: when others then
791: -- If any error while enqueing, set the activity status to ERROR
792: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, actid,
793: wf_engine.eng_error, wf_engine.eng_exception,
794: sysdate, null, newStatus=>TRUE);
795: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actid,
796: wf_engine.eng_exception, FALSE);
797: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actid,

Line 796: wf_engine.eng_exception, FALSE);

792: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, actid,
793: wf_engine.eng_error, wf_engine.eng_exception,
794: sysdate, null, newStatus=>TRUE);
795: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actid,
796: wf_engine.eng_exception, FALSE);
797: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actid,
798: wf_engine.eng_exception);
799: return;
800: end;

Line 797: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actid,

793: wf_engine.eng_error, wf_engine.eng_exception,
794: sysdate, null, newStatus=>TRUE);
795: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actid,
796: wf_engine.eng_exception, FALSE);
797: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actid,
798: wf_engine.eng_exception);
799: return;
800: end;
801: end if;

Line 798: wf_engine.eng_exception);

794: sysdate, null, newStatus=>TRUE);
795: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actid,
796: wf_engine.eng_exception, FALSE);
797: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actid,
798: wf_engine.eng_exception);
799: return;
800: end;
801: end if;
802:

Line 824: wf_engine.eng_active, g_ExecCounter,

820: create_status.duedate),
821: OUTBOUND_QUEUE_ID = msg_id,
822: EXECUTION_TIME =
823: decode(create_status.status,
824: wf_engine.eng_active, g_ExecCounter,
825: wf_engine.eng_completed, nvl(EXECUTION_TIME, g_ExecCounter),
826: wf_engine.eng_error, nvl(EXECUTION_TIME, g_ExecCounter),
827: EXECUTION_TIME)
828: where ITEM_TYPE = create_status.itemtype

Line 825: wf_engine.eng_completed, nvl(EXECUTION_TIME, g_ExecCounter),

821: OUTBOUND_QUEUE_ID = msg_id,
822: EXECUTION_TIME =
823: decode(create_status.status,
824: wf_engine.eng_active, g_ExecCounter,
825: wf_engine.eng_completed, nvl(EXECUTION_TIME, g_ExecCounter),
826: wf_engine.eng_error, nvl(EXECUTION_TIME, g_ExecCounter),
827: EXECUTION_TIME)
828: where ITEM_TYPE = create_status.itemtype
829: and ITEM_KEY = create_status.itemkey

Line 826: wf_engine.eng_error, nvl(EXECUTION_TIME, g_ExecCounter),

822: EXECUTION_TIME =
823: decode(create_status.status,
824: wf_engine.eng_active, g_ExecCounter,
825: wf_engine.eng_completed, nvl(EXECUTION_TIME, g_ExecCounter),
826: wf_engine.eng_error, nvl(EXECUTION_TIME, g_ExecCounter),
827: EXECUTION_TIME)
828: where ITEM_TYPE = create_status.itemtype
829: and ITEM_KEY = create_status.itemkey
830: and PROCESS_ACTIVITY = create_status.actid;

Line 862: wf_engine.eng_active, g_ExecCounter,

858: create_status.beginning,
859: create_status.ending,
860: create_status.duedate,
861: decode(create_status.status,
862: wf_engine.eng_active, g_ExecCounter,
863: wf_engine.eng_completed, g_ExecCounter,
864: wf_engine.eng_error, g_ExecCounter,
865: null),
866: create_status.msg_id

Line 863: wf_engine.eng_completed, g_ExecCounter,

859: create_status.ending,
860: create_status.duedate,
861: decode(create_status.status,
862: wf_engine.eng_active, g_ExecCounter,
863: wf_engine.eng_completed, g_ExecCounter,
864: wf_engine.eng_error, g_ExecCounter,
865: null),
866: create_status.msg_id
867: );

Line 864: wf_engine.eng_error, g_ExecCounter,

860: create_status.duedate,
861: decode(create_status.status,
862: wf_engine.eng_active, g_ExecCounter,
863: wf_engine.eng_completed, g_ExecCounter,
864: wf_engine.eng_error, g_ExecCounter,
865: null),
866: create_status.msg_id
867: );
868:

Line 904: wf_engine.eng_active, g_ExecCounter,

900: to_date(NULL), DUE_DATE,
901: create_status.duedate),
902: OUTBOUND_QUEUE_ID = msg_id,
903: EXECUTION_TIME = decode(create_status.status,
904: wf_engine.eng_active, g_ExecCounter,
905: wf_engine.eng_completed, nvl(EXECUTION_TIME,
906: g_ExecCounter),
907: wf_engine.eng_error, nvl(EXECUTION_TIME,
908: g_ExecCounter),

Line 905: wf_engine.eng_completed, nvl(EXECUTION_TIME,

901: create_status.duedate),
902: OUTBOUND_QUEUE_ID = msg_id,
903: EXECUTION_TIME = decode(create_status.status,
904: wf_engine.eng_active, g_ExecCounter,
905: wf_engine.eng_completed, nvl(EXECUTION_TIME,
906: g_ExecCounter),
907: wf_engine.eng_error, nvl(EXECUTION_TIME,
908: g_ExecCounter),
909: EXECUTION_TIME)

Line 907: wf_engine.eng_error, nvl(EXECUTION_TIME,

903: EXECUTION_TIME = decode(create_status.status,
904: wf_engine.eng_active, g_ExecCounter,
905: wf_engine.eng_completed, nvl(EXECUTION_TIME,
906: g_ExecCounter),
907: wf_engine.eng_error, nvl(EXECUTION_TIME,
908: g_ExecCounter),
909: EXECUTION_TIME)
910: where ITEM_TYPE = create_status.itemtype
911: and ITEM_KEY = create_status.itemkey

Line 941: if (status = wf_engine.eng_completed) then

937: -- then also update the end_date of the item.
938: Wf_Item.Root_Process(itemtype, itemkey, root, version);
939: rootid := Wf_Process_Activity.RootInstanceId(itemtype, itemkey, root);
940: if (actid = rootid) then
941: if (status = wf_engine.eng_completed) then
942: l_result := WF_ITEM.SetEndDate(itemtype, itemkey);
943: elsif (status = wf_engine.eng_active) then
944: UPDATE WF_ITEMS SET
945: END_DATE = to_date(NULL)

Line 943: elsif (status = wf_engine.eng_active) then

939: rootid := Wf_Process_Activity.RootInstanceId(itemtype, itemkey, root);
940: if (actid = rootid) then
941: if (status = wf_engine.eng_completed) then
942: l_result := WF_ITEM.SetEndDate(itemtype, itemkey);
943: elsif (status = wf_engine.eng_active) then
944: UPDATE WF_ITEMS SET
945: END_DATE = to_date(NULL)
946: WHERE ITEM_TYPE = itemtype
947: AND ITEM_KEY = itemkey;

Line 958: if (Wf_Engine.Debug) then

954: --if (WF_HA_MIGRATION.GET_CACHED_HA_MAINT_MODE = 'MAINT') then
955: -- WF_HA_MIGRATION.SET_HA_FLAG(itemtype, itemkey);
956: --end if;
957:
958: if (Wf_Engine.Debug) then
959: commit;
960: end if;
961: exception
962: when OTHERS then