JBoss Community

Re: Guide to creating custom human task service

created by Maciej Swiderski in jBPM - View the full discussion

By default work item handlers use Mina connector for task client. So there are two options:

  • create your workitem handler implementation that just extends default and override connect method
  • for some work item handlers (for instance WSHumanTaskHandler) there is a dedicated method to set task client that can be used

 

What you need to do is to create task client instance that utilize hornetq client handler and client connector:

 

TaskClient client = new TaskClient(new HornetQTaskClientConnector("HornetQConnector",
                    new HornetQTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));
 
taskClient.connect(host, port);
 
 
// this method is not available for all handlers
handler.setClient(client);

HTH

Reply to this message by going to Community

Start a new discussion in jBPM at Community