Sign in or 

| Platform: | Oracle | App: | Oracle Applications | Tool: | Oracle Workflow |
| DB Ver: | 9.2 | App Ver: | 11.5.8 | Tool Ver: | 2.6.2 |
| Revision Date: | 15-Sep-2006 | Keywords: | HOWTO, EXPEDITE, MASS,GLOBAL,RETRY,SKIP,WORKFLOW,ERROR | ||
| Goal | |||||
| To expedite errored workflows en masse | |||||
| Facts | |||||
| Solution | |||||
| Sometimes a situation can occur when there are many in-process workflows that hit an error. This could occur, for example, if a database package has become INVALID. The workflow background engine may run, attempt to process the workflows, hit the invalid package and throw an error putting the workflow in to an errored state. If this happens, what you would normally do is fix the problem, recompile the package and have the system administrator expedite the workflow (using 'RETRY'). This would retry the failed process activity, which you would then expect to complete successfully. To do this from the SQL*Plus command line, you could use the following supplied SQL script: wfretry.sql | |||||
-- -----------------------------------------
-- Find all errored workflows in the system
-- by item type
-- -----------------------------------------
SELECT
ias.item_type
,pa.instance_label
,ias.activity_result_code
,COUNT(*)
FROM
wf_item_activity_statuses ias
,wf_process_activities pa
WHERE 1=1
AND ias.item_type LIKE '&item_type'
AND ias.process_activity = pa.instance_id
AND ias.activity_status = 'ERROR'
GROUP BY
ias.item_type
,pa.instance_label
,ias.activity_result_code
/
-- -----------------------------------------
CURSOR c_retry IS
BEGINSELECT
ias.item_type
,ias.item_key
,pa.instance_label
,ias.activity_result_code Result
FROM
wf_item_activity_statuses ias
,wf_process_activities pa
WHERE 1=1
AND ias.item_type LIKE '&item_type'
AND ias.item_key LIKE '&item_key'
AND pa.instance_label LIKE '&instance_label'
AND ias.process_activity = pa.instance_id
AND ias.activity_status = 'ERROR'
;
DBMS_OUTPUT.PUT_LINE('Workflow Global retry..... ');
FOR r_retry IN c_retry LOOP
DBMS_OUTPUT.PUT_LINE('Retrying workflow item_type='
||r_retry.item_type
||', item_key='||r_retry.item_key
||', label='||r_retry.instance_label
);
Wf_Engine.HandleError(itemtype => r_retry.item_type
,itemkey => r_retry.item_key
,activity => r_retry.instance_label
,command => 'RETRY'
,result => NULL
);
END LOOP;END;
|
consultium |
Latest page update: made by consultium
, Oct 7 2009, 6:36 AM EDT
(about this update
About This Update
view changes - complete history) |
|
More Info: links to this page
|