Washington DC Endpoint Management User Group

 View Only
  • 1.  Manually complete or delete a Workflow Process

    Posted Mar 01, 2013 04:26 PM

    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?



  • 2.  RE: Manually complete or delete a Workflow Process

    Posted Mar 07, 2013 11:53 AM
      |   view attached

    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 = 'user@yourcompany.com'
    • EXEC dbo.CloseProcess @ReportProcessID = N'WF01', @DeleteInsteadOfClose = 1

     

    *backup your data first!

    Attachment(s)

    zip
    CloseProcess.zip   1 KB 1 version


  • 3.  RE: Manually complete or delete a Workflow Process

    Posted Mar 08, 2013 09:46 AM

    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.



  • 4.  RE: Manually complete or delete a Workflow Process

    Posted Mar 08, 2013 10:02 AM

    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.



  • 5.  RE: Manually complete or delete a Workflow Process

    Posted Mar 11, 2013 11:45 AM

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



  • 6.  RE: Manually complete or delete a Workflow Process

    Posted Mar 13, 2013 10:40 AM

    NIce! I will try it out.



  • 7.  RE: Manually complete or delete a Workflow Process

    Posted Mar 13, 2013 10:53 AM
      |   view attached

    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.

     

     

     

    Attachment(s)

    package
    ResumeOnError.package   1.11 MB 1 version


  • 8.  RE: Manually complete or delete a Workflow Process

    Posted Mar 14, 2013 02:06 PM

    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.



  • 9.  RE: Manually complete or delete a Workflow Process

    Posted Mar 14, 2013 02:43 PM

    Just remove it. It's a newer column.