Practical example: Handling variables
Context:
Let's imagine a flow where the objective is to receive a list of guests and validate that the guest and their possible companion are authorized to enter the party.
Entry data:
Business rule:
The flow will hit a REST CLIENT passing the name and age information for data validation. If there are companions, it will fall into a branch of the flow.
From this point on, let's assume that the element is the following object
Within the Festa.io module, we'll configure it as follows:
Where "nome" and "idade" are operation parameters and we will fill in this information via the element parameter by specifying the "Path" within each operation parameter.
Using the IF module, we will check for the existence of a companion for the guest.
We can see that variable 1, from the first condition, also refers to the element parameter, but now the property we are interested in is called "subConvidado". Knowing this, we define the path as shown in the image:
At this point, we have already configured the validation of user information for the Festa.io module and we have also validated the existence of a companion for different approaches within the same flow.
The other modules not detailed in the example follow the structure and logic of those already detailed in this article.
Last updated