The WaitForEvent Activity
The WaitForEvent activity enables the DCS Software Factory to correctly generate the proper DCS contract and service operations by providing the marker that defines when a process will return a response to the client application. You use the WaitForEvent activity to indicate when the workflow should wait for an incoming event from the client application.
You use WaitForEvent activities most often in conversational workflow implementations, where each WaitForEvent activity denotes the starting point of a conversation phase. For more information, see How the DCS Runtime Executes a Service Based on a Conversational Workflow and Building a Service by Using a Conversational Workflow.
The WaitForEvent activity is blocking, which means that if there are no corresponding events in the event queue for the workflow and no other execution context is available, the entire workflow idles until the required event occurs.
The following table describes the properties exposed by this activity.
Property Name |
Description |
---|---|
Action |
The name of the event that the activity receives. This parameter can contain any string, and must be provided to enable the DCS TaskFactory to create metadata that enables the client application to raise the event. In a conversational workflow, this string becomes the operation name for the follow-up operation in subsequent conversation phases in the conversation contract. |
EventReceived |
The event handler to invoke when the activity event receives the required event. |
IncomingContext |
The context value of the incoming call that raises the event. This might be different each time the activity receives the required event. |
InputData |
The data received as input at run time. To enable strongly typed data fields, specify the InputType property also. |
InputType |
The type of the incoming data. If you do not specify a value, DCS assumes the MessageBase type. |
ResponseType |
The type of the response data sent when the related SendResponse activity executes. If you leave this blank, DCS assumes the MessageBase type. |
UnexposedEvent |
Lets you hide the activity from the Update Stub and Operations recipe. Doing so prevents client applications from raising the event required to trigger this activity. However, you can still raise the event internally by using the SpawnChildProcess activity. For more information, see The SpawnChildProcess Activity. |
WithResponse |
Specifies whether the activity requires a corresponding SendResponse activity. |