DBA Data[Home] [Help]

APPS.WF_ENGINE dependencies on WF_ENGINE_UTIL

Line 3283: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid, result);

3279: NULL;
3280:
3281: end if;
3282:
3283: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid, result);
3284: exception
3285: when trig_savepoint or dist_savepoint then
3286: -- Savepoint violation.
3287: -- Try without fancy error processing.

Line 3288: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid, result);

3284: exception
3285: when trig_savepoint or dist_savepoint then
3286: -- Savepoint violation.
3287: -- Try without fancy error processing.
3288: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid, result);
3289: when others then
3290: -- If anything in this process raises an exception:
3291: -- 1. rollback any work in this process thread
3292: -- 2. set this activity to error status

Line 3302: Wf_Engine_Util.Execute_Error_Process(itemtype,

3298: attr_type, ':'||text_value||':'||to_char(number_value)||':'||
3299: to_char(date_value)||':');
3300: Wf_Item_Activity_Status.Set_Error(itemtype,
3301: itemkey, actid, wf_engine.eng_exception, FALSE);
3302: Wf_Engine_Util.Execute_Error_Process(itemtype,
3303: itemkey, actid, wf_engine.eng_exception);
3304: Wf_Core.Clear;
3305: end;
3306: elsif (upper(command) = wf_engine.eng_error) then

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

