In this article, we are going to show how to use a Bind Variable :{variable}: directly in the Condition expression of the bind link.

The idea is to execute (or not) the bound action, depending on a bind variable value.

The process

Our process starts with a SqlOperation, which contains a SELECT statement returning the "val" column (SELECT val FROM ...).

Then, a Scripting action simply prints the value of the :{val}: bind variable:

println(:{val}:);

06-01

What we want to do is conditionning the Bind link at execution, so that the action is executed only when val != 1.

Here is the expression that we placed in the execution condition of the Bind link :

%b(rhino){":{val}:" != "1"}b(rhino)%

This syntax enables the condition to be evaluated in the bind context, thanks to the b(rhino) delimiter. This way, the :{val}: variable can be used in the condition.