11 Replies Latest reply on Jul 6, 2012 8:35 AM by Dsire krish

    jbpm 5.3 - GenericCommandBasedWSHumanTaskHandler and LocalTaskService, how to use it?

    Pedro Gonçalves Newbie

      I was using the deprecated class SyncWSHumanTaskHandler like this:



      SyncWSHumanTaskHandler handler = new SyncWSHumanTaskHandler(localTaskService, kSession);     
      kSession.getWorkItemManager().registerWorkItemHandler("Human Task", handler);


      But since I'm using persistence and in the docs says to use the CommandBasedWSHumanTaskHandler I want to change it, but I can't set the client as the localTaskService.



      GenericCommandBasedWSHumanTaskHandler handler = new GenericCommandBasedWSHumanTaskHandler(kSession);
      kSession.getWorkItemManager().registerWorkItemHandler("Human Task", handler);
      When executing, gives this error:
      java.lang.IllegalStateException: You must provide a client connector for the Client using the setClient() method
      at org.jbpm.process.workitem.wsht.GenericCommandBasedWSHumanTaskHandler.connect(GenericCommandBasedWSHumanTaskHandler.java:122)
      at org.jbpm.process.workitem.wsht.GenericCommandBasedWSHumanTaskHandler.executeWorkItem(GenericCommandBasedWSHumanTaskHandler.java:137)


      Is it possible to use the GenericCommandBasedWSHumanTaskHandler with the LocalTaskService?


      How can I use it without using HornetQ, Mina or JMS?