If a workflow contains transactional activities that require compensation behavior, place the activities in a CompensatableTransactionScopeActivity activity.
If a workflow contains nontransactional activities that require compensation behavior, place the activities in a
What Is Compensation in Windows Workflow (WF)?
Transactions in a Workflow
You can handle cancellation at workflow level or locally for a particular composite activity. To define cancellation behavior, add child activities to a CancellationHandlerActivity activity.
Composite activities can contain multiple child activities. If the composite activity is canceled before all of its child activities finish executing, the workflow runtime engine invokes the cancellation handler for the composite control.
You can define fault-handler activities at the local level to handle exceptions that occur in the scope of a particular composite activity.
You can define fault-handler activities at the workflow level to handle exceptions that occur anywhere in the workflow.
In a professional Windows Workflow Foundation (WF) application, you must ensure that workflows handle issues such as database errors and connectivity problems robustly and predictably.