I want to retrieve all running/corrupted workflows and terminate them. Can someone provide the API code or DQL for this? Thanks in advance.
If there are Accepted Answers, those will be shown by default. You can switch to 'All Replies' by selecting the tab below.
Hi,
Retrieval can be done be DQL query
Select r_object_id from dm_workflowwhere r_runtime_state = 4
Values for r_runtime_state are
Halted or dormant workflow can be terminated by abort API, or IDfWorkflow.abort() method.
Basically, you could also update the r_runtime_state by an UPDATE DQL.
Removing these terminated workflows should be done by destroy API, or IDfWorkflow.destroy(). You should never
delete workflow objects from DQL, this will leave quite a number of dmi_workitem, dmi_package etc in your repositories.
destroy API clears of all of these.
Regards
Jørg