Launch ad-hoc activity within a workflow

I want to use WF 4 to replace the existing workflow solution we have. One of the features currently used in the existing workflow engine is the ability to cancel current activity and loopback for FlowSwitch type activity.

So, given the following rough workflow where we start with "O" and base in the input, the workflow follows the path to "A2", which is currently holding the s bookmark awaiting input.

         ---------A1--\
         |             \ 
        /\              \
O-------  ---->--(A2)-------|
     ^  \/              /   |
     |   |             /    |
     |   ---------A3--/     |
     |                      |  
     |----------------------|

      

However, some out-of-band data is coming in at the same time, so we have to cancel "A2" and go back to FlowSwitch to re-evaluate based on the new data. The question is, what is the best way to handle out-of-band data that has arrived?

My initial guess is to have a parallel operation with one branch waiting for out-of-band data and another branch containing the workflow described above. If the data were trapped waiting for out-of-band data, how would it cancel the current activity in the workflow and force it back into the FlowSwitch. Or, of course, there is a better way to handle it.

Actually I haven't worked with WF4 for WF3 at all, so I might be missing something obvious here.

+2


a source to share


1 answer


You can do this with a select operation instead of parallel. This will allow you to wait for multiple events, and the first is the branch that is being executed. Then you can go back to the beginning and start listening again if necessary



+1


a source







All Articles