User Tools

Site Tools


transformations:halt

HALT ON CONDITION

Category: Workflow / Internal


Description

This action aborts project execution if the specified condition is not fulfilled.


Use cases

The purpose of this action is to monitor data quality and prevent projects from producing incorrect results or exporting incorrect data.


Action settings

SettingDescription
Halt modeSelect the condition under which the project is halted. See table below. Options: Halt if table is empty,
Halt if table is NOT empty, Halt if the condition is true for EVERY row, or Halt if the condition is true for ANY row.
Error message(Optional) Enter custom text that will appear in the error message if an error occurs.


Halt mode options

Halt mode Description
Halt if table is emptyThis option stops the action chain and displays an error if the dataset is empty at the point of the Halt action.
Used in cases where the dataset is expected to have data at the time of the Halt action.
Halt if table is NOT emptyThis option stops the action chain and displays an error if the dataset is NOT empty at the point of the Halt action. Used in cases where the dataset is expected to NOT have data at the time of the Halt action.
Halt if the condition is true for EVERY rowThe option stops the action chain if the entered condition evaluates to TRUE for every row in the dataset at the time of the Halt action.
Halt if the condition is true for ANY rowThe option stops the action chain if the entered condition evaluates to TRUE for any row in the dataset at the time of the Halt action.

For either of the "condition" options, select how EasyMorph will react if the condition refers to a field, but the table has no rows (e.g. data) at the time of the Halt action. Options: Halt anyway or Do NOT halt.


Remarks

The condition must return either TRUE or FALSE for each row. If for some reason, it returns an error then the action will also fail.

If the condition is global (i.e. doesn't refer to any field) then it's still evaluated even if the dataset is empty.

The error message can be customized to provide more insight into the cause of the interruption. If custom error message text is not supplied, generic error language will be used, relative to the Halt mode selected.


Examples

Example: Let's assume we expect amounts to be numbers in all rows. If any values are NOT numeric, we want the action chain to stop. If the dataset is empty at this point, we want the action chain to continue - empty datasets will be handled downstream.

Source table:

Province Amount Total Tax
ON 1000 125
BC #N/A 187.5
QC 2000 270


Action parameters:

Halt mode is "Halt if the condition is true for ANY row"
The condition is "not isnumber([Amount])"
Choose "Do NOT halt" if the dataset has no rows

This will make the action stop project execution because one of the values in column "Amount" is not a number. If the entire dataset is empty, however, the project will continue.


Community examples


See also

transformations/halt.txt · Last modified: 2021/07/19 02:05 by craigt