3308: -- Set the error status
3309: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actid,
3310: wf_engine.eng_mail, FALSE);
3311: -- Run any error process for the activity
3312: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actid,
3313: wf_engine.eng_mail);
3314: elsif (upper(command) = 'TESTCTX') then
3315: -- Call selector function in test mode
3316: -- Return true if result is either true or null (means context

Line 3318: result := Wf_Engine_Util.Execute_Selector_Function(itemtype,

3314: elsif (upper(command) = 'TESTCTX') then
3315: -- Call selector function in test mode
3316: -- Return true if result is either true or null (means context
3317: -- test not implemented)
3318: result := Wf_Engine_Util.Execute_Selector_Function(itemtype,
3319: itemkey, wf_engine.eng_testctx);
3320: text_value := nvl(result, 'TRUE');
3321: elsif (upper(command) = 'SETCTX') then
3322: -- Call selector function in set mode

Line 3323: result := Wf_Engine_Util.Execute_Selector_Function(itemtype,

3319: itemkey, wf_engine.eng_testctx);
3320: text_value := nvl(result, 'TRUE');
3321: elsif (upper(command) = 'SETCTX') then
3322: -- Call selector function in set mode
3323: result := Wf_Engine_Util.Execute_Selector_Function(itemtype,
3324: itemkey, wf_engine.eng_setctx);
3325: elsif (upper(command) in ('FORWARD', 'TRANSFER', 'RESPOND',
3326: 'ANSWER', 'QUESTION', 'VALIDATE')) then
3327: -- FORWARD/TRANSFER/RESPOND/ANSWER/QUESTION/VALIDATE

Line 3338: Wf_Engine_Util.Execute_Notification_Callback(command, itemtype,

3334: -- 2. The callback function will raise an exception if the
3335: -- operation isn't allowed. If so, allow the exception to raise
3336: -- up to the calling function.
3337:
3338: Wf_Engine_Util.Execute_Notification_Callback(command, itemtype,
3339: itemkey, actid, number_value, text_value);
3340:
3341: -- For TRANSFER mode only, reset the assigned user, but only
3342: -- if not a voting activity

Line 3571: Wf_Engine_Util.Execute_Post_NTF_Function(l_itemtype, l_itemkey,

3567: savepoint wf_savepoint;
3568: -- If there is a function attached, call it in timeout mode to
3569: -- give the function one last chance to complete and override
3570: -- the timeout.
3571: Wf_Engine_Util.Execute_Post_NTF_Function(l_itemtype, l_itemkey,
3572: l_actid, wf_engine.eng_timeout, pntfstatus, pntfresult);
3573: if (pntfstatus = wf_engine.eng_completed) then
3574: -- Post-notification function found and returned a completed
3575: -- status.

Line 3577: Wf_Engine_Util.Complete_Activity(l_itemtype, l_itemkey, l_actid,

3573: if (pntfstatus = wf_engine.eng_completed) then
3574: -- Post-notification function found and returned a completed
3575: -- status.
3576: -- Complete activity with result of post-notification function.
3577: Wf_Engine_Util.Complete_Activity(l_itemtype, l_itemkey, l_actid,
3578: pntfresult, FALSE);
3579: else
3580: -- Either had no post-notification function, or result was still
3581: -- not complete.

Line 3583: Wf_Engine_Util.Complete_Activity(l_itemtype, l_itemkey, l_actid,

3579: else
3580: -- Either had no post-notification function, or result was still
3581: -- not complete.
3582: -- In either case, complete activity with #TIMEOUT.
3583: Wf_Engine_Util.Complete_Activity(l_itemtype, l_itemkey, l_actid,
3584: wf_engine.eng_timedout);
3585: end if;
3586: exception
3587: when others then

Line 3611: Wf_Engine_Util.Execute_Error_Process(l_itemtype, l_itemkey,

3607: Wf_Core.Context('Wf_Engine', 'ProcessTimeout', l_itemkey, l_itemtype,
3608: to_char(l_actid));
3609: Wf_Item_Activity_Status.Set_Error(l_itemtype, l_itemkey, l_actid,
3610: wf_engine.eng_exception, FALSE);
3611: Wf_Engine_Util.Execute_Error_Process(l_itemtype, l_itemkey,
3612: l_actid, wf_engine.eng_exception);
3613: Wf_Core.Clear;
3614: end;
3615: end if;

Line 3804: Wf_Engine_Util.Execute_Error_Process(l_itemtype, l_itemkey, l_actid,

3800: begin
3801: begin
3802: begin
3803: savepoint wf_savepoint;
3804: Wf_Engine_Util.Execute_Error_Process(l_itemtype, l_itemkey, l_actid,
3805: wf_engine.eng_stuck);
3806: exception
3807: when others then
3808: -- If anything in this process raises an exception:

Line 3831: Wf_Engine_Util.Execute_Error_Process(l_itemtype, l_itemkey,

3827: Wf_Core.Context('Wf_Engine', 'ProcessStuckProcess', l_itemkey,
3828: l_itemtype, to_char(l_actid));
3829: Wf_Item_Activity_Status.Set_Error(l_itemtype, l_itemkey, l_actid,
3830: wf_engine.eng_exception, FALSE);
3831: Wf_Engine_Util.Execute_Error_Process(l_itemtype, l_itemkey,
3832: l_actid, wf_engine.eng_exception);
3833: Wf_Core.Clear;
3834: end;
3835:

Line 4131: root := Wf_Engine_Util.Get_Root_Process(itemtype, itemkey);

4127: end if;
4128:
4129: if (process is null) then
4130: -- Call the selector function to get the process
4131: root := Wf_Engine_Util.Get_Root_Process(itemtype, itemkey);
4132: if (root is null) then
4133: Wf_Core.Token('TYPE', itemtype);
4134: Wf_Core.Token('KEY', itemkey);
4135: Wf_Core.Raise('WFENG_ITEM_ROOT_SELECTOR');

Line 4223: Wf_Engine_Util.Start_Process_Internal(

4219: if (WF_CACHE.MetaRefreshed) then
4220: null;
4221: end if;
4222: --Bug 2259039
4223: Wf_Engine_Util.Start_Process_Internal(
4224: itemtype=> itemtype,
4225: itemkey => itemkey,
4226: runmode => 'START');
4227: exception

Line 4405: Wf_Engine_Util.Suspend_Child_Processes(itemtype, itemkey, procid);

4401: wf_engine.eng_suspended, null,
4402: null, null);
4403:
4404: -- Suspend all the children processes
4405: Wf_Engine_Util.Suspend_Child_Processes(itemtype, itemkey, procid);
4406: else
4407: Wf_Core.Token('TYPE', itemtype);
4408: Wf_Core.Token('KEY', itemkey);
4409: Wf_Core.Token('NAME', proc);

Line 4569: Wf_Engine_Util.Process_Kill_Children(itemtype, itemkey, procid);

4565: wf_engine.eng_completed, result,
4566: null, SYSDATE);
4567:
4568: -- Kill child activities recursively
4569: Wf_Engine_Util.Process_Kill_Children(itemtype, itemkey, procid);
4570: --If cascade option is set to true abort all child
4571: --processes aswell
4572: if cascade then
4573: Wf_Engine_Util.Process_Kill_ChildProcess(itemtype, itemkey);

Line 4573: Wf_Engine_Util.Process_Kill_ChildProcess(itemtype, itemkey);

4569: Wf_Engine_Util.Process_Kill_Children(itemtype, itemkey, procid);
4570: --If cascade option is set to true abort all child
4571: --processes aswell
4572: if cascade then
4573: Wf_Engine_Util.Process_Kill_ChildProcess(itemtype, itemkey);
4574: end if;
4575: end if;
4576:
4577: --Cancel any OPEN FYI notifications

Line 4736: Wf_Engine_Util.Resume_Child_Processes(itemtype, itemkey, procid);

4732: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, procid,
4733: wf_engine.eng_active, null, null, null);
4734:
4735: -- Mark any sub-processes as active again
4736: Wf_Engine_Util.Resume_Child_Processes(itemtype, itemkey, procid);
4737:
4738: -- Restart any activities that were deferred because completion
4739: -- came in while process was suspended.
4740: --

Line 4770: Wf_Engine_Util.Process_Activity(itemtype, itemkey, actidarr(i),

4766: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, actidarr(i),
4767: wf_engine.eng_active, null, sysdate, null);
4768: begin
4769: savepoint wf_savepoint;
4770: Wf_Engine_Util.Process_Activity(itemtype, itemkey, actidarr(i),
4771: Wf_Engine.Threshold, TRUE);
4772: exception
4773: when trig_savepoint or dist_savepoint then
4774: -- Can't restart process here, re-defer for the

Line 4789: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actidarr(i),

4785: Wf_Core.Context('Wf_Engine', 'ResumeProcess', itemtype, itemkey,
4786: process);
4787: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actidarr(i),
4788: wf_engine.eng_exception, FALSE);
4789: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actidarr(i),
4790: wf_engine.eng_exception);
4791:
4792: Wf_Core.Clear;
4793: end;

Line 5327: wf_engine_util.notification_copy (act.notification_id,

5323: if act.notification_id is not null then
5324:
5325: --if complete then copy else ignore (we re-execute later)
5326: if act.activity_status = wf_engine.eng_completed then
5327: wf_engine_util.notification_copy (act.notification_id,
5328: act.item_key, itemkey, nid);
5329: end if;
5330:
5331: elsif act.activity_status = wf_engine.eng_deferred then

Line 5411: wf_engine_util.notification_copy (hist.notification_id,

5407: for hist in all_activities_hist loop
5408:
5409: nid := null;
5410: if hist.notification_id is not null then
5411: wf_engine_util.notification_copy (hist.notification_id,
5412: hist.item_key, itemkey, nid);
5413: end if;
5414:
5415: -- now insert the status

Line 5452: wf_engine_util.notification_refresh(itemtype,itemkey);

5448: end;
5449:
5450:
5451: -- update item attributes on all copied notifications
5452: wf_engine_util.notification_refresh(itemtype,itemkey);
5453:
5454:
5455: -- as last step, launch all notifications still open
5456: -- keep this as last step because routing rules may allow

Line 5460: Wf_Engine_Util.Process_Activity(itemtype, itemkey,

5456: -- keep this as last step because routing rules may allow
5457: -- continuation of thread.
5458:
5459: for ntf in ntf_open loop
5460: Wf_Engine_Util.Process_Activity(itemtype, itemkey,
5461: ntf.process_activity,wf_engine.threshold);
5462: end loop;
5463:
5464:

Line 5525: root := Wf_Engine_Util.Get_Root_Process(itemtype, itemkey, activity);

5521: -- Note must do this here, instead of relying on CreateProcess
5522: -- to call the selector, because CreateProcess can't take the
5523: -- start activity as an argument to implicitly choose a root
5524: -- process when no selector function is defined.
5525: root := Wf_Engine_Util.Get_Root_Process(itemtype, itemkey, activity);
5526: if (root is null) then
5527: Wf_Core.Token('TYPE', itemtype);
5528: Wf_Core.Token('KEY', itemkey);
5529: Wf_Core.Raise('WFENG_ITEM_ROOT_SELECTOR');

Line 5624: root := Wf_Engine_Util.Get_Root_Process(itemtype, itemkey, activity);

5620: -- Note must do this here, instead of relying on CreateProcess
5621: -- to call the selector, because CreateProcess can't take the
5622: -- start activity as an argument to implicitly choose a root
5623: -- process when no selector function is defined.
5624: root := Wf_Engine_Util.Get_Root_Process(itemtype, itemkey, activity);
5625: if (root is null) then
5626: Wf_Core.Token('TYPE', itemtype);
5627: Wf_Core.Token('KEY', itemkey);
5628: Wf_Core.Raise('WFENG_ITEM_ROOT_SELECTOR');

Line 5638: Wf_Engine_Util.Start_Process_Internal(

5634: --Bug 2259039
5635: -- Start the process for this activity.
5636: -- The activity to be completed will be left in NOTIFIED status
5637: -- as a side-effect of this call.
5638: Wf_Engine_Util.Start_Process_Internal(
5639: itemtype => itemtype,
5640: itemkey => itemkey,
5641: runmode => 'ACTIVITY');
5642:

Line 5704: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid, result);

5700:
5701: -- Finally, complete our lovely new activity.
5702: if (itemkey = wf_engine.eng_synch) then
5703: -- SYNCHMODE: No error trapping in synchmode.
5704: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid, result);
5705: else
5706: begin
5707: savepoint wf_savepoint;
5708: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid, result);

Line 5708: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid, result);

5704: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid, result);
5705: else
5706: begin
5707: savepoint wf_savepoint;
5708: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid, result);
5709: exception
5710: when trig_savepoint or dist_savepoint then
5711: -- You must be in a restricted environment,
5712: -- no fancy error processing for you!

Line 5718: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid, result);

5714: -- deferring directly, because the activity must be marked as
5715: -- complete. Any following activities started by completing
5716: -- this activity will be caught and deferred in another
5717: -- savepoint trap in process_activity.
5718: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid, result);
5719: when others then
5720: -- If anything in this process raises an exception:
5721: -- 1. rollback any work in this process thread
5722: -- 2. set this activity to error status

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

5732: Wf_Core.Context('Wf_Engine', 'CompleteActivity', itemtype, itemkey,
5733: activity, result);
5734: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actid,
5735: wf_engine.eng_exception, FALSE);
5736: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actid,
5737: wf_engine.eng_exception);
5738: Wf_Core.Clear;
5739: end if;
5740: end;

