Iterating through 2 array strings in parallel

Hello. I would like to iterate through two array strings at the same time as in the screenshots below:


Current Outcome: Iterates through Pack2Array first then goes to Pack3Array.

Expected Outcome: Should print like pineapple, lettuce, apple, cucmber, mango, parsley, peach, lemon, etc…

how to fix this?

@private_matter,

Parallel For Each will pick the array items parallelly means there sequence cannot be decided and should not be.

The expected outcome cannot be achieved with Parallel For Each but Try Parallel activity and inside that use normal For Each activity.

Thanks,
Ashok :slight_smile:

@private_matter,

Ok, so as per my understanding, you are splitting a single array into two and then trying to encode them parallelly and then concating it back to one array.

If this is the case, I would suggest to split array in chunks, create a workflow to encode then use parallel activity inside it invoke the workflow to encode and check Isolated property. This will ensure both are working parallelly in separate UiPath executor processes.

Use Out argument from workflow to encode. Concat the output of each invoke workflow to encode into one array outside of Parallel activity.

Connect personally if we are at right direction and stuck somewhere!

Thanks,
Ashok :slight_smile:

Hi @private_matter

Please follow the steps in below workflow for achieve the output:

FLOW:

OUTPUT:
image

Array And List.zip (43.6 KB)

Let me know if you have any issues.

Regards

1 Like

Hi @private_matter

What is the output you should get when you run it for second time.

Regards

I solved the issue no worries.