Row Evaluation Order
Row Evaluation Order
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
When the workflow engine finds more than one match for a single state transition, it evaluates action table rows in a clearly defined order. The following table contains two rows from a larger action table. The workflow engine matches both rows 4 and 5 when a document is saved in the workflow folder for the first time.
ID | Event | CurrentState | NewState | Condition | Action | ExpiryInterval |
---|---|---|---|---|---|---|
4 | OnCreate | "" | Submitted | True | NotifyMgr() | |
5 | OnEnter | "" | Submitted | True | 15 minutes |
For the preceding table, the workflow engine follows this order:
- Matches the OnCreate row first and executes its action.
- Matches the OnEnter event and executes its action.
The workflow engine obeys the following rules in all cases:
- Looks for an OnChange row to match the current state and new state fields.
- Finds an OnChange row match and looks for an OnExit row match.
- Finds an OnExit row match and executes the OnExit action.
- After executing the OnExit action, executes the OnChange action.
- Looks for an OnEnter row to match. If it finds a matching OnEnter row, it executes its action script.
For more information about events, see Event Types.
The following two tables illustrate the evaluation rules for all cases. The first table represents an action table with symbols for the different states, conditions, and actions. The second table shows the order in which the workflow engine performs the actions.
EventType | State | Condition | Action | NewState |
---|---|---|---|---|
OnChange | A | X | I | B |
OnExit | A | Y | II | |
OnEnter | Z | III | B |
Given the preceding table, the following order applies:
Order | Condition/Script |
---|---|
1st | Condition X returns true |
2nd | Evaluate condition Y |
3rd | Evaluate action II |
4th | Evaluate action I |
5th | Evaluate condition Z |
6th | Evaluate action III |
The ActionTable Property includes an EvaluationOrder column so you can define the order in which multiple matching rows will be evaluated during a single document transition. If the EvaluationOrder column is blank, no order is guaranteed when more than one row matches.
Send us your feedback about the Microsoft Exchange Server 2003 SDK.
Build: June 2007 (2007.618.1)
© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.