The Maximo condition node allows to specify an condition in SQL format in order to drive the workflow in different ways depending on some custom logic.

In some cases the logic that has to be implemented can be quite complex and not easy to implement using SQL syntax. In this case we can use an Automation Script with Custom Condition Launch Point.
In the example we will look into the work orders tasks for a specific description – I know it’s a silly example 🙂
Custom Condition script
Open the Automation Scripts application and select action Create > Create Script with Custom Condition Launch Point. Create a script with the following data:
- Launchpoint: WFLP
- Object: WORKORDER
- Script: WFCOND
evalresult = False
tasksSet = mbo.getMboSet("WOACTIVITY")
task = tasksSet.moveFirst()
while task is not None:
if (task.getString("DESCRIPTION") == "TEST"):
evalresult = True
break
task = tasksSet.moveNext()
You can implement any logic you need in the Custom Condition. The only rule is that you have to return the evalresult variable set to False or True based on you desired logic.
Now you can use the script in your workflow.
Open the Workflow Designer application and edit your workflow to add a new condition node.
- Title: WFCOND:WFLP (script name and the launch point name must point to the script+launch point pair just created)
- Expression: com.ibm.tivoli.maximo.script.ScriptCustomCondition
- Custom Condition: True
Now test your workflow and verify it is working as expected.
References
Use an automationscript in a Condition node of a Workflow