1 of 1 people found this helpful
I'm in charge of writing those docs, but I'm still working on unifying all these classes, if you take a look on master those classes are deprecated now. I will be writing in the following weeks these documents which will include the specification of a new set of WorkItemHandlers for Human Tasks. You can take a look a these classes in github. They are called:
AbstractHTWorkItemHandler -> GenericHTWorkItemHandler & AsyncGenericHTWorkItemHandler -> Then the concrete implementation for the different transports: HornetQHTWorkItemHandler and Mina...
Cool. I'll have a look.
You guys are the best.
We are trying to improve the code base so if you test it and see weird things please report them to us and we will work on them
I am using jbpm 5.3.0 now. As SyncWSHumanTaskHandler is deprecated now, do you have code sample of using (Sync) LocalTaskService for HumanTask?
My previous code:
SyncWSHumanTaskHandler syncWSHumanTaskHandler = new SyncWSHumanTaskHandler(localTaskService, ks);
ks.getWorkItemManager().registerWorkItemHandler("Human Task", syncWSHumanTaskHandler);
I am using jbpm 5.3.0 too. Like TC ONG i would like to implement LocalTaskService for HumanTask but i don't find any implementation examples with the last release of jbpm.
If someone have some examples with the last release ?
Nobody can help on this ?
TC ONG did you find the solution ?
I implement it like this:
org.jbpm.task.service.TaskService taskService = new org.jbpm.task.service.TaskService(getEntityManagerFactory(), SystemEventListenerFactory.getSystemEventListener());
LocalTaskService localTaskService = new LocalTaskService(taskService);
SyncWSHumanTaskHandler syncWSHumanTaskHandler = new SyncWSHumanTaskHandler();
getKnowledgeSession().getWorkItemManager().registerWorkItemHandler("Human Task", syncWSHumanTaskHandler);
JbpmHelper.taskService = localTaskService;
So i think it should be fine, i will test it this afternoon.
Mauricio should have the answer for the deprecated case.
Same as StackOverFlow
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.javaThat test shows how to use the new classes.
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
I'm trying to keep the Test as aligned as possible with the "new" implementations (not the deprecated ones), so bare with me until I can write some examples and update the docs. Hopefully next week I will have some hours to work on that.
Am I missing something, I can not find the "org.jbpm.process.workitem.wsht.LocalHTWorkItemHandler" class in the jbpm-5.3.0.Final distribution?
You don't miss something, the class LocalHTWorkItemHandler is not present in the jbpm-5.3.0 final version.
I said the same on Stackoverflow.
For the moment i keep the exemple above because i don't find another solution.
I have the same issue I found the source of LocalHTWorkItemHandler here :
unfortunately it's version 5.4.0-SNAPSHOT of jbpm I don't think it's included in 5.3.final