Summary

This section handles Conditions.

Conditions are a major factor in any development language when dealing with If \ Else and Loops. Kaholo makes no exception.

In this part you will learn how to add conditions to the execution.

By the end of this section you will be able to execute maps in loops and also use if \ else and spread execution

If \ Else

In this example of If \ Else condition we created 0n each process a condition.

 

In the code we did:

 let i = 0 

After saving and executing the map – you can see that only the helloCode process been executed.

The blue color means that the process didn’t pass the condition.

Loops

In order for executing a process over and over again you must do the following

  • Start with a simple design and draw the loop.
  • Add condition

  • Change in the Flow Control the “Process Coordination” to “run for each in link”

  • Add Pre Hook function

 

Implement the code as follows

 let i = 0;
function doCondition() {
   i++;
}

Another way to do the condition is to simply replace in the hook the call for function code and simply write i++ which will do the same work.

Now just save the map and execute.

Mandatory Condition

If you will check the Mandatory condition you – in case the process will NOT pass the condition the map will stop the execution.

 

Close Menu