Business rules can use the Query Home to bind to a variable, while static methods on the conditions interface must be accessed as illustrated below.
The bind can be found within the 'Binds to' dropdown as shown below.
Configuration
To use any bind:
Example
The following is example JavaScript that uses this bind.
Important: The example scripts should not be used as-is without thorough testing, including updating the script to match object and link types that exist on your system.
A query that matches entities of object type 'location' with the value 'No' for attribute 'active' could be formulated as follows, where 'Query Home' is bound to variable 'qh' and 'STEP Manager' is bound to 'manager'.
var c = com.stibo.query.condition.Conditions;
var querySpecification = qh.queryFor(com.stibo.core.domain.entity.Entity).where(
c.valueOf(active).eq("No").and(c.objectType(location))
);
var queryResult = querySpecification.execute();
2019, Stibo Systems – Confidential