Wednesday 4 April 2012

How to create custom condition class

There are two types of Conditions in Condition Expression Manager:
1. Expression
2. Class


To use Type Class in Condition, need to create a custom condition class.
1. Create a custom condition class which implements CustomCondition interface.
eg:
public class ConditionClass implements CustomCondition {
public boolean evaluateCondition(MboRemote mbo, Object param)throws MXException, RemoteException
if(<business logic>)

{
<business logic>
return true;
}
else{
<business logic>
return false
}
}
public String toWhereClause(Object parm, MboSetRemote msr)throws MXException, RemoteException

{
<business logic>
 return <sql>
}
}

2. CustomCondition interface have two methods:
a. evaluateCondition(MboRemote mbo, Object param): this method is used to evaluate condition and returns either true or false based on the business logic written in it. This return boolean value.
 b.toWhereClause(Object parm, MboSetRemote msr) : This method is used to return sql to the object which this condition is applied.This returns String.

No comments:

Maximo SOAPUI error javax.xml.ws.WebServiceException

SOAPUI error while sending payload to below url (in cluster environment) http://localhost:9080/meaweb/services/MXASSET Error : <f...