Start Business Process by internal event
If you have several Business Processes (BP) where one BP produces data for another, you can apply the event-based communication mechanism and configure the data transfer between them. You can set a sub-process to start from another BP based on a specific event or set transaction processing to be launched from another transaction in a different BP using no-code sub-process steps.
No-code sub-process execution steps
Event-based communication enables sending data from one BP to another synchronously and asynchronously. To configure at which stage of the main BP to send an event and which BP should receive the event, add a no-code asynchronous or synchronous sub-process execution step when designing your BP.

Both steps are of the ETL type and have one dynamic field to configure.
You can insert one of the following no-code sub-process execution steps in any place of the main BP:
Asynchronous Sub-process Execution sends data to a sub-process and proceeds to the following step immediately.

Synchronous Sub-process Execution waits until a sub-process finishes the step that has the export plugin with the
send-to-external-connectorattribute.The output data from the sub-process is written over the input data from the main BP. Mind that system fields with the
_sysprefix are filtered out during merging. Thus, if the sub-process adds some_sysfields to its output data, they are not transferred to the main BP.
For both synchronous and asynchronous execution types, the output data of the step before a sub-process execution step is the input data for the sub-process.
Configuration
To start a BP by an event, configure the signal ID parameter for your sub-process. The parameter is used to find a sub-process BP instance or a BP definition if there are no active instances in the same way as for the REST connector. Perform the following steps:
Go to the sub-process's Data tab and select the Streaming Records from External Sources checkbox.
In the field next to the checkbox, enter the signal ID parameter you want to use for this sub-process.

For the synchronous sub-process execution, add the
send-to-external-connector="true"attribute to the export plugin of the step that returns data to the main BP. Usually, it is the last step of your BP, for example:<?xml version="1.0" encoding="UTF-8"?>
<config charset="UTF-8">
<!--Your business logic ...-->
<export include-original-data="true" send-to-external-connector="true">
</export>
</config>warningIf you do not add the
send-to-external-connectorattribute to the export plugin of any sub-process step, a record in the main BP freezes at the sub-process step even when the sub-process finishes. As a result, the main BP fails to finish.On the Workflow tab of the main BP, add a sub-process execution step—asynchronous or synchronous.
Asynchronous Sub-process Execution

Synchronous Sub-process Execution:

Double-click the step in the process to open its settings. On the Design tab, in the Signal ID field, enter the signal ID parameter used for the sub-process.

The configuration is saved in a Bot Task content XML:
<?xml version="1.0" encoding="UTF-8"?>
<config type="bp-call-event">
<signalId>{{signal_2}}</signalId>
<synchronous>true</synchronous>
</config>If no BP exists with the signal ID specified in the step settings, a new BP instance for that signal ID is started. The BP definition is based on the most recent run with the same signal ID.
Run the sub-process (optional) and the main BP. If you do not start the sub-process, it is started automatically when the record reaches the sub-process execution step in the main BP.
Execution
The main BP acts as a client that utilizes the external connector mechanism to trigger the processing of some records for specified signalID. The common input connector record queue is used to send an event for processing, and a separate queue is used to transfer results.
Mind the following execution logic:
- The main BP cannot send events to itself. You cannot specify the signal ID parameter that points to the BP for which you configure the sub-process execution step. However, you can send events to the main BP from other BPs.
- If the multi-column export plugin is used in the sub-process result step, the first result record goes to the main BP. Other records are ignored.
- If you stop or pause the main BP, the sub-process is unaffected.
- If the sub-process fails, the sub-process execution step in the main BP fails as well.
- The sub-process execution step cannot be stateless.