Line 6039: if (not Wf_Engine_Util.Reset_Tree(itemtype, itemkey, rootid,

6035: -- This reset behaves similar to loop reset, cancelling activities,
6036: -- moving rows to history, etc. It then resets the activity status
6037: -- to active, AND resets or creates status rows for any parent process
6038: -- to active if necessary.
6039: if (not Wf_Engine_Util.Reset_Tree(itemtype, itemkey, rootid,
6040: actid, actdate)) then
6041: Wf_Core.Token('TYPE', itemtype);
6042: Wf_Core.Token('KEY', itemkey);
6043: Wf_Core.Token('NAME', activity);

Line 6058: Wf_Engine_Util.Function_Call(funcname, itemtype, itemkey, actid, wf_engine.eng_skip,

6054: funcname := Wf_Activity.Activity_Function(itemtype, itemkey, actid);
6055:
6056: if (funcname is not null) then -- <6636968>
6057:
6058: Wf_Engine_Util.Function_Call(funcname, itemtype, itemkey, actid, wf_engine.eng_skip,
6059: resultout);
6060:
6061: -- Check if skip is allowed on this activity
6062: if (resultout = wf_engine.eng_noskip) then

Line 6068: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid, result, FALSE);

6064: Wf_Core.Raise('WFENG_NOSKIP');
6065: end if;
6066: end if;--
6067:
6068: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid, result, FALSE);
6069:
6070: exception
6071: when trig_savepoint or dist_savepoint then
6072: -- You must be in a restricted environment,

Line 6074: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid,

6070: exception
6071: when trig_savepoint or dist_savepoint then
6072: -- You must be in a restricted environment,
6073: -- no fancy error processing for you! Try running directly.
6074: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid,
6075: result, FALSE);
6076: when others then
6077: if (Wf_Core.Error_Name = 'WFENG_NOSKIP') then
6078: -- No processing. Raise to the caller that the activity cannot be skipped.

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

