[
https://issues.jboss.org/browse/DROOLS-1185?page=com.atlassian.jira.plugi...
]
gravity Blast! commented on DROOLS-1185:
----------------------------------------
private static KieContainer kieContainer = null;
public static void main(String[] args) {
testRule();
}
private static synchronized KieContainer getKieContainer() {
if (kieContainer == null) {
KieServices kieServices = KieServices.Factory.get();
kieContainer = kieServices.getKieClasspathContainer();
}
return kieContainer;
}
public static void testRule(){
StatelessKieSession ksession =
getKieContainer().getKieBase("drlRules").newStatelessKieSession();
testObject test = new testObject();
List<String> myArrayRes = new ArrayList<String>();
myArrayRes.add("A");
List<String> myArrayRes2 = new ArrayList<String>();
myArrayRes.add("E");
test.setMyArray(myArrayRes);
test.setMyArray2(myArrayRes2);
response resp = new response();
resp.setSuccess(true);
List<GenericCommand<?>> commandList = new
ArrayList<GenericCommand<?>>();
commandList.add(new InsertObjectCommand(test));
commandList.add(new InsertObjectCommand(resp));
BatchExecutionCommand batchCommand = new BatchExecutionCommandImpl(commandList);
ksession.execute(batchCommand);
}
Drool Modify operator causing ClassCastException
------------------------------------------------
Key: DROOLS-1185
URL:
https://issues.jboss.org/browse/DROOLS-1185
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 6.4.0.Final
Environment: JBoss BRMS 6.3 on EAP 6.4.6
Reporter: gravity Blast!
Assignee: Mario Fusco
Priority: Blocker
Attachments: modify-issues.zip
When using the modify operator in Drools I am getting a java.lang.ClassCastException:
org.adcb.finance.ResponseFact cannot be cast to org.drools.core.common.InternalFactHandle.
This seems to happen in rules that contain Arrays & using the in/not in operator on
them. I have other rules using the matches regex expression and I dont get this issue.
This is a critical issue for us as we're using the RulesExecutionService in 6.4.0 to
extend the KIE Execution service and are due to go live very soon so there is no chance of
rolling back to 6.3.x without some heavy rework.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)