use of com.salaboy.sessions.patterns.SessionLocator in project jBPM5-Developer-Guide by Salaboy.
the class MultiSessionsPatternsTest method createProcessOneKnowledgeSessionAndRegister.
private StatefulKnowledgeSession createProcessOneKnowledgeSessionAndRegister(String key, BusinessEntity interactionSessionEntity, EntityManager em) {
final StatefulKnowledgeSession ksession = this.createProcessOneKnowledgeSession(key);
// Registering a SessionLocator inside the interaction Session
StatefulKnowledgeSession interactionSession = loadKnowldgeSession(interactionSessionEntity.getSessionId(), interactionSessionEntity.getBusinessKey(), em);
Map<String, String> props = new HashMap<String, String>();
props.put("process", "com.salaboy.process.AsyncInteractions");
SessionLocator sessionLocator = new SessionLocator(ksession.getId(), key);
sessionLocator.setProps(props);
interactionSession.insert(sessionLocator);
interactionSession.dispose();
return ksession;
}
Aggregations