Wednesday, June 10, 2009

What happens if automatic activity fails, and what should I do to get out of it

Solution and Explanation:
If workflow is initiated, workflow instance is created and set to state running state. As the workflow progresses, the runtime activity information is updated in dm_workflow object and workitem objects corresponding to the runtime activity staus are created.
After workflow is successfully completed, the workflow object and workitem objects are removed from Docbase.

If a method fails for a automatic activity, then workflow stays active state, but runtime activity goes to terminated state and workitem goes to Apaused.
You can restart the failed activity, with restart API. Resume API does not work in this case, since workflow and activity were not halted. SN 14292 is helpful to call restart.


State information for workflow, runtime activity are kept in dm_workflow object, and that for woritem are kept in workitem object.

<< workflow >>

r_runtime_state : current state of the workflow.

0, meaing dormant
1, meaning running
2, meaning finished
3, meaning halted
4, meaning terminated

r_act_name (R) : activity identifier as defined in dm_process object

r_act_state (R) : activity's current status

0, meaing dormant
1, meaning active
2, meaning finished
3, meaning halted
4, meaning terminated

<< work item >>

r_runtime_state

0, meaning dormant
1, meaning acquired
2, meaning finished
3, meaning paused
4, meaning Dpaused (a work item in the dormant state is paused)
5, meaning Apaused (a work item in the acquired state is paused)
6, meaning Ppaused (a work item in the paused state is paused)
Values 4-6 occur when a workflow containing the work item is halted.

1 comment:

caceewacha said...

The Top 25 Best Casinos in New Jersey
The Top 25 충청북도 출장안마 Best Casinos in New Jersey · 1. 과천 출장샵 Caesars Casino New Jersey · 2. Bally's 보령 출장샵 New Orleans 대구광역 출장안마 Casino New 동두천 출장마사지