Friday, February 1, 2013

Custom Condition Class

Custom Condition Classes can be created by implementing the interface CustomCondition. It defines the interface for custom classes that can be used to do condition evaluations at WFCondition nodes.

We can write our conditions in Conditional Expression Manager application in Maximo 7.x. But, there are some cases, that can't be evaluated using SQL queries.
(For example, In workorder workflow, we like to compare a value between WorkOrder and Location applications).

In these cases, we implement psdi.common.condition.CustomCondition class to write the Custom Class, and override evaluateCondition(MboRemote mbo, Object arg1) method.

toWhereClause(Object arg0, MboSetRemote arg1)  Convert the condition to a where clause. If the condition class will be used for "QUALIFIED" object security type as shown in below screen shot, this method should return a where clause. If the condition should NOT be used for "QUALIFIED", it should throw an exception to indicate it is an error when attempted to be used.



The sample code can be referenced in this link.

http://www.maximokb.com/kb/index.php?View=entry&EntryID=115

No comments:

Post a Comment