Question:
What is difference between invoking a workflow through:
- Run Process on the Server “(Administration – Server Management > Jobs)”
- Run process using business service “Workflow Process Manager (Server Request)”
- Run process in application object manager using business service “Workflow Process Manager”
Answer:
If we run a workflow process through Administration – Server Management > Jobs or using “Workflow Process Manager (Server Request)” it will be executed in Asynchronous mode
If we run Workflow process through BS “Workflow Process Manager” it will run in Synchronous mode.
Difference between Asynchronous and Synchronous mode:
- Asynchronous mode means that user does not have to wait for process to complete. He will get the control back after submitting the request and Server will execute it later.In Synchronous mode user will get the application control back only, when the execution of the process is complete.
- In case an error occurs while running the asynchronous process user will not get any error message and workflow will go in Exited state.In case of error in Synchronous mode, error message is displayed to the user (unless it is explicitly suppressed through error handling)
- As Asynchronous processes are executed in server context any function related to user session will not work. For example following functions will return null if used in a workflow process running in Asynchronous mode.
TheApplication().ActiveBusObject();
TheApplication().GetProfileAttr();
TheApplication().ActiveViewName(); - Above given functions will work fine if that process is executed Synchronously without any change.
