public void destroyCase(CaseContext caseContext) { KieSession kieSession = null; RuntimeEngine localRuntime = findLocalRuntime(caseContext.getContextId()); if (localRuntime != null) { kieSession = localRuntime.getKieSession(); } else { Long ksessionId = mapper.findMapping(caseContext, this.identifier); if (ksessionId != null) { kieSession = factory.findKieSessionById(ksessionId); } } factory.onDispose(kieSession.getIdentifier()); List<ExecutableCommand<?>> cmds = new ArrayList<>(); RemoveMappingCommand removeMapping = new RemoveMappingCommand(mapper, caseContext, getIdentifier()); cmds.add(removeMapping); DestroyKSessionCommand destroy = new DestroyKSessionCommand(kieSession, this); cmds.add(destroy); BatchExecutionCommand batchCmd = new BatchExecutionCommandImpl(cmds); kieSession.execute(batchCmd); }
Long ksessionId = null; RuntimeEngine localRuntime = ((PerCaseRuntimeManager) manager).findLocalRuntime(contextId); if (localRuntime != null && ((RuntimeEngineImpl) engine).internalGetKieSession() != null) { return localRuntime.getKieSession();
Long ksessionId = null; RuntimeEngine localRuntime = findLocalRuntime(contextId); if (localRuntime != null) { return localRuntime; RuntimeEngine localRuntime = findLocalRuntime(contextId); if (localRuntime != null) { return localRuntime;
public void destroyCase(CaseContext caseContext) { KieSession kieSession = null; RuntimeEngine localRuntime = findLocalRuntime(caseContext.getContextId()); if (localRuntime != null) { kieSession = localRuntime.getKieSession(); } else { Long ksessionId = mapper.findMapping(caseContext, this.identifier); if (ksessionId != null) { kieSession = factory.findKieSessionById(ksessionId); } } factory.onDispose(kieSession.getIdentifier()); List<ExecutableCommand<?>> cmds = new ArrayList<>(); RemoveMappingCommand removeMapping = new RemoveMappingCommand(mapper, caseContext, getIdentifier()); cmds.add(removeMapping); DestroyKSessionCommand destroy = new DestroyKSessionCommand(kieSession, this); cmds.add(destroy); BatchExecutionCommand batchCmd = new BatchExecutionCommandImpl(cmds); kieSession.execute(batchCmd); }
Long ksessionId = null; RuntimeEngine localRuntime = ((PerCaseRuntimeManager) manager).findLocalRuntime(contextId); if (localRuntime != null && ((RuntimeEngineImpl) engine).internalGetKieSession() != null) { return localRuntime.getKieSession();
Long ksessionId = null; RuntimeEngine localRuntime = findLocalRuntime(contextId); if (localRuntime != null) { return localRuntime; RuntimeEngine localRuntime = findLocalRuntime(contextId); if (localRuntime != null) { return localRuntime;