Web Service and Script Execution Order

The SBM Application Engine executes Web service functions (see note below), SBM AppScript 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. SBM AppScript for the pre-transition context
  3. Transition attribute scripts for the pre-transition context
  4. Transition executed by users.
  5. SBM AppScript for the post-transition context
  6. Transition attribute scripts for the post-transition context
  7. Web service function for the post-transition context
  8. SBM AppScript for the post-state context
  9. Web Service function for the post-state context
  10. SBM AppScript 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's executed.