Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

GateWay No-Wait Problem

_hussam_
Level 3
Level 3

Hi,

I'm trying to implement a process that gets from DB set of "visits" then I'm trying to send these visits to their users, so I used gateWay that includes a subprocess,the gateWay's control type is NO-WAIT to send the visits to all users at the same time, I used a SetValue to do counting.

but the gatWay loops n-times (the number of visits) without calling the subprocess then it calls the subprocess n-times so all the tasks will be sent to one user?

am I doing somthing wrong?

p.jpg

1 Accepted Solution
pguerett
Correct answer by
Level 10
Level 10

I agree with $Nith....you do not need the Gateway....simply call the subprocess in your loop. Each time you loop through a new subfprocess will be called. You are right that the last user will have to wait until all the others are sent ....but he wil not have to wait until they respond. Just make sure that you set the Invocation Policy to "Do not Wait"

Paul

View solution in original post

0 Replies
_Nith_
Level 10
Level 10

Is your subprocess short lived?

If yes, you can completely remove the gateway and place the Confirm Visit subprocess between GetNext User & C++ activities.

Adding gatway in this case will run the Sub process in a separate thread. You cannot depend on the order of execution at this situation.

Nith

_hussam_
Level 3
Level 3

Thank you Nith,

     Is your subprocess short lived? No

    

In my case I have to send for each User a pdf to sign, so if I removed the gateway , the tasks will be sent one by one to the users and the last user has to wait for all previous user to accept their tasks and this is wrong, I want to send the tasks to all users at the same time without waiting for anyone acceptance,  because of that I used the gateway with NO-WAIT thought that it will call the subprocess for each iteration without waiting for the subprocess to be finished.

pguerett
Correct answer by
Level 10
Level 10

I agree with $Nith....you do not need the Gateway....simply call the subprocess in your loop. Each time you loop through a new subfprocess will be called. You are right that the last user will have to wait until all the others are sent ....but he wil not have to wait until they respond. Just make sure that you set the Invocation Policy to "Do not Wait"

Paul

View solution in original post

Jasmin_Charbonn
Level 10
Level 10

Can't you simply just use the Assign Multiple Task instead. This will allow you to send the task to multiple users in parallel without the need of a Gateway.

Jasmin

_hussam_
Level 3
Level 3

Paul, thank u, I did not know about the  "Invocation Policy", because I'm new in Adobe LC

Jasmin, thank u for your reply, but in my case I have to send different docs for different users, so I "Guess" the send to multiple users will not work!