locked
Long-running workflow - Based on Status RRS feed

  • Question

  • Hello!

    Let's say I have a long-running workflow (many days) in which some activities are "manual". Basically the workflow is more or less idle most of the time.

    The workflow "automatic activities" are executed based on a status read from the database (just an idea). The status would be changed by the user.

     

     

    What is the best way, at the workflow level to check if the status has changed and it is time to continue the workflow process?

     

    I was thinking of using the delay activity and some kind of loop that would be something like :

     

    WorkflowAutoTask()

    ChangeStatusToUSERISDOINGSOMETHINGMANUALLY()

    While Status = "USERISDOINGSOMETHINGMANUALLY"

    DELAY 10 sec

    End While

    WorkflowAutoTask2()

     

    Is it the best way to do it? Or is there any way I can load the workflow instance and say : go on with your process...

     

    Thanks

    Alex


    XI-Factory - Free Online Silverlight Prototyping and code generation tool! http://www.xifactory.com
    Friday, June 17, 2011 6:48 PM

Answers

  • Hi,

    ->"What is the best way, at the workflow level to check if the status has changed and it is time to continue the workflow process?"
    If it is a human/machine event drived workflow, you can use bookmark, see:
    http://xhinker.com/2009/11/29/WF4UseBookmark.aspx

    If it is a time drive workflow, you may want to consider using Delay activity.

    Hope this helps
    Regards
    MSDN Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    This posting is provided "AS IS" with no warranties, and confers no rights. My Blog: http://xhinker.com
    Microsoft Windows Workflow Foundation 4.0 Cookbook
    • Marked as answer by Andrew_Zhu Friday, July 8, 2011 3:30 AM
    Friday, June 24, 2011 2:35 AM