views:

197

answers:

1

I need to develop a workflow for a call center. A bot will ask some predefined questions to the caller. Based on the answers the workflow will decide the questions to ask and finally redirect the caller to a representative that has required skills.

Based on the scenario above, I have several questions.

How can I make the workflow "wait" between asking a question to the caller and receiving response from the caller? Do I have to use HandleExternalEvent? If so do I have to define an event for every question?

Flowchart workflow seems to be the best solution but I can't imagine how to handle this waiting issue right now.

Any help is appreciated.

+2  A: 

HandleExternalEvent is a WF3 concept that doesn't exist in WF4 anymore.

Waiting in WF4 can be done using a NativeActivity derived activity and a bookmark. The activity creates the bookmark and the workflow runtime waits for the bookmark to be resumed. This can be done from some other place, either through a WorkflowApplication or a workflow extension and once done the activity is finished and the workflow continues.

Here is an example using an IWorkflowInstanceExtension.

Maurice