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.
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");
}
| 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 a
Map 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.
|
IlrPath getCanonicalRulesetPath()
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.java.util.Map<java.lang.String,java.lang.Object> getOutputParameters()
Map object containing the output parameters
for this ruleset.java.io.Serializable getConnectionId()
java.io.Serializable getUserData()
java.util.List<IlrWarning> getWarnings()
java.lang.String getInterceptorClassNameUsed()
java.lang.String getRulesetExecutionOutput()
java.util.Properties getRulesetProperties()
IlrExecutionTrace getRulesetExecutionTrace()
IlrExecutionTrace for this response object.java.lang.String getExecutionId()
© Copyright IBM Corp. 1987, 2017