Output HashMap

The output HashMap has the following entries:

Rulebase Constant Equivalent String Constant Description
FUNCTION_SUCCESS FUNC_SUCCESS Set to Boolean.

TRUE, if function found and executed successfully else Boolean.

FALSE.

FUNCTION_RETURN_VALUE FUNC_RETURN_VALUE Output of the function.
FUNCTION_ERROR_MESSAGE FUNC_ERROR_MESSAGE Error message in case error occurred in function execution.

This error message is logged in the $MQ_HOME/elink.log file.

Implement custom function as a separate method and call it from execCustomFunction depending upon the FUNCTION_NAME passed in.

For example:

if (funcName.equals("checkNumber")) 
{
retValue = checkNumber(inArgs);
}

Compile the RulebaseCustomFunction.java. For example:

javac RulebaseCustomFunction.java -classpath $MQ_HOME/lib/mq/AllECMClasses.jar:$MQ_HOME/lib/external/log4j-1.2.14.jar
Note: Ensure that $MQ_HOME/lib/mq/AllECMClasses.jar and $MQ_HOME/lib/external/log4j-x.x.jar are in the classpath for compilation.

Copy the RulebaseCustomFunction.class file to $MQ_COMMON_DIR/<internal_enterprise_name>/rulebase folder and restart the application server.