cancel
Showing results for 
Search instead for 
Did you mean: 

Should I use Java receive task or just a user task?

ssun
Champ on-the-rise
Champ on-the-rise
In my workflow, at this stage, I need the code to go do something. It will take a long time and it is not synchronized so I should not use a service task for sure. But after the code is done, my code need to notify workflow that this is done and you need to continue.

It seems like a fit to use Java receive task here http://activiti.org/userguide/index.html#bpmnReceiveTask.
But I'm actually using the REST api, which under the Runtime section http://activiti.org/userguide/index.html#N15D39 only have a signal event and does not have a signal message received.

So I ended up use a user task and have my code through REST API just claim and finish the task.

Am I doing the right thing? Is there a lot of things missing in the REST API? What is the reason we have a Java receive task and in what situation I should use it instead of user task?

Thank you very much!

–Gordon
2 REPLIES 2

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Gordon.

I think receive task is the right solution. In the case when interface is not exposed through REST API, you could extend activiti rest interface (and contribute to the project 🙂 ).

Regards
Martin

ssun
Champ on-the-rise
Champ on-the-rise
Hi Martin,

Thank you for reply. I would love to extend the REST interface and contribute back to the project. The name of the receive task sounds right to me. But I am curious on what are the differences. Can you give an example when have the program claim and finish a user task may cause problem?

–Gordon