Rule Execution Server API

ilog.rules.res.session
Interface IlrSessionResponse

All Superinterfaces:
Serializable

public interface IlrSessionResponse
extends Serializable

IlrSessionResponse encapsulates the response to a stateless rule session invocation or to an execute of a stateful rule session invocation.

Code example

The following code example shows how to execute rules and handle results:

   String rulesetID= "/loanvalidation/loanvalidationrules";
   IlrSessionRequest sessionRequest = new IlrSessionRequest(rulesetID);
   IlrSessionParameters parameters = sessionRequest.getExecutionSettings()
       .getInputParameters();
   parameters.setParameter("borrower", controller.getBorrower());
   parameters.setParameter("loan", controller.getLoan());
   try {
     // execute rules and handle results
     IlrSessionResponse sessionResponse =  ruleSession.executeRules
       (sessionRequest);
     Report report = (Report) sessionResponse.getOutputParameters().get("report");
   }
 

Since:
7.0

Method Summary
 IlrPath getCanonicalRulesetPath()
          Returns the canonical ruleset path used for ruleset execution.
 Serializable getConnectionId()
          Returns the connection ID.
 String getExecutionId()
          Returns the execution ID for this response.
 String getInterceptorClassNameUsed()
          Returns the name of the interceptor class used.
 Map<String,Object> getOutputParameters()
          Return a Map object containing the output parameters for this ruleset.
 String getRulesetExecutionOutput()
          Returns the output string.
 IlrExecutionTrace getRulesetExecutionTrace()
          Returns detailed information about the ruleset execution.
 Properties getRulesetProperties()
          Returns the ruleset properties.
 Serializable getUserData()
          Returns the user data.
 List<IlrWarning> getWarnings()
          Returns the warning messages.
 

Method Detail

getCanonicalRulesetPath

IlrPath getCanonicalRulesetPath()
Returns the canonical ruleset path used for ruleset execution.

Returns:
This method should never return null. If it does, a problem has occurred with the execution unit (XU), which was not able to provide the canonical ruleset path to the session.

getOutputParameters

Map<String,Object> getOutputParameters()
Return a Map object containing the output parameters for this ruleset.

Returns:
The output parameters for this ruleset.

getConnectionId

Serializable getConnectionId()
Returns the connection ID.

Returns:
The connection ID.

getUserData

Serializable getUserData()
Returns the user data.

Returns:
The user data.

getWarnings

List<IlrWarning> getWarnings()
Returns the warning messages.

Returns:
The list of warning messages.

getInterceptorClassNameUsed

String getInterceptorClassNameUsed()
Returns the name of the interceptor class used.

Returns:
The name of the interceptor class used.

getRulesetExecutionOutput

String getRulesetExecutionOutput()
Returns the output string.

Returns:
The output string.

getRulesetProperties

Properties getRulesetProperties()
Returns the ruleset properties.

Returns:
The ruleset properties.

getRulesetExecutionTrace

IlrExecutionTrace getRulesetExecutionTrace()
Returns detailed information about the ruleset execution.

Since:
7.0
Returns:
The IlrExecutionTrace for this response object.

getExecutionId

String getExecutionId()
Returns the execution ID for this response. This is equal to the connection id if it was not supplied in the request.

Returns:
the execution ID for this response

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013