I am using the following code to create list of rules fires in ODM ,but eclipse is showing above compilation error.
package com.cper.brms.model.questions;
import ilog.rules.res.session.IlrSessionRequest;
import ilog.rules.res.session.IlrSessionResponse;
import ilog.rules.res.session.ruleset.IlrBusinessExecutionTrace;
import ilog.rules.res.session.ruleset.IlrExecutionTrace;
import ilog.rules.teamserver.auth.AuthenticationCredentials;
import ilog.rules.teamserver.model.IlrConnectException;
import ilog.rules.teamserver.model.IlrSession;
import ilog.rules.teamserver.model.IlrSessionFactory;
import java.util.List;
import java.util.Map;
public class RulesTrace<IlrStatelessSession>
{
IlrSessionFactory sessionFactory = new IlrJ2SESessionFactory();
IlrSessionRequest sessionRequest = sessionFactory.createRequest();
String rulesetPath = "/miniloanruleapp/miniloanrules";
}
sessionRequest.setRulesetPath(IlrPath.parsePath(rulesetPath));
sessionRequest.setTraceEnabled(true);
sessionRequest.getTraceFilter().setInfoAllFilters(true);
Map<String,Object> inputParameters = sessionRequest.getInputParameters();
inputParameters.put("loan", loan);
inputParameters.put("borrower", borrower);
IlrStatelessSession session = sessionFactory.createStatelessSession();
IlrSessionResponse response = session.execute(sessionRequest);
IlrExecutionTrace sessionTrace = response.getRulesetExecutionTrace();
int rulesNumber = sessionTrace.getTotalRulesFired();
IlrBusinessExecutionTrace execResult = new IlrBusinessExecutionTrace(response.getRulesetExecutionTrace());
List<String> rulesFired = execResult.getRuleFiredBusinessNames();
loan = (Loan) response.getOutputParameters().get("loan");
}
Do I need to create any customized code to create sessionFactory or am i missing any jar?
Its the version mismatch causing the error.I have JAVAEE in my eclipse,but above code is for JavaSE. Changed the code to right version.