JBoss Community

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

created by gardellajp in jBPM - View the full discussion

I did this in a project:

 

 

StatefulKnowledgeSession session =
    JPAKnowledgeService.newStatefulKnowledgeSession(gewKnowledgeBase(), null, getEnvoriment());

 

TaskServiceSession taskServiceSession = taskService.createSession();

taskServiceSession.setTransactionType(Constants.TRANSACTION_TYPE);

org.jbpm.task.TaskService client = new LocalTaskService(taskServiceSession);

SyncWSHumanTaskHandler handler = new SyncWSHumanTaskHandler(client, session);

handler.setLocal(true);

handler.connect();

session.getWorkItemManager().registerWorkItemHandler("Human Task", handler);

 

I did a library that modularize this, to handle close resources etc.

 

Hope it helps.

Reply to this message by going to Community

Start a new discussion in jBPM at Community