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 3801: Wf_Engine_Util.Execute_Error_Process(l_itemtype, l_itemkey, l_actid,

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

Line 3828: Wf_Engine_Util.Execute_Error_Process(l_itemtype, l_itemkey,

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

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

4080: end if;
4081:
4082: if (process is null) then
4083: -- Call the selector function to get the process
4084: root := Wf_Engine_Util.Get_Root_Process(itemtype, itemkey);
4085: if (root is null) then
4086: Wf_Core.Token('TYPE', itemtype);
4087: Wf_Core.Token('KEY', itemkey);
4088: Wf_Core.Raise('WFENG_ITEM_ROOT_SELECTOR');

Line 4174: Wf_Engine_Util.Start_Process_Internal(

4170: if (WF_CACHE.MetaRefreshed) then
4171: null;
4172: end if;
4173: --Bug 2259039
4174: Wf_Engine_Util.Start_Process_Internal(
4175: itemtype=> itemtype,
4176: itemkey => itemkey,
4177: runmode => 'START');
4178: exception

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

4352: wf_engine.eng_suspended, null,
4353: null, null);
4354:
4355: -- Suspend all the children processes
4356: Wf_Engine_Util.Suspend_Child_Processes(itemtype, itemkey, procid);
4357: else
4358: Wf_Core.Token('TYPE', itemtype);
4359: Wf_Core.Token('KEY', itemkey);
4360: Wf_Core.Token('NAME', proc);

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

4516: wf_engine.eng_completed, result,
4517: null, SYSDATE);
4518:
4519: -- Kill child activities recursively
4520: Wf_Engine_Util.Process_Kill_Children(itemtype, itemkey, procid);
4521: --If cascade option is set to true abort all child
4522: --processes aswell
4523: if cascade then
4524: Wf_Engine_Util.Process_Kill_ChildProcess(itemtype, itemkey);

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

4520: Wf_Engine_Util.Process_Kill_Children(itemtype, itemkey, procid);
4521: --If cascade option is set to true abort all child
4522: --processes aswell
4523: if cascade then
4524: Wf_Engine_Util.Process_Kill_ChildProcess(itemtype, itemkey);
4525: end if;
4526: end if;
4527:
4528: --Cancel any OPEN FYI notifications

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

4681: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, procid,
4682: wf_engine.eng_active, null, null, null);
4683:
4684: -- Mark any sub-processes as active again
4685: Wf_Engine_Util.Resume_Child_Processes(itemtype, itemkey, procid);
4686:
4687: -- Restart any activities that were deferred because completion
4688: -- came in while process was suspended.
4689: --

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

4715: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, actidarr(i),
4716: wf_engine.eng_active, null, sysdate, null);
4717: begin
4718: savepoint wf_savepoint;
4719: Wf_Engine_Util.Process_Activity(itemtype, itemkey, actidarr(i),
4720: Wf_Engine.Threshold, TRUE);
4721: exception
4722: when trig_savepoint or dist_savepoint then
4723: -- Can't restart process here, re-defer for the

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

4734: Wf_Core.Context('Wf_Engine', 'ResumeProcess', itemtype, itemkey,
4735: process);
4736: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actidarr(i),
4737: wf_engine.eng_exception, FALSE);
4738: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actidarr(i),
4739: wf_engine.eng_exception);
4740:
4741: Wf_Core.Clear;
4742: end;

