Hello,
I’m completely new to Camunda and the forum. So, please be patient with me
Precondition
used Camunda-version is 7.6.1.
I’ve created a process processing a list of documents into a refund.
Now I want to do the checking and creating claims from the documents in a SubProcess.
My process calls a Webservice (ServiceTask) and gets back a list of pre-generated Claims.
I saved them in a variable “claims” (claims is of Type ArrayList, I saved them with into processVariables with serializationFormat application/xml)
Next, I call a SubProcess, containing
- StartEvent
- ServiceTask checkClaim
- ServiceTask createClaim
I defined the SubProcess as MultiInstance/parellel, with async:after= true, inputParameter=${claims} and no Loop Cardinality.
My application contains an ExecutionListener, that logs all existing variables at events “start”, “end” and “take”
So far, it looks like all the examples.
Problem:
By viewing the logs I could verify that my claim-List ist filled correctly after the createClaim ServiceTask. And at the end of the SubProcess(-instance)-Level. Next trace is the end of SubProcess_generate_claims#multiInstanceBody - and now my list ist null!
What the hell happened to my collection? I need it later on.
Obviously this happens to all collections in the procesVariables, no matter if they are used in the MultiInstance-SubProcess or not. Simple data types as well as Single ServiceObjects still exist afterwards.
How do I at least keep my list?
And a suffix-question: I would like to either update the elements of my claims-List with the results of the creation or create a new Collection, containing all results. How do I do this? Is there actually a Chance for adding, since my SubProcess is parallel?
Thanks a lot, mkoerner