Process performance

Hello everyone,
I have a simple process with just three user tasks in a sequence flow. Each user task is connected to a form with a custom formKey.

In my react application, I am generating these forms according to the json schema of each task. However, after completing the first form (user task) for example, there is some time until I can generate the second.
This is because I have to query again for created tasks, get the id, and then use it to retrieve the new json schema. It is obvious that this is creating some performance issues in my app.

I can’t load all three forms from the beginning because I am able to to query a user tasks when the process instance is at this step.
I have thought about modifying the process from sequential to parallel.

Is this the proper way to solve this? Or are there any better approaches?
Thank you!

Hi @camunda_kon,

this happens because of the asynchronous architecture of the Camunda Platform 8 (Overview Components | Camunda 8 Docs).

When you complete a user task, the Zeebe engine exports the new state to Elasticsearch. Tasklist creates the new task from the exported data. Then you can get the task details.

Hope this helps, Ingo

2 Likes

@Ingo_Richtsmeier Thank you for the information. Now I better understand why this is happening. If I understand correctly, I can’t do something from the front-end to avoid this. Just by editing the Camunda diagram. As I mentioned before maybe a parallel solution?

Hi @camunda_kon,

you may get the parallel user task all in one query if they are already created by the Zeebe engine.

But even the parallel gateway didn’t assure that all tasks are created at the same instant.

And it’s a totally different process. In BPMN, the sequence flow is the most important symbol to order the tasks. From the business perspective, could be a huge difference if you execute a process always from 1 to 3 or if you can jump around and do 3 2 1 or 1 3 2 or whatever you like.

Technically, it may be even possible to guarantee the order of the sequence in your UI code. But then the process model with parallel tasks is misleading.

Hope this helps, Ingo

1 Like