Line 5273: wf_engine_util.notification_copy (act.notification_id,

5269: if act.notification_id is not null then
5270:
5271: --if complete then copy else ignore (we re-execute later)
5272: if act.activity_status = wf_engine.eng_completed then
5273: wf_engine_util.notification_copy (act.notification_id,
5274: act.item_key, itemkey, nid);
5275: end if;
5276:
5277: elsif act.activity_status = wf_engine.eng_deferred then

Line 5357: wf_engine_util.notification_copy (hist.notification_id,

5353: for hist in all_activities_hist loop
5354:
5355: nid := null;
5356: if hist.notification_id is not null then
5357: wf_engine_util.notification_copy (hist.notification_id,
5358: hist.item_key, itemkey, nid);
5359: end if;
5360:
5361: -- now insert the status

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

5394: end;
5395:
5396:
5397: -- update item attributes on all copied notifications
5398: wf_engine_util.notification_refresh(itemtype,itemkey);
5399:
5400:
5401: -- as last step, launch all notifications still open
5402: -- keep this as last step because routing rules may allow

Line 5406: Wf_Engine_Util.Process_Activity(itemtype, itemkey,

5402: -- keep this as last step because routing rules may allow
5403: -- continuation of thread.
5404:
5405: for ntf in ntf_open loop
5406: Wf_Engine_Util.Process_Activity(itemtype, itemkey,
5407: ntf.process_activity,wf_engine.threshold);
5408: end loop;
5409:
5410:

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

5467: -- Note must do this here, instead of relying on CreateProcess
5468: -- to call the selector, because CreateProcess can't take the
5469: -- start activity as an argument to implicitly choose a root
5470: -- process when no selector function is defined.
5471: root := Wf_Engine_Util.Get_Root_Process(itemtype, itemkey, activity);
5472: if (root is null) then
5473: Wf_Core.Token('TYPE', itemtype);
5474: Wf_Core.Token('KEY', itemkey);
5475: Wf_Core.Raise('WFENG_ITEM_ROOT_SELECTOR');

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

5564: -- Note must do this here, instead of relying on CreateProcess
5565: -- to call the selector, because CreateProcess can't take the
5566: -- start activity as an argument to implicitly choose a root
5567: -- process when no selector function is defined.
5568: root := Wf_Engine_Util.Get_Root_Process(itemtype, itemkey, activity);
5569: if (root is null) then
5570: Wf_Core.Token('TYPE', itemtype);
5571: Wf_Core.Token('KEY', itemkey);
5572: Wf_Core.Raise('WFENG_ITEM_ROOT_SELECTOR');

Line 5582: Wf_Engine_Util.Start_Process_Internal(

5578: --Bug 2259039
5579: -- Start the process for this activity.
5580: -- The activity to be completed will be left in NOTIFIED status
5581: -- as a side-effect of this call.
5582: Wf_Engine_Util.Start_Process_Internal(
5583: itemtype => itemtype,
5584: itemkey => itemkey,
5585: runmode => 'ACTIVITY');
5586:

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

5644:
5645: -- Finally, complete our lovely new activity.
5646: if (itemkey = wf_engine.eng_synch) then
5647: -- SYNCHMODE: No error trapping in synchmode.
5648: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid, result);
5649: else
5650: begin
5651: savepoint wf_savepoint;
5652: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid, result);

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

5648: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid, result);
5649: else
5650: begin
5651: savepoint wf_savepoint;
5652: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid, result);
5653: exception
5654: when trig_savepoint or dist_savepoint then
5655: -- You must be in a restricted environment,
5656: -- no fancy error processing for you!

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

5658: -- deferring directly, because the activity must be marked as
5659: -- complete. Any following activities started by completing
5660: -- this activity will be caught and deferred in another
5661: -- savepoint trap in process_activity.
5662: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid, result);
5663: when others then
5664: -- If anything in this process raises an exception:
5665: -- 1. rollback any work in this process thread
5666: -- 2. set this activity to error status

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

5670: Wf_Core.Context('Wf_Engine', 'CompleteActivity', itemtype, itemkey,
5671: activity, result);
5672: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actid,
5673: wf_engine.eng_exception, FALSE);
5674: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actid,
5675: wf_engine.eng_exception);
5676: Wf_Core.Clear;
5677: end;
5678: end if;

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

5969: -- This reset behaves similar to loop reset, cancelling activities,
5970: -- moving rows to history, etc. It then resets the activity status
5971: -- to active, AND resets or creates status rows for any parent process
5972: -- to active if necessary.
5973: if (not Wf_Engine_Util.Reset_Tree(itemtype, itemkey, rootid,
5974: actid, actdate)) then
5975: Wf_Core.Token('TYPE', itemtype);
5976: Wf_Core.Token('KEY', itemkey);
5977: Wf_Core.Token('NAME', activity);

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

