I’m new to Camunda and require some assistance with parallel multi-instances.
I’m using the following versions
Powered by Spring Boot (v3.5.3)
Java Version: (17.0.11)
Camunda BPM: (v7.23.0)
My problem is this:
In my code I build a list of 2 different position objects and set a variable with a list. In the the expanded sub process I have set collection to the same variable. I have also set the element variable. This works and hits the user task which points to a form also attached. The issue is that if two tasks are created for the different positions when I select wither of the tasks the both have the same data. The data appears to be from the last task created. I also attached screenshots of what I see for each task.
I have attached both the bpmn and form files below.
Variable pkPosition = PKPosition [getAccount()=0042838, getInstrument()=PIK, getQuantity()=2472900, getDifference()=2472900, getMessage()=No approval found for equivalent opening position: , getTimestamp()=2025/08/07 09:40:25]
I have now removed the form for the benefit of understanding the problem. You will see below that both taks created from the 2 positions are showing as the same. In this case the are both showing the position for instrument ‘PIK’. I would expect 1 tasks to be for instrument ‘PIK’ and the other for the position of ‘ABG’
I don’t think the tasks should reference the array mismatches. This array is used by the engine to trigger each instance of the multi-instance subprocess.
Inside the subprocess you should have access the the variable pkPosition that points to each element of the array.