Event ProcessingBETA
- These features are available in the beta version. Try them out and share your feedback — it helps us improve the product.
- ClickHouse version 25.3.2.39 or higher is required for these features to work correctly.
Event processing is a real-time data handling method that allows the system to instantly react to events as they occur. This method enables monitoring process changes and automatically triggering actions when specific conditions are met.
Two automation blocks are designed for event processing:
New Event
This trigger block launches a script when a new event that meets specified conditions occurs.
To use this block, a process must be configured in the Data Model.
New event block parameters:
- Script execution schedule
- Process
The execution schedule is configured similarly to the Scheduler block.
Specify the process whose events will be monitored by the block. If no process is configured in the Data Model, the block will be visible but cannot be configured or used.
Once a process is selected, the following parameters appear in the block:
- Events
- Object to check for the event
- Process past events on first run
In the Event occurred field, choose an event to monitor:
- Any — triggers the script on any new event in the selected process
- From the list below — specify individual events that will trigger the script
To specify an event:
- Select From the list below from the dropdown.
- In the Events field, click Add and type or select the event name.
You can apply filters to process only events that meet certain conditions — for example, based on event parameters, calculations, or time limits.
Filtering using custom formulas allows for more flexibility and helps exclude irrelevant events.
To remove an event, click the delete icon. To add multiple events, click Add again.
Then add a condition to trigger the script. You can define one or multiple conditions.
To add a condition:
- In the For an object in which field, click Add.
- In the Process field, select a process from the Data Model.
- In the Event field, enter or select the name of the event from the selected process.
- In the Formula field, you can:
- Enter a custom formula
- Use the predefined Number of events formula
- Use other built-in formulas for Data Model calculations
- In the Condition field, choose a comparison:
- In the interval
- Equals
- Does not equal
- Greater than
- Less than
- Greater than or equal to
- Less than or equal to
- Empty value
- Non-empty value
- Select which data to consider:
- No limit
- For the last…
- If For the last… is selected, specify a time range (days, hours, minutes)
- Until the moment of calculation
- Up until the event occurs
Optionally, add a comment to describe the condition settings.
Click the delete icon to remove a condition. To add more, click Add again.
If you want to process events that occurred before the block's first execution, enable the switch and select a time range:
- All time
- From a specific date
Output Processing
The block returns:
- Process instance ID
- Event name
- Event time
Use other automation blocks to process this data — for example, to write event data to a table or perform follow-up actions.
The Waiting for event block is also available for event-based scripting.
Waiting for Event
The Waiting for event block pauses the script until a specific event occurs.
This block only works with the New event trigger, as it relies on the process instance from that trigger.
- A process must be configured in the Data Model for the block to work.
- Mapping from blocks before Waiting for event is not supported.
- This block cannot be tested in isolation. Test the full script instead.
Specify the process whose events will be monitored. Without a configured process, the block cannot be used.
After selecting a process, configure these parameters:
- Specify the CaseID
- Expected events
- Restrict waiting time
- For an object in which
- Script execution schedule
Enable Specify the CaseID to define the object and start time for event monitoring.
In Expected events, click Add and enter or select the event name.
You can configure a filter for an event to process only those events that meet specific conditions. Filters allow you to check event parameter values, perform calculations on data, and limit the time window. Filtering helps define precise trigger conditions for the script and exclude irrelevant events.
If needed, you can delete an event by clicking the corresponding button. You can also add multiple expected events—click Add and select the desired event.
To define an event waiting period, enable the Restrict waiting time toggle and specify the duration in days, hours, or minutes.
After Waiting for event, the script continues along one of two branches. If the event occurs, execution continues via the Direct action branch. If the event does not occur in time, it follows the Timeout action branch. See Output Processing for more details.
You can add one or more conditions.
To add a condition:
- Click Add in the For an object in which field.
- Select a Process from the Data Model.
- In the Event field, select the event that will be used for the check. To do this, either type the event name or choose it from the list of events for the specified process.
- In the Formula field, you can:
- Enter a custom formula
- Select the built-in Number of events formula — which counts how many times the event occurred within a process instance
- Use suggested formulas to calculate values based on data from the workspace Data Model
- Specify the comparison condition:
- In the interval
- Equals
- Does not equal
- Greater than
- Less than
- Greater than or equal to
- Less than or equal to
- Empty value
- Non-empty value
- If the In the interval condition is selected, define the time interval. For the Equals, Does not equal, Greater than, Less than, Greater than or equal to, and Less than or equal to conditions, specify the value to compare against.
- Specify which data should be considered:
- No limit
- For the last…
- If the For the last… option is selected, you can define a time interval in days, hours, or minutes
- From the start of waiting for the event
- Until the moment of calculation
- Up until the event occurs
- Before waiting for the event
You can add a comment to the object to provide explanations or notes about the condition settings.
If needed, you can delete the condition by clicking the corresponding button.
You can also add an additional condition—click Add and repeat the steps for adding a condition.
The script schedule is configured like in the New event and Scheduler blocks.
Output Processing
Add automation blocks to handle the event data — for example, writing to a table or branching logic.
The block returns:
- Direct action branch:
- Process instance ID
- Event name
- Event time
- Process ID where event occurred
- Timeout action branch:
- Process instance ID
- Timeout expiration time
- Process ID where event was expected
Script execution flow:
- The script is triggered by New event when an event occurs.
- Waiting for event waits for another event for the same process instance.
- If the event occurs in time, execution follows the Direct action branch.
- If not, execution follows the Timeout action branch.
Was the article helpful?