locked
Dynamic Workflow Update RRS feed

  • General discussion

  • Hi All,

         1)   I have a UI page which invokes a Workflow service(say via a button named Invoke) which is having say around 5 steps.Steps 1,3,5 are implemented as Code Activities while steps 2 and 4 are implemented as Activities(i.e. xaml files)  and each of these activities have internal steps which are again implemented as Code Activities.Now the user enters data in UI and presses a buton which invokes the service but then the service may throw Business exception at any of the steps within the service or the Activities.If any such error occurs, the user is provided a link with Re-Run option, clicking of which loads the WF Service instance with the same wf instance id but what I want is that now the WF Service should start pocessing from the step where it threw the error?

          Pobably this may be achieved by using Bookmarks but I know only to use Bookmarks statically.Is there any way that I can insert some bookmark somewhere in the workflow definition for some specific instance at runtime dynamically?If not then how do I implement the above functionality?

        2) Another requiremnt is that the user has pressed the Invoke button but this time it's a long running compute/io  intensive WF and somehow the user recognizes that there is some input data error and so he decides to cancel this WF Sevice instance.One way I can think of to implemnt this is by polling appoach - say the user sets some cancellation flag in the DB and the WF checks this flag in the DB, in each and every step and then terminates itself if some cancellation flag is set.This is a very tedious approach - Is there any event driven approach, may be terminating the WF Service thread for some specific instance by some mechanism? I can understand that I may need to use Cancellation Scope in order to roll back the transaction but how do I let know the WF Service to cancel the thread of some particular instance?

     I am looking for some generic maintainable solution for both the above scenarios.

    Thanks and Regards,

    Sandip



    Monday, May 19, 2014 8:04 AM

All replies

  • I think I got the answer to my 2nd query.I think I will have to use WorkflowControlEndpoint at the server side for all the services and WorkflowControlClient at the client side and within the Workflow Service I will have to use Transaction Scope and Compensation Activity or Cancellation Scope or both (which ever is required).But for the 1st query I still don't have any solution.Please help.

    Thanks and Regards,

    Sandip


    Monday, May 19, 2014 10:09 AM
  •   1)   I have a UI page which invokes a Workflow service(say via a button named Invoke) which is having say around 5 steps.Steps 1,3,5 are implemented as Code Activities while steps 2 and 4 are implemented as Activities(i.e. xaml files)  and each of these activities have internal steps which are again implemented as Code Activities.Now the user enters data in UI and presses a buton which invokes the service but then the service may throw Business exception at any of the steps within the service or the Activities.If any such error occurs, the user is provided a link with Re-Run option, clicking of which loads the WF Service instance with the same wf instance id but what I want is that now the WF Service should start pocessing from the step where it threw the error?

    Could you provide this sample so that I can reproduce this issue on my side?
    Tuesday, May 20, 2014 2:37 AM
  • Hi Cao.Ni,

                 Sorry,I don't have any sample as of now but I just wanted a generic design/implementation guideline to tackle scenario 1 in general.

    Thanks and Regards,

    Sandip

    Tuesday, May 20, 2014 7:41 AM