Table Of Contents
- Use case
- General description
- The different parts of the Conditional Transformer
- Video guide
Use case
While working with data a commonly used concept is conditional base interaction for which we use the if, else, then statements. The conditional transformer applies this concept to for example only perform manipulations if the data has a specific value.
General description
The Conditional Transformer enables decision-making within available data flows, by allowing you to execute other Transformers when certain pre-configured conditions are met.
The Conditional Transformer flow follows this decision-making structure:
- “If all conditions are met” → Yes→ Run Transformers defined under the “Then apply Transformers” option
- “If all conditions are met” → No → Evaluate if the option for “Else if these conditions are met” exists→
- Positive outcome → Apply configured Transformers
- Negative outcome → Do nothing, unless there are Transformers defined under the “Else apply Transformers” option; if so, those will be applied.
The different parts of the Conditional Transformer
-
If all conditions are met
This is a required component of the Conditional Transformer where the condition(s) can be defined. The conditions are data-driven and can be based on data retrieved by a Transformer or data that’s already available in the context. For example, you can use the HTTP Transformer to validate if an item already exists in another system and take action based on the result. -
Then apply Transformers
This is also a required part of the Transformer, which makes it possible to configure Transformer(s) to execute when the pre-defined condition(s) are met. For example, you can configure the Transformer to remove or add certain data to the context based on the outcome of the conditions. -
Else if these conditions are met
This is more or less the same as the “If all conditions are met” option, but has a lower priority. It only gets executed if the “If all conditions are met” option fails to meet its configured condition(s). -
Else apply Transformers
This optional component of the Transformer allows you to configure data Transformer(s) that run when condition(s) are not met under the “If all conditions are met” or “Else if these conditions are met” options.