DCSIMG
Confirmation in WF 4.0 - Manu Cohen-Yashar's Blog

Manu Cohen-Yashar's Blog

Confirmation in WF 4.0

WF 4.0 is a revolution in relation to WF 3.5. I want to speak about a new mechanism called conformation.

In WF 4.0 every CompensableActivity has three handlers:

  1. Cancellation handler
  2. Compensation handler
  3. Confirmation handler

The idea of Cancellation and Compensation is the same as it was in WF 3.5.
If the activity is still active (executing state) and an exception occurred or an activity on an upper level completes (the activity that contains the CompensableActivity) than the activity would cancel and the cancelation handler would run.
If the activity completed and an exception occurred than the activity would compensate and the Compensation handler would run.

But what is confirmation ?

Well,  when the workflow successfully completes, all CompensableActivity instances that have not been confirmed or compensated are automatically confirmed using the default order.

It is also possible to activate compensation and and confirmation explicitly.

When an CompensableActivity completes in returns a compensation token. This token can be used in a Compensate or Confirm activity to force compensation or confirmation.

Confirmation allows CompensableActivity to have two business zones
1. The main business can be compensated or canceled
2. If the the business succeeded a confirmation zone is executed (like a final stamp) and this activity cannot be compensated.

The result is stronger workflows and better business accuracy.

Microsoft has released few confirmation demos to demonstrate this.

Comments

No Comments

Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: