none
Handle WorkflowCompleted-Event RRS feed

  • Question

  • Hi,

    in my custom workflow i want to "listen" to the workflowCompleted-Event. To every event of that kind, no matter which workflow (an instance of my custom workflow as well as every other kind of instance, including SharePoint-standard-workflows...).

    I'm using VS 2008, SharePoint 2007 (Server, standard).

    Where can i add handlers, how do i access them?

    • how can i access the current runtime-object(s!)? Is there a list of runtime-objects where i can add handlers?
    • ...i tried to add a handler inside a "using wfr as new workflowruntime ... Addhandler wfr.WorkflowCompleted, AddressOf myMethod()" without getting in myMethod when a workflow was completed (i also tried .WorkflowTerminated)
    • do i have to write an activity that inherits handyExternalEventActivity? How?
    • am i totally wrong and something like that is done in a different way (or it's simply impossible -> can't believe that...)?

    What i want to do actually: every time a workflow is completed i want to check the type of workflow instance. If the completed workflow was type of a "relevant" workflow my custom workflow has to be completed.

    Also standard-workflows of sharepoint 2007 can be "relevant" workflows.

    Every hint is welcome, also statements about the way something like that should be done.

    Thanks in advance,

    Rolf

    PS: i'm using VB (sorry *g*, not my decision), C#-code is welcome as well :)

    Monday, August 2, 2010 2:52 PM

Answers

  • Hi,

    If I have understood it right you would want to check each of the workflow instances running (OOB and custom) when they are about to complete.

    For custom workflows you can try having a code activity as the last activity of the WF and do the custom code you want to accomplish on Workflow completed. If however you are for an allround solution the link below might be helpful where you can check the Workflow instances on the list items to see whether they are completed or not.

    http://pontonetpt.com/blogs/miguelisidoro/archive/2008/10/25/P28350.aspx

     

    Regards,

    VarunMa-MSFT

     

    • Marked as answer by Seven M Friday, September 3, 2010 3:18 AM
    Friday, August 13, 2010 8:02 PM