I was using the deprecated class SyncWSHumanTaskHandler like this:
SyncWSHumanTaskHandler handler = new SyncWSHumanTaskHandler(localTaskService, kSession);
handler.setLocal(true)
kSession.getWorkItemManager().registerWorkItemHandler("Human Task", handler);
handler.connect();
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?
Or,
How can I use it without using HornetQ, Mina or JMS?
Thanks