Conditional Trigger

Look here for more complex criteria to start a Process.

Conditional Trigger can be used to launch a Process using more complex condition than a simple schedule or file check. Condition is specified as a Subprocess, allowing the start condition to include anything you might need.

You can learn more about Triggers in general here.

What is Conditional Trigger?

Conditional Trigger starts the Process when a condition is met. The condition is defined as a Subprocess. Subprocess is executed with a specified time interval, and the logic within Subprocess decides if the main Process should start or not.

Usage

To use a Trigger in your Process, add it to your Process canvas, and connect it to the beginning of your Process using a Sequence flow. If you are using multiple Triggers in your Process, all Triggers must connect to the same shape, which is also the first non-Trigger shape in your Process.

Once added to your Process, you can change the Trigger's type to match your requirement and give it a unique name. By default, the Trigger's type will provide a corresponding name for the Trigger. You can then configure the parameters for the chosen Trigger type.

For Conditional Trigger, you first need to develop a Subprocess to use in the Trigger as a condition, before it can be added into the Process. Parameters defined for the Subprocess can be set in the Conditional Trigger after the Subprocess is chosen for it.

The Subprocess will trigger the Process if it returns a value which is not null or empty string. Returning any other value from the Subprocess, such as true, false, zero, or allowing an exception to propagate from the conditional Subprocess will launch the Process it is used in.

The specified conditional Subprocess will be executed through polling, and by default this happens every 60 seconds. This can be adjusted as needed to be faster or slower.

When the Subprocess is being executed by a Conditional Trigger, an Execution Instance will not be logged for the Subprocess unless the Subprocess encountered an error.

Configuration

To set up a Conditional Trigger, add the shape to Process canvas and connect it as part of your Process. After that, you can select the Trigger type and configure the parameters for it.

The common parameters available for all Triggers are explained on the Trigger reference page. The following configuration parameters are available for Conditional Trigger.

Poll interval in seconds

Numerical value to specify how often the conditional Subprocess is executed by this Process. Value is in seconds.

Note that only one instance of the Subprocess can be running at a time. If the execution of the Subprocess takes longer than this polling interval, it is allowed to finish before starting the next execution.

Polling will also wait until the main Process execution has finished if "Run only one conditional Process at a time" option is enabled.

Run only one conditional Process at a time

Toggle switch to select whether the main Process using this Conditional Trigger is allowed to have multiple Process Instances running at the same time, if the Process execution takes longer than the polling interval.

If enabled, the next poll and execution will start immediately after the earlier execution ended. Conditional Subprocess executions will also not happen for the duration of the main Process execution, if this option is enabled.

Subprocess

The Subprocess to poll for the conditional triggering.

Subprocess parameters

If the chosen Subprocess to poll for the condition includes parameters defined in its Trigger, they can be set here.

Using Environment Variables is possible in these parameter fields. You can learn more about using them at Environment Variables in Trigger parameters.

Do not log trigger parameters

Toggle option that when enabled, hides the Trigger parameters from being logged in Process Instances.

Reference Values

In addition to the default Trigger reference values, Conditional Trigger provides the following additional value.

#trigger.data (Frends.ExecutableProcess.CaseInsensitivePropertyTree)

Object containing the data derived from input parameters and the resulting data from processing the Trigger.

#trigger.data.result (Dynamic)

When using Conditional Trigger, the resulting values from the Subprocess will be available under #trigger.data.result reference value object. Frends and Newtonsoft library working within the Process executions may deserialize the content in the object into other types implicitly, such as converting a date string into a date object automatically.

Last updated

Was this helpful?