Search code examples
camundabpmn

Having duplicate instances of a process instead of just 1 (Camunda)


Im trying to add a process instance using this post request to /message

{
  "messageName" : "DocumentReceived",
  "businessKey" : "3",
  "processVariables" : {
    "document" : {"value" : "This is a document...", "type": "String"
                  }
  }
}

But instead of getting 1 instance im getting 2 instances of the same id and same everything, I tried creating a process directly from the webapp (TaskList) but it still creates 2 duplicates, and i noticed one the instances gets stuck on user task while the other can just pass it without doing anything, ill attach a screenshot after running the post request above enter image description here


Solution

  • Check your process model carefully. I believe you accidentally have two outgoing sequence flows on the start event. One connects to the user task, the other connects directly to the gateway. Because the two flows overlap, it is hard to spot. However, when you look closely at the "Send the new document" user task, you can see a faint line passing "behind" the task. Move the user task model element 3 cm up and you will see what is wrong.