6087: Wf_Core.Context('Wf_Engine', 'HandleErrorInternal', itemtype, itemkey,
6088: activity, command, result);
6089: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actid,
6090: wf_engine.eng_exception, FALSE);
6091: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actid,
6092: wf_engine.eng_exception);
6093: Wf_Core.Clear;
6094: end if;
6095: end;

Line 6107: Wf_Engine_Util.Process_Activity(itemtype, itemkey, actid,

6103: else
6104: -- Start at given activity
6105: begin
6106: savepoint wf_savepoint;
6107: Wf_Engine_Util.Process_Activity(itemtype, itemkey, actid,
6108: Wf_Engine.Threshold, TRUE);
6109: exception
6110: when trig_savepoint or dist_savepoint then
6111: -- You must be in a restricted environment,

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

6124: Wf_Core.Context('Wf_Engine', 'HandleErrorInternal',itemtype,itemkey,
6125: activity, command, result);
6126: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actid,
6127: wf_engine.eng_exception, FALSE);
6128: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actid,
6129: wf_engine.eng_exception);
6130: Wf_Core.Clear;
6131: end;
6132: end if;

Line 6820: Wf_Engine_Util.Start_Process_Internal(

6816: actdate := WF_Item.Active_Date(itemtype, itemkey);
6817:
6818: -- Bug 2259039
6819: -- Start the new process
6820: Wf_Engine_Util.Start_Process_Internal(
6821: itemtype => itemtype,
6822: itemkey => itemkey,
6823: runmode => 'EVENT');
6824:

Line 6924: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actarr(i),

6920: Wf_Engine.SetItemAttrEvent(itemtype, itemkey, aname, event_message);
6921: end if;
6922:
6923: -- Execute our lovely event activity (result is always null).
6924: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actarr(i),
6925: wf_engine.eng_null);
6926: exception
6927: when others then
6928: -- If anything in this process raises an exception:

