Special user task problem

Hello community,

I am new to camunda and try to model a special user task. The colleagues in my new company usually use an own user-pool for all the stuff, that happens in an user task. They activate the pool and return the input back to the main pool by using messages. You can see an example here:


Now it is my task to automate the processes, but I failed in implementing. Somehow I do not know, how to get this running. Please be so kind and give me some hints.

I know, that there are some ways, I could get it working. For example I could use a subprocess in the userlane. Or I could call a new bpmn-file representing the user-pool. Or I even could use message tasks to communicate between the two pools. … The problem is, that my colleagues wish to stay with their way of modeling the process as much as possible.

I hope you can understand, what I am trying to explain.

Greetings and big thanks from Germany
Georg

Change your “User Activity Required” task from a User Task to a Call Activity task. The Call Activity would be pointed to/linked to the User Pool.

1 Like

Hey StephenOTT,

thank you a lot for your quick answer. The “problem” is not to find a solution like that. I tried to describe exactly this solution directly under the inserted bpmn. The real challenge in my question is, not to change the user task into something else at all. I assume that is not possible, because the user task is not able to do, what my colleagues want to do with it. … Please allow me to describe the situation a little bit more in detail:

My department is teaching this way of modeling a User Task(!) (mentioned above) for some time now. They did not have any problems at all, because they did not try to automate the process yet.
Now it is my task to try to automate it and I failed. I asked them, to be flexible and change the User Task into a call activity or subprocess.
But they argued, that a call activity would leave the current bpmn-file, removing the possibility of using message flows and so on between the pools.
Further more they do not like subprocesses, because they want to have a new pool including a new token.
In the end they are afraid of changing the user task at all. because of the fact, that they already tought bpmn this way to many students, they do not want to have to tell them all, that they made a mistake and that they have to correct something. At best it stays everything the way as it is described in the picture above.

At the moment I am experimenting with using a service task instead of an user task. I can connect this with a java class, which is able to send messages (for starting the userpool-process). But I could not find a way yet to let the java class wait for the answering message from the “user activity ended”-event. How to do that? This could possibly minimize the impact, my changes could have to the bpmn my colleagues have modeled until now.

Hi @gwolffgang

I created a quick example of a process that mighty guide you in the right direction. You can use the Send Message End Event of the second process together with an Intermediate Catch Event in the main process. That allows you to wait in the main process for the second process to finish. Furthermore you can model the task in the main process, that starts the second process as a Message Send Task to make it clearer that this triggers the second process.

I hope my suggestions go in the direction of what you are looking for.

Regards
Michael

2 Likes

Hey Michael,

thanks a lot. This is truely a nice answer. Sadly I thought of this too already, but my colleagues do not like it, because they do not want to “loose” their user task. And if they have to soy goodbye to it, they would prefer not to have to split the one used symbol into two (in the userlane). I am sorry, but I am really in a mess here, because I suppose, that I will not be able to satisfy my colleagues needs. Am I right?

Hi @gwolffgang

what is exactly done in the user task “User Activity required”? Is it actually a real user task with a form where a real person has to do something or is it just there to trigger the second process?

Hi @MichiDahm

my colleagues misused the user task indeed. In the user pool, it shall open a form to be able to input some data, but in the userlane of the companypool it is only triggering the process of the userpool and waiting for the response.

Hi @gwolffgang,

you should consider explaining your colleagues the usage of a User Task. The user task is explained in the official OMG specification (here) as well as in the documentation of Camunda (here).
The intention of business processes in BPMN is to model the real behaviour in a way, so that every stakeholder with basic knowledge of BPMN can understand this diagram. I guess using the elements in a different way is not considered best practice :grin:

1 Like

Hi @MichiDahm,

so, this means, I will not be able to find a solution. :neutral_face: There is nothing to be found, that will be able to minimize the impact, it will have hitting the current model of my colleagues.

I thank you and @StephenOTT so much for your help! :blush:

Greets,
Georg

@gwolffgang

it is indeed a bit difficult to change your process with the restrictions you have.

For example: if you model the task “User Activity required” as a user task but don’t want real interaction you will still end up with a form that needs to be completet before the process can continue:

I guess this is not what your colleagues want as it is an unnecessary step in your process that could be avoided by simply changing the way the diagram is modeled.

Regards
Michael

1 Like

Hi @gwolffgang,

have a look at the external task pattern: https://docs.camunda.org/manual/latest/user-guide/process-engine/external-tasks/.

It’s the same behaviour as user tasks implemented for service tasks. You can start your user process logic with the help of the external task client: https://github.com/camunda/camunda-external-task-client-java, and complete the external task from the user process.

It will keep your colleagues happy.

Another option is to put all the logic into listeners and start new process with a start listener on the task and complete the user task with an end listener on the started process. Have a look at task listeners: https://docs.camunda.org/manual/latest/user-guide/process-engine/delegation-code/#task-listener and execution listener: https://docs.camunda.org/manual/latest/user-guide/process-engine/delegation-code/#execution-listener.

Hope this helps, Ingo

1 Like

Hey @Ingo_Richtsmeier,

thanks alot! Your answer is warmly welcomed and I will directly have a closer look at it.

With kind regards
Georg

I found some examples here: https://camunda.com/bpmn/examples/
One example is “Four Eyes Principle”. The usage of the user task seems to be exactly the way I am looking for. So it could be done this way…

Finally I found out, that there could not be found a solution to this concrete problem. Even when the described way seems to be mentioned in the best practices https://camunda.com/bpmn/examples/, you cannot automate a user task used this way.
Thanks to all helpers!