Hi All,
I have requirement to stop & Delete or shortclose an active workflow using a stored procedure.
Just wondering, is there any approach to achieve this ?
Appreciate your response!
Hi All,
I have requirement to stop & Delete or shortclose an active workflow using a stored procedure.
Just wondering, is there any approach to achieve this ?
Appreciate your response!
Best answer by sng
You can run this query to check for running instances:
SELECT *
FROM [Server].[ProcInst]
WHERE [Status]=1
To stop the running instance, you can run the following Update query:
UPDATE [Server].[ProcInst]
SET [Status] = 4
WHERE [Status] = 1 AND ID = <ProcInstID>
You may need to pass in an ID or Folio name to filter the instances according to your requirements to stop an active workflow.
You can use the following stored procedure to remove instances:
exec [Server].kProcInstRemove @ProcInstID=ProcInstId],@ServerID=0,@LogData=0x0,@ExpireOnDelete=1
exec [Serverlog].lProcInstRemove @ProcInstID=[ProcInstId]
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.