[jboss-user] [jBPM] - Re: Register more than one WorkItemHandler

Shobhit Tyagi do-not-reply at jboss.com
Tue Apr 30 12:52:32 EDT 2013


Shobhit Tyagi [https://community.jboss.org/people/roxy1987] created the discussion

"Re: Register more than one WorkItemHandler"

To view the discussion, visit: https://community.jboss.org/message/810997#810997

--------------------------------------------------------------
Sergey,

Thanks for your response. But this thing doesnt work with the EmailWorkItemHandler either. This is the code I use to start the process.

StatefulKnowledgeSession ksession = BpmRepositoryConfig.createSession();
  KnowledgeRuntimeLogger logger1 = KnowledgeRuntimeLoggerFactory.newThreadedFileLogger(ksession, "testlog", 1000);
  taskHandler = new HornetQHTWorkItemHandler(ksession);
  taskHandler.setIpAddress(ipAddress);
  taskHandler.setPort(port);
  ksession.getWorkItemManager().registerWorkItemHandler("Human Task", taskHandler);
  EmailWorkItemHandler emailHandler1 = new EmailWorkItemHandler();
  emailHandler1.setConnection("localhost","25", " mailto:styagi at bcp.com.pe styagi at bcp.com.pe", "Tyagi04");
  emailHandler1.getConnection().setStartTls(true); 
  ksession.getWorkItemManager().registerWorkItemHandler("Email",emailHandler1);
     JPAWorkingMemoryDbLogger logger2 = new JPAWorkingMemoryDbLogger(ksession);
       ksession.startProcess(processDefId);
  ksession.fireAllRules();
  if(taskHandler.isConnected())
  {
   taskHandler.dispose();
  }
  logger2.dispose();
  logger1.close();
  ksession.dispose();

I dont face a problem starting the process. There is one human task followed by one mail node in my process definition.
I complete the task and it gives me No handler found for Email exception.


--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/810997#810997]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130430/a91c7999/attachment-0001.html 


More information about the jboss-user mailing list