The following table provides short descriptions of the activities currently defined by WF.
Activity Class | Purpose |
---|---|
CallExternalMethodActivity | Calls a routine in the external host program. Can push information from the workflow to the host program. |
CancellationHandlerActivity | Holds cleanup logic for a composite activity that is canceled before completion. |
CodeActivity | Executes Visual Basic or C# code in the workflow. |
CompensatableSequenceActivity | A SequenceActivity that can be compensated (undone). |
CompensatableTransactionScopeActivity | A TransactionScopeActivity that can be compensated (undone). |
CompensateActivity | Causes compensation for an activity that supports it (implements the ICompensatableActivity interface). |
CompensationHandlerActivity | Contains the activities that perform compensation for a composite activity. |
ConditionedActivityGroup | Controls execution of a group of child activities. Depending on conditions for each child, the child activities are executed until a condition on the ConditionedActivityGroup is true. This lets you potentially execute multiple instances of the same activities in parallel. |
DelayActivity | Adds a time delay to the workflow. |
EventDrivenActivity | Executes activities in response to an event. |
EventHandlersActivity | Associates events with activities to execute. |
EventHandlingScopeActivity | Provides scope for EventHandlersActivity objects. Executes a main activity and simultaneously executes one or more EventHandlers?Activity objects if their events occur while the main activity is running. |
FaultHandlerActivity | Handles specified types of exceptions. |
FaultHandlersActivity | Contains a sequence of FaultHandlerActivity objects. |
HandleExternalEventActivity | Responds to an external event raised by a host application. This object allows the host application to push information to the workflow code. |
IfElseActivity | Tests a condition for each child activity and executes the first activity with a condition that is satisfied. |
IfElseBranchActivity | Represents a branch for an IfElseActivity. |
InvokeWebServiceActivity | Invokes a web service. |
InvokeWorkflowActivity | Invokes another workflow. |
ListenActivity | Waits until one of its EventDrivenActivity children receives its event, and then executes that child. |
ParallelActivity | Executes two or more SequenceActivity objects at the same time. |
PolicyActivity | Represents a collection of rules consisting of conditions and corresponding actions. |
ReplicatorActivity | Creates copies of an activity. |
SequenceActivity | Executes child activities sequentially. |
SetStateActivity | Changes the state for a state machine workflow. |
StateActivity | Represents a state for a state machine workflow. |
StateFinalizationActivity | Contains activities to execute when a state machine workflow is leaving a state (sort of like a LeavingState event). |
StateInitializationActivity | Contains activities to execute when a state machine workflow is entering a state (sort of like an EnteringState event). |
SuspendActivity | Suspends the workflow, typically so you can handle some special error or condition. |
SynchronizationScopeActivity | Executes activities sequentially in a synchronized domain so they have mutually exclusive access to shared variables. |
TerminateActivity | Ends the workflow. |
ThrowActivity | Throws an exception. |
TransactionScopeActivity | Wraps a System.Transaction that you can roll back if it throws an exception. |
WebServiceFaultActivity | Handles a web service fault. |
WebServiceInputActivity | Publishes itself as a web service method and later executes when the method is called. |
WebServiceOutputActivity | Provides output for a web service method request made to a WebServiceInputActivity. |
WhileActivity | Repeatedly executes while a condition is satisfied. |
Many of these classes must be used in particular combinations. For example, a WhileActivity can hold only a single child activity, so if you want to execute more than one activity in a loop, you need to put them inside some other grouping activity. For example, you could place them in a SequenceActivity and then put the SequenceActivity inside the WhileActivity.
For another example, the ListenActivity can contain only EventDrivenActivity children (and it must contain at least two). In a typical workflow, the EventDrivenActivity children might contain HandleExternalEventActivity children to take action.