5988: funcname := Wf_Activity.Activity_Function(itemtype, itemkey, actid);
5989:
5990: if (funcname is not null) then -- <6636968>
5991:
5992: Wf_Engine_Util.Function_Call(funcname, itemtype, itemkey, actid, wf_engine.eng_skip,
5993: resultout);
5994:
5995: -- Check if skip is allowed on this activity
5996: if (resultout = wf_engine.eng_noskip) then

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

5998: Wf_Core.Raise('WFENG_NOSKIP');
5999: end if;
6000: end if;--
6001:
6002: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid, result, FALSE);
6003:
6004: exception
6005: when trig_savepoint or dist_savepoint then
6006: -- You must be in a restricted environment,

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

6004: exception
6005: when trig_savepoint or dist_savepoint then
6006: -- You must be in a restricted environment,
6007: -- no fancy error processing for you! Try running directly.
6008: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actid,
6009: result, FALSE);
6010: when others then
6011: if (Wf_Core.Error_Name = 'WFENG_NOSKIP') then
6012: -- No processing. Raise to the caller that the activity cannot be skipped.

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

6021: Wf_Core.Context('Wf_Engine', 'HandleErrorInternal', itemtype, itemkey,
6022: activity, command, result);
6023: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actid,
6024: wf_engine.eng_exception, FALSE);
6025: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actid,
6026: wf_engine.eng_exception);
6027: Wf_Core.Clear;
6028: end if;
6029: end;

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

6037: else
6038: -- Start at given activity
6039: begin
6040: savepoint wf_savepoint;
6041: Wf_Engine_Util.Process_Activity(itemtype, itemkey, actid,
6042: Wf_Engine.Threshold, TRUE);
6043: exception
6044: when trig_savepoint or dist_savepoint then
6045: -- You must be in a restricted environment,

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

6058: Wf_Core.Context('Wf_Engine', 'HandleErrorInternal',itemtype,itemkey,
6059: activity, command, result);
6060: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actid,
6061: wf_engine.eng_exception, FALSE);
6062: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actid,
6063: wf_engine.eng_exception);
6064: Wf_Core.Clear;
6065: end;
6066: end if;

Line 6750: Wf_Engine_Util.Start_Process_Internal(

6746: actdate := WF_Item.Active_Date(itemtype, itemkey);
6747:
6748: -- Bug 2259039
6749: -- Start the new process
6750: Wf_Engine_Util.Start_Process_Internal(
6751: itemtype => itemtype,
6752: itemkey => itemkey,
6753: runmode => 'EVENT');
6754:

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

6850: Wf_Engine.SetItemAttrEvent(itemtype, itemkey, aname, event_message);
6851: end if;
6852:
6853: -- Execute our lovely event activity (result is always null).
6854: Wf_Engine_Util.Complete_Activity(itemtype, itemkey, actarr(i),
6855: wf_engine.eng_null);
6856: exception
6857: when others then
6858: -- If anything in this process raises an exception:

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

6864: Wf_Core.Context('Wf_Engine', 'Event', itemtype, itemkey,
6865: process_name, event_name);
6866: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actarr(i),
6867: wf_engine.eng_exception, FALSE);
6868: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actarr(i),
6869: wf_engine.eng_exception);
6870: Wf_Core.Clear;
6871: end;
6872: i := i + 1;

Line 7055: Wf_Engine_Util.Complete_Activity(evtacts_rec.item_type,

7051: event_message);
7052: end if;
7053:
7054: -- Execute our lovely event activity (result is always null).
7055: Wf_Engine_Util.Complete_Activity(evtacts_rec.item_type,
7056: evtacts_rec.item_key, evtacts_rec.actid,
7057: wf_engine.eng_null);
7058: exception
7059: when others then

Line 7072: Wf_Engine_Util.Execute_Error_Process(evtacts_rec.item_type,

7068: Wf_Item_Activity_Status.Set_Error(evtacts_rec.item_type,
7069: evtacts_rec.item_key,
7070: evtacts_rec.actid,
7071: wf_engine.eng_exception, FALSE);
7072: Wf_Engine_Util.Execute_Error_Process(evtacts_rec.item_type,
7073: evtacts_rec.item_key,
7074: evtacts_rec.actid,
7075: wf_engine.eng_exception);
7076: Wf_Core.Clear;