Invoke Code Not Working in Parallel Activity

Hi guys, I’m currently working with two invoke code activities in parallel activity but it’s not working concurrently. Is there any other way to solve this?

Hi @chilled_lad ,

Could you let us know what are you trying to achieve in parallel ? Is it a necessary that it has to be done in parallel ?


Basically , I was trying to output word files in 2 folders at the same time(eg: Parallel1 folder and Parallel2 folder).The problem is that it is only processing only for Parallel1 folder and not processing in the other folder(i.e.Parallel2 folder).The invoke code activity for Parallel2 folder started working only after invoke code activity for Parallel1 folder is finished.

Parallel Test.xaml (16.5 KB)
And here is the .xaml file if you want to check further

Hi @chilled_lad

As per documentation: When using the Run Parallel Process activity, a separate job is created for each process, as opposed to the Invoke Process activity which creates only one job.

@sunilch Thanks for your time and information. I’ll try working on it.

Here is explained what you observe.

A Parallel activity operates by simultaneously scheduling each Activity in its Branches collection at the start. It completes when all of its Branches complete or when its CompletionCondition property evaluates to true. While all the Activity objects run asynchronously, they do not execute on separate threads, so each successive activity only executes when the previously scheduled activity completes or goes idle. If none of the child activities of this activity go idle, this activity execute in the same way that a Sequence activity does.

Hi,

If you need to process these activities concurrently using Parallel activity, can you try to extract activities on one lane to xaml file and call it by InvokeWorkFlowFile activity with Isolate option as the following?

Sample20230108-6.zip (6.8 KB)

Regards,