Web Service and Script Execution Order

The SBM Application Engine executes Web service functions, scripts, transition attribute scripts, transition actions and state actions, and process app events in the following order:

  1. Web service function for the pre-transition context
  2. Script for the pre-transition context
  3. Transition attribute scripts for the pre-transition context
  4. Transition executed by users.
  5. Script for the post-transition context
  6. Transition attribute scripts for the post-transition context
  7. Web service function for the post-transition context
  8. Script for the post-state context
  9. Web Service function for the post-state context
  10. Script for the pre-state context
  11. Web Service function for pre-state context
  12. Transition completed and recorded in the database
  13. Transition actions
  14. Events are emitted
  15. Subtasks and posted items are submitted
  16. State actions are performed
Note: An orchestration workflow with a reply is treated the same as a Web service function in terms of when it is executed.