In this article, you will learn how to create If \ Else and Loops using the Conditions option.
Conditions are important factors in any development language when dealing with If \ Else and Loops. Kaholo makes no exception to this rule and enables you the ability to add conditions to your process executions.
If \ Else
In this example, we use the Hello World and HelloCode processes to demonstrate the If \ Else condition.
1. Open the project and select the pipeline that you want to update.
2. Let us first add a condition for the Hello World process. Select the Hello World process and click the Conditions drop-down menu.
3. In the Condition field, enter i > 5.
4. Now, let us set the condition for the HelloCode process. Select the HelloCode process and click the Conditions drop-down menu.
5. In the Condition field, enter i < 5.
6. In the Code environment, enter let i = 0.
7. After setting the condition, click Save and run the process by clicking the Execute button.
Upon saving and executing the pipeline, you will see that only the helloCode process has been executed.
The Blue font color indicates that the process didn’t pass the condition.