I have a process where Take Order and Serve Food tasks run in parallel. Both tasks should remain active until the waiter confirms that no new orders are pending. The flow is:
Issue:
When querying for tasks, the Take Order and Serve Food tasks are displayed multiple times, treated as different task instances.
Is this the normal behavior in Camunda? I want these tasks to behave as a single instance, where only their status changes dynamically instead of creating new task instances.
If you think about this logically, this makes a lot of sense. Your server WILL go back to the table a number of times to check if there is anything else that the customer would like to order.
However, you wouldn’t want to put “Take Order” and “Serve Food” in separate branches, since you need to know which food to serve (which comes from Take Order)
You could model this with a subprocess that loops until “Additional Order Items” is “No”
I think (and Niall please correct me here…) that the subprocess would appear in some of the DB tables only once, which might meet your reporting desire to have only one task of “Serve Seating”
In my UI, I want to display all the tasks in the workflow along with their statuses. At the backend (Spring Boot Application), I’m querying active, completed, and upcoming tasks and combining them to achieve this.
With my current design, the Take Order task appears multiple times in the completedTasks list with different taskIds. I want to confirm if this is normal behavior in Camunda or if there is a flaw in my design. Logically, since it’s the same task, the taskId should remain the same across iterations.
What I’m trying to achieve is that the Take Order and Serve Food tasks remain active until the waiter confirms that there are no more orders. For testing, I’ve used true and false conditions to observe the behavior.
Regarding timers, I’m working on implementing them to alert waiters about tasks nearing completion. I’ll also make changes to merge the parallel gateway as needed.
This is because the histroy tables don’t only contain finished tasks, they also have everytthing that’s currently running. So in your case you don’t need to do the task service query since you want all tasks open or not.