It's possible to automatically start processes by sending a message to it from another process containing information.
How to make one process trigger another process
You need to configure the receiving process with a catching message on its start event and the sending process(es) with throwing messages on their intermediate or end events. In the receiving process, you can define the information that is required. After you have connected the two together you can configure how to send the required information in the sending process.
In the receiving process:
- Add a start event with a Message event trigger.
- Click on Configure message and name your message.
The text that you write in this field is what will be shown in the process. A process can have more than one receiving start event allowing the sending process to choose which one to send a message to.
- Required information or not?
A process can start with or without any data, and if your receiving process can be triggered without any information then your settings for the receiving process are done. But otherwise, you will need to follow the next steps as well to make the receiving message to pre-populate a form to contain the needed information.
- Add a data object to your start event with fields you want to populate with data from the sending process.
- Open the Configure message in the start event message settings
- Name the message fields in order to have them show up in the sending process, then select which fields in what form you want to populate.
- If you want to assign an already assigned user from a role in the sending process to a role in the receiving process, in the Roles section, fill in the role in your process you wish to add an already assigned user from the sending process to.
- Publish and deploy your process.
Only the fields specified in the receiving start message will be visible in the sending process end event detailed below.
In the sending process:
- Create a new pool in the sending process model, double-click the pool name to open the settings, and mark the pool as a black box.
- Click on Select app and browse your receiving process and click on save
- Add an event of the type throwing Message and connect it to the new pool by dragging an arrow from the event to the pool. This event can be either an intermediate or an end event.
Connect the data object containing the data you wish to send to the message event.
- Click on Configure message for the event and navigate to the Process message tab.
- If the receiving process has more than one message, select the one you are looking for in the drop-down. The section also shows whether the receiving process requests any information to get triggered, if so there are one or more values to be mapped from a form field or set by default.
- If your sending process should always send the same message, select the checkbox to the right of the form value and state your information. If your value should be fetched from a form field, then you have to connect a data object to your event, then go back to this message configuration and select the data object and state the form field.
- If there are any roles in the receiving process that are set to receive assigned performers from roles in the sending process, these will show up under Roles in the Process message tab in the Configure message window.
Any other process, in the same space, can send and trigger the receiving process. If you want the process to have the ability to be triggered manually, add a normal start event as well.
Comments
0 comments
Article is closed for comments.