ilog.rules.res.session
Interface IlrSessionResponse
-
- All Superinterfaces:
- java.io.Serializable
public interface IlrSessionResponse extends java.io.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:
IlrSessionFactory factory = new IlrJ2SESessionFactory(); IlrStatelessSession session = factory.createStatelessSession(); IlrSessionRequest sessionReq = factory.createRequest(); sessionReq.setRulesetPath(IlrPath.parsePath("/loanvalidation/loanvalidationrules")); // Ensure that the last deployed version of the ruleset is taken into account sessionReq.setForceUptodate(true); sessionReq.setTraceEnabled(true); sessionReq.getTraceFilter().setInfoAllFilters(true); // Set the input parameters for the execution of the rules sessionReq.getInputParameters().put("loan", createLoan()); sessionReq.getInputParameters().put("borrower", createBorrower()); try { // execute rules and handle results IlrSessionResponse sessionResp = session.execute(sessionReq); report = (Report)sessionResp.getOutputParameters().get("report"); }
- Since:
- 7.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description IlrPath
getCanonicalRulesetPath()
Returns the canonical ruleset path used for ruleset execution.java.io.Serializable
getConnectionId()
Returns the connection ID.java.lang.String
getExecutionId()
Returns the execution ID for this response.java.lang.String
getInterceptorClassNameUsed()
Returns the name of the interceptor class used.java.util.Map<java.lang.String,java.lang.Object>
getOutputParameters()
Return aMap
object containing the output parameters for this ruleset.java.lang.String
getRulesetExecutionOutput()
Returns the output string.IlrExecutionTrace
getRulesetExecutionTrace()
Returns detailed information about the ruleset execution.java.util.Properties
getRulesetProperties()
Returns the ruleset properties.java.io.Serializable
getUserData()
Returns the user data.java.util.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
java.util.Map<java.lang.String,java.lang.Object> getOutputParameters()
Return aMap
object containing the output parameters for this ruleset.- Returns:
- The output parameters for this ruleset.
-
getConnectionId
java.io.Serializable getConnectionId()
Returns the connection ID.- Returns:
- The connection ID.
-
getUserData
java.io.Serializable getUserData()
Returns the user data.- Returns:
- The user data.
-
getWarnings
java.util.List<IlrWarning> getWarnings()
Returns the warning messages.- Returns:
- The list of warning messages.
-
getInterceptorClassNameUsed
java.lang.String getInterceptorClassNameUsed()
Returns the name of the interceptor class used.- Returns:
- The name of the interceptor class used.
-
getRulesetExecutionOutput
java.lang.String getRulesetExecutionOutput()
Returns the output string.- Returns:
- The output string.
-
getRulesetProperties
java.util.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
java.lang.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
-
-