Can you share some numbers? You mention that jBPM is slower but how much slower?
You need to take into account that the jBPM Human Task Service do a more complete lifecycle management than other engines and for that reason the performance can be a little bit less compared with different approaches. The jBPM Human Task service is following the WS-HT specification.
Notice also that if you don't need to do all that lifecycle management you can implement your own Human Task Service, but we have noticed that most of the time having the full task lifecycle is really useful for real life scenarios.
Thanks for quick reply.
We have designed same BPMNs for both engines.
I have attached outputs for both.
Though names are different, BPMNs have same functionality in them.
Activiti BPMN Name and its corresponding jBPM BPMN Name details-
Performance -> Performance_01
OurUserTaskDia -> user_task_02
SimpleUserTaskProcess -> single_user_task
And as you said "you can implement your own Human Task Service". Can you provide me any example for this?
Notice that is the one in charge of creating the task from the process, which means that you can create your own task service and a different implementation for this class.
You will need to create your service based on your needs, so for example if you want it to be extremely performant you can create the service with a fast storage like for example infinispan which is an in memory solution, to avoid all the performance impact of using a Database.
That will definitely improve the speed for your use case, but the question is .. do you really need to be faster by 100 ms?
Looking at the reports I wasn't able to quickly spot where the differences are, because of the different names. Can you please clarify your results trying to unifying the names?
one additional note on top of what Mauricio has already said, mind that these are user tasks which are executed by humans and thus require more advanced life cycle to provide more flexible management and thus performance might suffer because of that. I wouldn't spent so much time tuning performance of user task so much (especially these parts that are related to life cycle such as claim, start, etc) as long as they are executing less than a half a second or so. The important methods are these that affect process instance such as complete, skip, exit.
What would be good as well to know is how do you actually measure the performance, is it direct calls to API, what data base you use? Might be worth to look at db side as well to check if the tables can be tuned with indexes and so on.
From my point of view the most important aspect when looking at performance is the execution of the engine itself which is the automation. user tasks are for human actors and by that might be heavier from execution point of view as they carry additional information - such as user assignment, variables (which might include transformations) etc.
Hi Maciej I have a requirement where 2 operations say claim and start need tobe performed in a single transaction because I know in my processes once a task has been assigned to a group any user should be able to pick it and start working on that. doing 2 operations in a single transaction was not possible in jbpm5 and doing it in two separate transactions is little bit slow.