Multi instance parallel Service task

Out to collect a result of a multi instance service task.
As if i set to any execution variable it will be overridden by another instance. so quite confused here.

Thanks in Advance

Hi @gowtham_m how to use this is dependent on what you want to achieve. If you want to have variables local to each instance of the multi-instance, you can use local variables. If you want to overwrite a process variable (or any intermediate scope if you have that), you can simply use the result variable of the task so the very last instance will determine the value. If you want to collect and aggregate, you can use an output mapping to map the value(s) in the local scope to a shared variable scope by using an expression.

I want to know like, in multi-instance in each instance Service Java Delagate i would like to store a value in a variable at the end of last instance, i would aggregate all the values that saved in each instance. any example would help me out.

Can you aggregate them on the fly? That would probably be easiest. But, you could for instance have a list variable that you update for each instance by adding to the list in an output mapping. Then is a listener on the end of the task, you could manipulate that list to aggregate the output. Or, use another ouput mapping to do the same where you invoke something through an expression. Sorry, I don’t have time to create an example for you, but some relevant documentation with examples is here: Process Variables |