I have following code generate the JSON /XML. But in the process it loses agenda filter in fire-all-rules object. I tried to post Json with "agendaFilter":{"name":"SetAdUserLastName","accept":true} but it did not fire the matched rule. Does the Kie server support agenda filter posted from JSON/XML
user usr = new user("PreHire","111","Y","Y","");
aduser adu = new aduser("", "");
InsertObjectCommand insertUsr = new
InsertObjectCommand(usr);
InsertObjectCommand insertAD = new
InsertObjectCommand(adu);
FireAllRulesCommand fireAllRulesCommand = new FireAllRulesCommand();
fireAllRulesCommand.setMax(1);
fireAllRulesCommand.setOutIdentifier("firedActivations");
fireAllRulesCommand.setAgendaFilter(new
RuleNameEndsWithAgendaFilter("faculty"));
List<GenericCommand<?>> commands = new ArrayList<GenericCommand<?>>();
commands.add(insertUsr);
commands.add(insertAD);
commands.add(fireAllRulesCommand);
BatchExecutionCommand command = (BatchExecutionCommand) new BatchExecutionCommandImpl(commands);
String xStreamXml = BatchExecutionHelper.newXStreamMarshaller().toXML(command);
//
String json = BatchExecutionHelper.newJSonMarshaller().toXML(command);
System.out.println(xStreamXml);
System.out.println(json);
{
"batch-execution": {
"commands": [{
"insert": {
"entry-point": "DEFAULT",
"object": {
"eventhandlers.affiliationshandler.user": {
"id": 111,
"affiliateStatus": "PreHire",
"howAffiliated": "",
"deceased": "Y",
"emeritus": "Y"
}
}
}
}, {
"insert": {
"entry-point": "DEFAULT",
"object": {
"eventhandlers.affiliationshandler.aduser": {
"firstName": "",
"lastName": ""
}
}
}
}, {
"fire-all-rules": {
"max": 1,
"out-identifier": "firedActivations"
}
}]
}
}
--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/1d030d90-d6e3-497c-89e1-73482ed3d6d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage+unsubscribe@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/719d0d7c-9a12-425e-821d-06e2ff6a4450%40googlegroups.com.