Monday, September 22, 2008

How do you delete a workflow instance?

You can delete a workflow instance by using the destroy method. However, you can only destroy a workflow instance that is in the dormant, finished, or terminated state. The steps are as follows:

1) Halt the workflow instance. To halt a running workflow use the Halt method:
dmAPIexec ("halt, , ") This sets the r_runtime_state attribute to halted.

2) Abort the workflow instance. To abort the workflow use the Abort method:
dmAPIexec ("abort, , "). This sets the r_runtime_state attribute to terminated.

3) Destroy the workflow instance. To destroy the workflow use the Destroy method:
dmAPIexec ("destroy , ,").

Destroying a workflow instance removes its packages and workitems permanently.
When a workflow is aborted, notification will be sent to supervisor, and the inbox task will disappear from the performer's inbox.

Note: This does not remove the Workflow Template and the corresponding workflow activities.

No comments: