Condition launch point
Maximo conditions are based on the javacc parser that is used in workflows, conditional user interfaces, and others. One aspect of custom conditions lets you write a condition by using Java code, in case the condition is complicated enough to be encoded by using the javacc-based condition grammar. This launch point lets you avoid Java coding and enables you to attach a scripted condition to workflows and conditional user interfaces.
For example, assume that you want to add a condition to the workflow that changes the status of Asset from “not ready” to “operating” if the Asset has spare parts quantity total as greater than 10 and the asset vendor is not null.
In the Automation Scripts application, click
. Define the launch point by using a new script.Variable name | Variable type | Binding |
---|---|---|
vend | IN | vendor |
qtys | IN | sparepart.quantity* The asterisk * indicates that this value is an array. |
if vend is not None and qtys is not None and sum(qtys)>10:
evalresult=true
This evalresult is an implicit variable, which carries the Boolean result of the condition evaluation. It is predefined and is always there for condition launch points.
When you submit the design, it creates a script with the logic you defined. You must also attach the script to the actual condition, which is a manual process.