Video Screencast Help

Manually complete or delete a Workflow Process

Created: 01 Mar 2013 | 8 comments

There was a process running when I published an update to the workflow. Now that process is showing as still running in the process viewer reports. Is there a way to manually change this or remove it?

Operating Systems:

Comments 8 CommentsJump to latest comment

rhamner's picture

There are quite a few threads in the Service Desk forum on this subject but they're tailored to SD data. In fact, Support will soon be posting a tool to remove incidents. If you're talking about Service Desk processes then you should look in the SD forum.

I gathered various scripts that I have and wrapped them in a stored procedure that will either 'close' a process or completely remove it altogether.  By close, I mean 1) deleting persistence data so timeouts and escalations will not run 2) updating tasks to show that they're completed 3) updating status on the process reporting data 4) entering a comment to show what happened.

Here are two example of how to use this procedure. This first deletes and the second completely removes.

  • EXEC dbo.CloseProcess @ReportProcessID = N'WF01', @Status = 'Closed', @Comment = 'Closing this process because...', @ClosedBy = ''
  • EXEC dbo.CloseProcess @ReportProcessID = N'WF01', @DeleteInsteadOfClose = 1

*backup your data first!

AttachmentSize 1.78 KB
noodleNT's picture

ProcessViewMessage column doesn't exist in ReportProcessComment table so the SP wont build. Is that just left over from an older version of workflow or something? You are only setting this value to 0.

rhamner's picture

Just remove it. It's a newer column.

noodleNT's picture

Thanks for this.... A better option would be to resume a workflow though from where it left off. Is this possible? I find every now and then our migration workflow just stops processing it's steps. I suspect it's one of the Altiris API's timing out but I haven't noticed it yet in the logs.

rhamner's picture

Service Desk has done something similar. I think the general idea is that your exception handling goes to a dialog workflow component which creates a task for the admin. The admin can either end or restart the process on the component that failed. The exception trigger supplies ExceptionTriggerComponentID which can be passed to the Go To Component By ID commonent after your error dialog workflow.

noodleNT's picture

I think I underdstand, are their any samples or examples I can look at?

rhamner's picture

Here's a simple example. The database component hard coded with a bad database name so it will always fail. It gets captured by the exception trigger which runs the error model.

ResumeOnError.package 1.11 MB