如何使用Rest服务API调用在Drools规则引擎中打开实时查询

如何使用Rest服务API调用在Drools规则引擎中打开实时查询,drools,kie,Drools,Kie,我使用RuleServicesClient在单独托管的KIE服务器上执行规则 总的来说,我使用以下代码来触发规则- RuleServicesClient ruleClient = kieServicesClient.getServicesClient(RuleServicesClient.class); List<Command<?>> cmds = new ArrayList<Command<?>>(); KieCommands commands

我使用RuleServicesClient在单独托管的KIE服务器上执行规则

总的来说,我使用以下代码来触发规则-

RuleServicesClient ruleClient = kieServicesClient.getServicesClient(RuleServicesClient.class);
List<Command<?>> cmds = new ArrayList<Command<?>>();
KieCommands commands = KieServices.Factory.get().getCommands();
cmds.add(commands.newInsert(test, "test1"));

BatchExecutionCommand batchExecutionCommand = CommandFactory.newBatchExecution(cmds, "sesion_1");       
ServiceResponse<ExecutionResults> response = ruleClient.executeCommandsWithResults(containerId, batchExecutionCommand);
在此方面的任何帮助都将不胜感激

谢谢

cmds.add(commands.newQuery("QueryResult","test_query"));