cancel
Showing results for 
Search instead for 
Did you mean: 

Wait state for user services

groopk
Champ in-the-making
Champ in-the-making
If I have a custom user service (java delegate), and I create a task in it, is there a way for me to go into a wait state until that task is completed?

We would also like to do the same thing with invoking another workflow from a user service (similar to whatever callActiviti does).

Can someone point us in the right direction?
4 REPLIES 4

frederikherema1
Star Contributor
Star Contributor
So you create a Task (by using TaskService.createTask)? In that case, there is no connection between the task and the process, so there is no way of letting the process "wait" unless you put an explicit wait-state after the process (e.g.. receive-task) and plug in some kind of mechanism that allows listening to adhoc-tasks to make the trigger the workflow again.

Why can't you model the UserTask in the process and, if it's not needed, let a gateway navigate around the task (so make flow to task conditional based on a variable set in the service-task)?

groopk
Champ in-the-making
Champ in-the-making
Thanks for the reply. 

Our real goal is to have our own box in the eclipse modeling tool (i.e. extending AbstractCustomServiceTask) that is a userTask or a callActiviti event.  We were thinking of just wrapping the functionality of these events into a custom java service, but it sounds like that is probably not the correct approach.  Perhaps we should try to write some custom code in the modeler that would allow us to do this?

frederikherema1
Star Contributor
Star Contributor
It seems that you want to have your custom-node actually end up as multiple BPMN2.0-elements in the xml (a gateway, a usertaks and a recieve-task). I'm quite sure this indeed requires some custom coding in the designer to get this working… OR perhaps you can fix it by using a sub-process (containing the building-blocks you need) that's being generated by the designer instead of a service-task?

groopk
Champ in-the-making
Champ in-the-making
I'd like to have a userTask predefined with certain listeners, form properties and configuration that is available on the palette. For example, a "Marketing Approval" task that we simply drag and drop into the designer and 90% of the configuration we need is already in place.

A sub-process or actually a callActiviti would be great too. But we would still like a custom box for a specific callActiviti with pre-configured input parameters/listeners/etc that we can just drag from the palette.