Connect to Other Processes and Services
More likely than not, you’ll need to define interactions across business processes within a process-oriented application. For example, your business process may need to invoke an external service, call another process from within the current process, or pass a message to a process outside of the current process. Use these system and event flow elements to model communication between processes and services.
Flow Element | Description |
---|---|
Service Task |
Use the service task to communicate with other processes and services. Add the service task when you know that your business process must invoke an external service or process. When the service task invokes a process or service, the token waits at the service task until a response is returned. After the response is received, the token continues to the next sequence flow in the process. For example, the following process uses the service task to save the finalized sales quote to a database.
The service task has similar behavior to the send and receive task pair and the message throw and catch event pair. The primary difference is that the service task invokes processes and services synchronously. |
Notify Task icon |
Use the notify task to generate and send notifications. The notify task, which is similar to the service task, uses a predefined service to perform notifications. You use expressions to determine which users receive the notifications generated by the notify task. Currently, email is the only type of notification supported in Process. This type of notification sends an email to the users you specify. |
Call Activity |
Use the call activity to call a reusable process from within the current process. The process being called becomes a child process of the calling process. When calling a reusable process, the call activity of the parent process waits until the child process completes before continuing. Data objects of the parent process aren’t automatically available to the reusable process. Data objects must be passed to and from the child process using argument mapping of the call activity. See About Reusable Processes (Reusable Subprocesses). |
Send and Receive Tasks |
Use the send task to pass a message to a system or business process outside of the current process. After this message is sent, the task is complete and the running of the business process continues to the next task in the process flow. You frequently pair the send task with the receive task to invoke a business process or service, and then receive a response in return. The receive task waits for a message from a system or business process outside the current business process. After this message is received, the task is complete and the running of the business process continues to the next task in the process flow. You can also use the receive task to trigger the start of a business process. This approach is useful when you want to invoke a process from another business process using a send task. To start a business process using the receive task, the following conditions must be met:
The send and receive tasks invoke business processes and services asynchronously. If you need to invoke a business process or service synchronously, then use the service task instead. The send and receive tasks perform functions similar to the message throw and catch events. However, you can’t use the send task to invoke a business process that is initiated with a message start event. See Using Send and Receive to Communicate Between Processes. |
Message Throw and Catch Events |
Use the message throw event to send a message to another business process or service. First, you add a message throw event to a business process to define where that business process must invoke another business process or service. You must also implement the connectivity with other business processes, and create and implement the services invoked by the message throw event. See Communicate Between Processes. Message throw events are frequently used with message catch events to receive a response from the business process or service invoked. After the message throw event sends a message to another business process or service, the token immediately moves to the next flow element of the business process. See Use Message Throw and Catch to Communicate Between Processes. The message throw and catch events invoke business processes and services asynchronously. If your process needs to receive a response synchronously, then use the service task instead. You can use a message throw event to invoke other business processes by calling the message start event of another business process. See About the Message Start Event. |