Top.Mail.Ru
Event Processing
CTRL+K

Event ProcessingBETA

In this article
  • Event Processing
  • New Event
  • Output Processing
  • Waiting for Event
  • Output Processing
Note
  • 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.

Note

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.

Script schedule

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.

Process selection

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

New event block

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:

  1. Select From the list below from the dropdown.
  2. In the Events field, click Add and type or select the event name.

Event selection

You can apply filters to process only events that meet certain conditions — for example, based on event parameters, calculations, or time limits.

Event filtering

Filtering using custom formulas allows for more flexibility and helps exclude irrelevant events.

Formula-based filtering

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:

  1. In the For an object in which field, click Add. Add condition
  2. In the Process field, select a process from the Data Model. Select process
  3. In the Event field, enter or select the name of the event from the selected process.
  4. 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
    Formula selection
  5. 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
    For In the interval, set the time range. For others, provide a comparison value. Condition selection
  6. 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
    Data selection

Optionally, add a comment to describe the condition settings.

Add filter and comment

Click the delete icon to remove a condition. To add more, click Add again.

Add/remove condition

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

Process old events

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.

Block output

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.

The Waiting for event block

Note
  • 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.

Select process

After selecting a process, configure these parameters:

  • Specify the CaseID
  • Expected events
  • Restrict waiting time
  • For an object in which
  • Script execution schedule

Block parameters

Enable Specify the CaseID to define the object and start time for event monitoring.

Specify CaseID

In Expected events, click Add and enter or select the event name.

Select event

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.

Restrict waiting time

Note

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:

  1. Click Add in the For an object in which field.
  2. Select a Process from the Data Model. Select process
  3. 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.
  4. 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
    Formula selection
  5. 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
  6. 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. Data range
  7. 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
    Data selection

You can add a comment to the object to provide explanations or notes about the condition settings.

Add comment

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.

Condition management

The script schedule is configured like in the New event and Scheduler blocks.

Script schedule

Output Processing

Add automation blocks to handle the event data — for example, writing to a table or branching logic.

Post-block actions

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:

  1. The script is triggered by New event when an event occurs.
  2. Waiting for event waits for another event for the same process instance.
  3. If the event occurs in time, execution follows the Direct action branch.
  4. If not, execution follows the Timeout action branch.

Script with event processing

Was the article helpful?

Yes
No
Previous
Tools
We use cookies to improve our website for you.