Line 6938: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actarr(i),

6934: Wf_Core.Context('Wf_Engine', 'Event', itemtype, itemkey,
6935: process_name, event_name);
6936: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actarr(i),
6937: wf_engine.eng_exception, FALSE);
6938: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actarr(i),
6939: wf_engine.eng_exception);
6940: Wf_Core.Clear;
6941: end;
6942: i := i + 1;

Line 7125: Wf_Engine_Util.Complete_Activity(evtacts_rec.item_type,

7121: event_message);
7122: end if;
7123:
7124: -- Execute our lovely event activity (result is always null).
7125: Wf_Engine_Util.Complete_Activity(evtacts_rec.item_type,
7126: evtacts_rec.item_key, evtacts_rec.actid,
7127: wf_engine.eng_null);
7128: exception
7129: when others then

Line 7142: Wf_Engine_Util.Execute_Error_Process(evtacts_rec.item_type,

7138: Wf_Item_Activity_Status.Set_Error(evtacts_rec.item_type,
7139: evtacts_rec.item_key,
7140: evtacts_rec.actid,
7141: wf_engine.eng_exception, FALSE);
7142: Wf_Engine_Util.Execute_Error_Process(evtacts_rec.item_type,
7143: evtacts_rec.item_key,
7144: evtacts_rec.actid,
7145: wf_engine.eng_exception);
7146: Wf_Core.Clear;