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); }
ksession = factory.findKieSessionById(ksessionId);
List<Long> ksessionsToInit = ((JPAMapper) mapper).findKSessionToInit(this.identifier); for (Long id : ksessionsToInit) { initialKsession = factory.findKieSessionById(id); initialKsession.execute(new DisposeKSessionCommand(initialKsession, this));
List<Long> ksessionsToInit = ((JPAMapper) mapper).findKSessionToInit(this.identifier); for (Long id : ksessionsToInit) { initialKsession = factory.findKieSessionById(id); initialKsession.execute(new DisposeKSessionCommand(initialKsession, this));
ksession = factory.findKieSessionById(ksessionId);
throw new SessionNotFoundException("No session found for context " + context.getContextId()); ksession = factory.findKieSessionById(ksessionId);
if (knownSessionId > 0) { try { this.singleton = new SynchronizedRuntimeImpl(factory.findKieSessionById(knownSessionId), internalTaskService); } catch (RuntimeException e) {
throw new SessionNotFoundException("No session found for context " + context.getContextId()); ksession = factory.findKieSessionById(ksessionId);
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); }
ksession = factory.findKieSessionById(ksessionId);
List<Long> ksessionsToInit = ((JPAMapper) mapper).findKSessionToInit(this.identifier); for (Long id : ksessionsToInit) { initialKsession = factory.findKieSessionById(id); initialKsession.execute(new DisposeKSessionCommand(initialKsession, this));
List<Long> ksessionsToInit = ((JPAMapper) mapper).findKSessionToInit(this.identifier); for (Long id : ksessionsToInit) { initialKsession = factory.findKieSessionById(id); initialKsession.execute(new DisposeKSessionCommand(initialKsession, this));
ksession = factory.findKieSessionById(ksessionId);
ksessionId = ksession.getId(); } else { ksession = factory.findKieSessionById(ksessionId);
throw new SessionNotFoundException("No session found for context " + context.getContextId()); ksession = factory.findKieSessionById(ksessionId);
if (knownSessionId > 0) { try { this.singleton = new SynchronizedRuntimeImpl(factory.findKieSessionById(knownSessionId), internalTaskService); } catch (RuntimeException e) {
throw new SessionNotFoundException("No session found for context " + context.getContextId()); ksession = factory.findKieSessionById(ksessionId);