/** * Gets an input-only list. * @param message the message * @param operation the operation * @param runtime the runtime engine * @return the input-only list */ public static List<Object> getInputOnlyList(Message message, KnowledgeOperation operation, KnowledgeRuntimeEngine runtime) { return getInputList(message, operation.getInputOnlyExpressionMappings(), runtime); }
/** * Gets an input-only list. * @param message the message * @param operation the operation * @param runtime the runtime engine * @return the input-only list */ public static List<Object> getInputOnlyList(Message message, KnowledgeOperation operation, KnowledgeRuntimeEngine runtime) { return getInputList(message, operation.getInputOnlyExpressionMappings(), runtime); }
/** * Gets an input (all) list. * @param message the message * @param operation the operation * @param runtime the runtime engine * @return the input (all) list */ public static List<Object> getInputList(Message message, KnowledgeOperation operation, KnowledgeRuntimeEngine runtime) { return getInputList(message, operation.getInputExpressionMappings(), runtime); }
/** * Gets an input (all) list. * @param message the message * @param operation the operation * @param runtime the runtime engine * @return the input (all) list */ public static List<Object> getInputList(Message message, KnowledgeOperation operation, KnowledgeRuntimeEngine runtime) { return getInputList(message, operation.getInputExpressionMappings(), runtime); }
private int fireAllRules(Message inputMessage, KnowledgeOperation operation) { KnowledgeRuntimeEngine runtime = getSingletonRuntimeEngine(); RulesOperationType operationType = (RulesOperationType) operation .getType(); // sessionIdentifier = runtime.getSessionIdentifier(); setGlobals(inputMessage, operation, runtime, true); KieSession session = runtime.getKieSession(); List<Object> facts = getInputList(inputMessage, operation, runtime); for (Object fact : facts) { session.insert(fact); } if (RulesOperationType.FIRE_ALL_RULES.equals(operationType)) { return session.fireAllRules(); } return 0; }
List<Object> facts = getInputList(inputMessage, operation, runtime); for (Object fact : facts) {
KieSession session = runtime.getKieSession(); if (ExchangePattern.IN_ONLY.equals(exchangePattern)) { List<Object> facts = getInputList(inputMessage, operation, runtime); for (Object fact : facts) { session.insert(fact);