2
votes

I am using jBPM 5.3.0, but i have a problem when i try to implement LocalTaskService for Human Task.

I try this code:

            org.jbpm.task.service.TaskService taskService = new org.jbpm.task.service.TaskService(getEntityManagerFactory(), SystemEventListenerFactory.getSystemEventListener());
        SyncWSHumanTaskHandler syncWSHumanTaskHandler = new SyncWSHumanTaskHandler();
        syncWSHumanTaskHandler.setLocal(true);
        TaskService localTaskService = new LocalTaskService(taskService);
        syncWSHumanTaskHandler.setClient(localTaskService);
        getKnowledgeSession().getWorkItemManager().registerWorkItemHandler("Human Task", syncWSHumanTaskHandler);

But it seems that the SyncWSHumanTaskHandler is deprecated.

So i would like to know if someone implement it in the last release of jBPM and have some samples.

Thank you,

1

1 Answers

1
votes

You can always find unit tests that shows the functionality: https://github.com/droolsjbpm/jbpm/blob/master/jbpm-human-task/jbpm-human-task-core/src/test/java/org/jbpm/process/workitem/wsht/local/sync/WSHumanTaskHandlerLocalSyncTest.java That test shows how to use the new classes. As I've already answered here: https://community.jboss.org/message/738956

We are trying to keep all the implementation aligned with the same names for all the transports and for the async and sync implementations. The new Human Task WorkItemHandlers are called: AbstractHTWorkItemHandler -> GenericHTWorkItemHandler & AsyncGenericHTWorkItemHandler -> Then the concrete implementation for the different transports: LocalHTWorkItemHandler, HornetQHTWorkItemHandler and Mina...

Using LocalTaskService is ok. Cheers