JBoss Community

Re: Signal Event is not happening in persisted process

created by ravichandrankg in jBPM - View the full discussion

Hi Maciej,

 

i am testing with the following code.

 

     Map props = new HashMap();

     props.put("filename", "test.txt");

 

     String username = "krisv";

     props.put("actorid", username);

 

     ProcessInstance instance = jbpmsession.startProcess(DsrPocConstants.PROCESS_ID_NAME, props);

     jbpmsession.insert(instance);

 

     Environment env = null;

     env = ksession.getEnvironment();

     KnowledgeSessionConfiguration config = ksession.getSessionConfiguration();

 

     // reload knowledge session

     ksession = JPAKnowledgeService.loadStatefulKnowledgeSession(id, kbase, config, env);

     new JPAWorkingMemoryDbLogger(ksession);

     KnowledgeRuntimeLoggerFactory.newConsoleLogger(ksession);

     JPAProcessInstanceDbLog processLog = new JPAProcessInstanceDbLog(ksession.getEnvironment());

     ksession.getWorkItemManager().registerWorkItemHandler("Human Task",wsHumanTaskHandler);

 

     processmanager.getKnowledgeSession().signalEvent("validatewithshowevent", null, processmanager.getProcessId());

     processmanager.getKnowledgeSession().signalEvent("qcvideotask", null, processmanager.getProcessId());

 

i am keeping breakpoint in the following line (in eclipse), and completing the human task from eclipse human task viewer.

     processmanager.getKnowledgeSession().signalEvent("validatewithshowevent", null, processmanager.getProcessId());

 

after that, i am continuing the signal part.

 

It is not giving any error. But it is not moving to the next task.

 

But if we try with out reloading the session part, it is moving to the next task. Can you please check, what i am missing here. If you have any test case with persistence stuff, can you please try with signalling stuff and confirm the same?

 

 

Thanks,

 

Ravichandran

Reply to this message by going to Community

Start a new discussion in jBPM at Community