cancel
Showing results for 
Search instead for 
Did you mean: 

Wait Activity in Recipe Function

sudheer-ambati
Deputy Chef I
Deputy Chef I

Hello Team,

Can we add wait activity in recipe function? Actually, I have a requirement to extract accounts from salesforce using bulk API v2. I have triggered the bulk API v2 and once it completes, I have to download the results and write to SFTP.

Here, I am using a for loop to check for the status of  bulk data job and wait for sometime until it gets completed. 

Thanks  & Regards,

Sudheer

1 ACCEPTED SOLUTION

gibson-cabello
Workato employee
Workato employee

Hi Sudheer,

If you have wait and bulk/batch actions on your recipe, you need to make sure that the recipe is running (STARTED) so the actions will be executed properly.

Wait and bulk/batch actions are considered long actions. Long actions require dedicated Workers to periodically check if the action is complete. This is not available in TEST mode.

For more info, you can check our documentation here.

Thank you!

View solution in original post

7 REPLIES 7

steven-marissen
Executive Chef I
Executive Chef I

Hi Sudheer,

From my experience, I've never had to use a wait function together with Salesforce bulk actions.

When I ran the job it would remain at that task (and in the background, I'm guessing it perform checks whether SF completed the work) and would only progress when results arrived.

But it could perfectly be that things have changed in that time.

I also vaguely remember that when using test recipe / function for bulk action, that it would never return results and would process for hours. But it worked when I started the recipe.

mppowe
Executive Chef I
Executive Chef I

Sudheer, this may be a longshot, but I recall when I first tried out the Bulk Api v2 actions in the Salesforce connector (I was doing a Create), it automatically waited for me.  When the job executed, it would hit that step, and it would automatically wait until the import was complete before proceeding in the recipe.  It was confusing to me b/c the doc didn't say it would do that, so it took me a bit to realize what was happening.

So it might be worth trying it out (if you haven't already) and see if it's already waiting for the export to finish before it hits the next step.

gibson-cabello
Workato employee
Workato employee

Hi Sudheer,

If you have wait and bulk/batch actions on your recipe, you need to make sure that the recipe is running (STARTED) so the actions will be executed properly.

Wait and bulk/batch actions are considered long actions. Long actions require dedicated Workers to periodically check if the action is complete. This is not available in TEST mode.

For more info, you can check our documentation here.

Thank you!