Question
Allstate
IN
Last activity: 9 Dec 2019 5:43 EST
Looping the Parallel Process
Hi Team,
Can we loop (using ListLoop) the parallel process for uploading multiple attachments in Web Application?
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
US
You should not jump to an exit point within your ListLoop. Instead you should break the ListLoop and exit from there. In this case, you are jumping to success after the Parallel Process which is why it isn't returning to your next ListLoop item. Off of the completion of the PP, I suspect you just want to return to the loop. In that case, you should have nothing connected there.
Pegasystems Inc.
US
I am not sure exactly what you mean, however I will try to answer what I believe you are looking for. You can't really call the same automation multiple times at the same time if that automation is operating against an application and there is only one instance of it without ensuring the automation is itself written to handle it. Basically, if you have an automation that starts up an adapter and clicks a button; if you ran it twice at the same time, one would start the adapter, one would fail to start it as is being started by the other instance of the automation. You can code your automations to operate on multiple instances of given controls, it just involves enabling UseKeys on the parent control and then launching multiple instances of that under the adapter. With IE that is possible. I wouldn't suggest you do that though as IE tends to be a resource hog and having too many instances running will certainly negate any performance gains if not crash the application entirely.
Allstate
IN
Scenario:
The automation should able to upload multiple attachments in a Web Application. The input of the automation is a Json array.
Current Soultion:
I am converting the json array to list to get multiple file paths from the Json.
I am able upload a single file using parallel process when the input is simple Json String.(Attached Screenshot: Parallel Process.JPG)
Expected Behavior:
But now I want the parallel process to be iterated multiple times so that I can upload multiple file attachments.Any idea how this can be achieved?
EVONSYS
IN
Hi swaroop,
I have seen your automation. I realized that the automation is stopping at "Perform Click" browse method, so that you might have used the parallel process. correct me if i am wrong. Have you tried raise event method instead of Perform click method, so that we can avoid parallel process and your automation becomes easy for looping through the file paths.
Another suggestion, if the above don't work : Use reset state method on the object, i.e, the browse button for each time you enter the parallel process. Please try this and comment the results.
Allstate
IN
Hi Syam,
Thanks for suggestion
I tried the both of the solutions provided by you but didn't have any luck.
1. Tried using Raise Event method(on click) instead of Perform Click method , and the automation is stopping. (PFA:raise event.JPG)
2. Used reset state method as well and still the automation stopped , didn't even upload a single file.(PFA: Reset State.JPG)
Can you help me with other possible way to solve this scenario.
EVONSYS
IN
Hi Swaroop,
In your implementation of automation with reset state, can you do the following changes and test it :
1. remove the JumpTo Success Label from the timeout point of parallel process.
2. remove the reset state method from that position and connect to the timeout point of parallel process component.
Can you modify accordingly and please run the automation in debugging mode by executing it step by step.
Allstate
IN
Hello Shyam,
Tried with suggested modification by you but still automation is stopping before Parallel Process is being executed.
EVONSYS
IN
Hi Swaroop,
Can you say, what made the automation to complete before the entry of parallel process(atleast for one execution of loop). Can you check whether the list loop is yielding the values. Also, please debug the step by step execution and please inform.
Allstate
IN
Hello Syam,
Yes, I have checked that list loop is yielding the values correctly. The automation is stopped abruptly without any error message when I ran the automation in debug mode( step by step) after listloop block.
Allstate
IN
Hi Thomas,
Please suggest the possible solution to this scenario.
Pegasystems Inc.
US
I would need to understand more about what you are trying to do. The Parallel Process is required for your scenario (in my experience), because the click event shows a modal dialog and thus does not return until the dialog is dismissed. The dialog being modal means that you can't trigger it again until the first one is dismissed. I don't believe ResetState or RaiseEvent are valid here. I assume that to trigger this a second (or third, etc...) time you would click a new button each time. It wouldn't make sense to upload a single file at a time and then click the same button and expect it not to overwrite the first entry. Are you able to manually select multiple files if you click that button? If so, you might be able to supply a string of the files you want in one shot.
Allstate
IN
Hello Thomas,
No I am not able to select multiple files at once but once a file has been selected and uploaded by selecting the browse button then I need to follow the same procedure to select another file and upload it in the Web Application.(Manual Process)
The trigger for my automation is a Json string. In the Json String , there is an attribute which contains multiple file paths that I am extracting using script and converting it to list so that I can iterate and upload multiple files one by one.
But currently the issue is the automation stops after the listloop stage and it is not proceeding to the Parallel Process stage.
Let me know what other details you need.
PFA: json format.JPG
Pegasystems Inc.
US
Please show me a screenshot of your automation where it is stopping. Is the issue with your use of the Parallel Process or the use of the ListLoop? If you remove the Parallel Process and replace it with a message box, does your ListLoop iterate as expected?
Allstate
IN
Hi Thomas,
Yes that's correct when I remove the Parallel Process with message box then it ListLoop iterated as expected.
Attached screenshot of my designed automation.
I am unaware what causing the automation stop. When removed the listloop to upload a single attachment then Parallel Process is working as expected. ListLoop is required to upload multiple attachments which I am trying to achieve.
Give your thoughts on this.
Accepted Solution
Pegasystems Inc.
US
You should not jump to an exit point within your ListLoop. Instead you should break the ListLoop and exit from there. In this case, you are jumping to success after the Parallel Process which is why it isn't returning to your next ListLoop item. Off of the completion of the PP, I suspect you just want to return to the loop. In that case, you should have nothing connected there.