Platform SDK: Exchange 2000 Server |
[This is preliminary documentation and subject to change.]
The workflow engine has a precedence order for row evaluation. The engine evaluates each row in the action table to find a match of current state, next state, and condition equals true between the work item and the action table row. In the following table the workflow engine will match both rows '4' and '5' when a document is saved in the workflow folder for the first time assuming the IsValidForm() condition is true.
ID | Event | CurrentState | NewState | Condition | Action | ExpiryInterval |
---|---|---|---|---|---|---|
4 | OnCreate | "" | Submitted | IsValidForm() | NotifyMgr() | |
5 | OnEnter | "" | Submitted | 15 minutes |
In this case the engine will match the OnCreate row first and execute its action, then the engine will match the OnEnter event and execute its action. In general, the engine will first look for an OnChange row to match the current state and next state fields. When it finds an OnChange row match, it looks for an OnExit row match. If it finds an OnExit row match, it will execute the OnExit action before proceeding with the OnChange action. After executing the OnExit action, it will execute the OnChange action and then look for an OnEnter row to match. If it finds a matching OnEnter row, it will execute its action script.
Event | State | Condition | Action | NewState |
---|---|---|---|---|
OnChange | A | X | I | B |
OnExit | A | Y | II | |
OnEnter | Z | III | B |
For example, given the preceding table the following precedence applies:
Order | Condition/Script |
---|---|
1st | execute condition X |
2nd | execute condition Y |
3rd | execute action II |
4th | execute action I |
5th | execute condition Z |
6th | execute action III |
The ActionTable includes an EvaluationOrder column for making explicit decisions regarding multiple matching rows during a single document transition. If this column is blank, no order is guaranteed when more than one row matches simultaneously.