Invoking Workflow- Email iteration

Hi,

I have a process, “Reading emails, looping each email and for each email (inside for each loop) I have to trigger a process (using start job)”.

Problem is: Working fine if we have just one email, for multiple emails in the loop bot is starting the job for the first email only. Taking only first email data for all the iterations.

Any solution? (Apart from replacing start job with the whole process).

Thanks!

@Sat

I guess you didn’t put the flow properly inside loop. Please check once again and then try.

You might have your variables in the wrong scope, but only by looking at it we could spot the error…

I think I’m not conveyed you in the right way,

Email Process: I have For each (list of emails) activity,
Sub process: Inside for each I’m using ‘Start job’ activity.
I’m running the job (Email process) from Orchestrator, It’s reading all the emails, and coming to ‘For each’, started picking ‘sub process’. This is for one email.
Next, It’s not going back and picking other email data from ‘For each’, it’s keeps running with same data (data i’m storing in assets).
I think after triggering another process using start job, it’s not gonna back to original process??

Thanks!

Start Job activity is “asynchronous” so it would not have trouble to continue your For Each, when you read each email, how do you decide which process to start?

@bcorrea, Reading email data and storing in ‘Assets’, I just ran with 4 emails, flow is updating the asset and triggering sub process and going back to for each to get the email and updating the asset and so on.

Until email process is completed, the sub processes are not executing.
so, In the assets I’ve only the latest updated value, that’s the one passing to rest of the executions(sub workflows).

Do you know how start job activity works? it will not execute anything inside the main process, it will just schedule it to run in orchestrator, if you have multiple robots it can start in parallel…

So, need to replace start job with the whole process. :worried:

if you need to wait for it to run, yes :frowning:

Thanks, @bcorrea and @lakshman

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.