Add a task in already running BPMN process in Camunda 8

How we can add task at the end while executing BPMN process

Hi @mehak.lakhanpal
Could you please explain your business case in more detail?

Regards,
Alex


Let’s say from the above diagram , there is currently two tasks user task and another is service task. While executing this bpmn diagram using Java code. I need to add one more task which is new task at the end of this process. How can i achieve this in Camunda 8?

I do not think it’s possible this way. Why not add that “new task” to the process and not execute it if some business conditions are not satisfied?

I mean something like the following:

This is possible only , If we know about the new task beforehand, then i can use the condition. As new task is not defined while creating this bpmn diagram, so that’s why i need to add it to the end using java code

This is likely not possible with Java.

Steps to accomplish what you want to do:

  1. Update the BPMN Process with new task
  2. Publish new BPMN Process
  3. Migrate Process Instances to new BPMN Process Version