Overview
Some Flows, such as the Flows below, can be executed conditionally:
- Send email
- Execute SQL
- Merge data with template
- Call HTTP endpoint
- Execute shell (command line) script
Example
The Flow sends emails to the finances after loading data to the data warehouse. It is possible to send these emails conditionally, for instance, when the number of new orders is larger than the configured threshold.
Process
Here's how you can execute a Flow conditionally:
Step 1. Create a Flow.
Step 2. Add the following code into the Script
field:
var ret = null;
if (conditon) {
ret = com.toolsverse.etl.core.engine.TaskResult.STOP;
}
value = ret;
Alternative
You can use this technique when the Flow you want to execute conditionally is a part of the nested Flow.
Comments
0 comments
Please sign in to leave a comment.