开发者

How to handle user input in a workflow

I'm building a small workflow application to test out the abilties of WF.

What i got so far:

How to handle user input in a workflow

I can run the workflow and add the parameter that is used in the StartProcess operation. So the flow goes through the first decision and comes to either Invoice payment or Creditcard payment.

The next part is my question:

When the flow reaches the Invoce Payment sequence the next activities are called:

How to handle user input in a workflow

In this sequence I call a custom activity InitiateInvoicePayment which creates a new object for storing t开发者_开发知识库he invoice data. At this point I want the user to fill in the rest of the required data as shown as the receive activity but here is where i am stuck.

How can I stop the flow and wait for the users input, ideally trigger the client application to show a form based on a variable from the flowchart?


The Receive activity is gong to pause the workflow for you, no big problems there.

The UI side is a little different. There are several ways you can go about that. Something I often do is write these UI requests to a database and have the UI poll the table for the data in there. That way the request to compete the invoice data will show up soon enough. And a big advantage is that you are independent of the client UI actually being active at the time. You can also use something more direct, like a WCF Send activity and have the UI application listen for requests as the workflow generates them.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