If there are not exception captured, CompensationHandler will not be executed.
Download the code here:CSWF4Designer.zip (77.99 KB)
To inspect the Workflow tree, we can use WorkflowInspectServices:
/// <summary> /// Use this method to list all sub activities /// WorkflowInspectServices: Provides methods /// for working with the runtime metadata for an activity tree. /// </summary> /// <param name="r... [More]
ETW stands for Event Tracking for Windows .So, what is ETW, simply put, ETW tracking means you can see tracking information in the famous Event Viewer.
How to do it
Let us create an extremely simple workflow just for tracking.Workflow: Workflow1.xaml
Enable ETW tracking:
Open Event Vie... [More]
So, here are two classic questions.1. When should we use WF - workflow?When we are going to design a long run application. for example, document approval system. Leave Request application, Over Time work Submit system. etc.All this applications have one common characteristic: lo... [More]
One of the great feature of WF4 is that we can create our own Activity (and its surface) very easy. For example, let's create a PersonInfoActivity:You will see this in workflow: But, can we make it more interesting? Say, let it looks like this: To do this: we need to create an Activity Designer, ... [More]
Create a database in SQL Server(SQL Server Express), create a table with the following sql statement:
Check the database, we would find nothing written to database, because there is an exception in TransactionScope Activity. Database ... [More]
You should find that the confirmation handler execution is inverse.
You should find that "token" is only related with compensable handler2
Scenario 3(append a compensate activity to the workflow):