The execution mode and execution location determines how and when the system runs the process flow.
By default, when process flows are created, the execution mode is set to Synchronous, which requires that the process flow complete successfully prior to returning control to the calling event. Business processes that require successful updates to records or other functions that must be completed prior to continuation of the process should remain Synchronous. In other words, process flows that need to be executed immediately following a system action (the action is specified in the Event Handler) should be Synchronous.
Asynchronous execution mode places the process flow in a queue to be handled by an Application Server. This allows the local client machine to continue with other processes without requiring successful completion of the process flow. This mode of execution is most effective for the more complicated process flows that may otherwise result in delays to the user who must wait for the flow to complete. For example, process flows which result in generation of email notifications may not require completion prior to other functionality continuing and may provide more efficiency if set to Asynchronous execution mode.
Only Application Servers can execute Asynchronous process flows. See Administering Application Servers for information on Application Servers.
The execution location determines where the process flow is run. There are two locations available:
- Local: Processing of the process flow occurs on the local client machine.
- Server: Processing of the process flow occurs on an Application Server.
The combination of execution mode and execution location determines whether a Process Flow Runs record is created and where the process will physically execute.
Synchronous Execution Mode / Local Execution Location
When Execution Mode is set to Synchronous, Execution Location should be set to Local. The system does not create a Process Flow Runs record when using these settings. For these settings, when the process flow is fired, it immediately executes on the local computer.
Asynchronous Execution Mode / Server Execution Location
This configuration indicates that the process executes on an Application Server and that all subsequent processing continues on the local machine while this process flow is still running. The system performs the following actions after the process flow is fired:
- The system creates a Process Flow Runs record, but the Client Machine Name remains blank until the process is sent to a server (at which time the Application Server's name appears in this field).
- The Application Server polls the database server and picks up the Process Flow Run for execution.
- The process flow executes on the Application Server, and the Application Server returns information about the run to the database server.
When creating Process Flows for Application Servers, set the Execution Mode to Asynchronous and the Execution Location to Server. See Administering Application Servers for information on Application Servers.
Asynchronous Execution Mode / Local Execution Location
This configuration is only suitable for running process flows locally on an Application Server. This combination indicates that the process flow executes on the local computer and that all subsequent processing continues while this process flow is still running.
- The system creates a Process Flow Runs record. The Client Machine Name field is populated with the name of the local computer, which is also an Application Server.
- The local computer polls the database server and picks up the Process Flow Run for execution.
- The process flow executes on the local computer, which then returns information about the run to the database server.
In general, you should configure a process flow to use Asynchronous/Server or Synchronous/Local. If you want an Application Server to execute the process flow, configure it to use Asynchronous/Server. If you want a local computer to execute the Process Flow immediately following a trigger event, configure it to use Synchronous/Local.