Question
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689992000/b0e00dd3-9541-48bd-853e-9cc5219a666c.jpg?itok=mEwJo1yy)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689992000/b0e00dd3-9541-48bd-853e-9cc5219a666c.jpg?itok=mEwJo1yy)
700Apps
SA
Last activity: 19 Nov 2018 8:53 EST
Run the flow in background
Hi Guys,
How can we run the flow in background without user intervention?
Thanks,
Srikanth M.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
![](https://accounts.pega.com/sites/default/files/pega-user-image/472/REG-471708.png?source=PUMINIT)
![](https://accounts.pega.com/sites/default/files/pega-user-image/472/REG-471708.png?source=PUMINIT)
Digital Fast Forward
US
Hello Srikanth, if you would like to run a flow in the background without user intervention I would suggest using Robot Manager or Agile Desktop. Does your flow include an assignment or an API call? The most that a user would have to do is initiate a case. You could also create an activity to run a flow.
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689992000/b0e00dd3-9541-48bd-853e-9cc5219a666c.jpg?itok=mEwJo1yy)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689992000/b0e00dd3-9541-48bd-853e-9cc5219a666c.jpg?itok=mEwJo1yy)
700Apps
SA
Thanks for the reply.
Our scenario is on one assignment we upload a sheet and on the back end we need to validate the sheet and if validation fails then we send it to another work basket.
For this i used utility but it is failing, It is working as a post processing and not on background.
I tried by keeping wait as well but failed on that.
Regards
![](https://accounts.pega.com/sites/default/files/pega-user-image/472/REG-471708.png?source=PUMINIT)
![](https://accounts.pega.com/sites/default/files/pega-user-image/472/REG-471708.png?source=PUMINIT)
Digital Fast Forward
US
Srikanth, so you are using a custom utility to validate? If your validation includes checking properties that are mapped on your form, this can be achieved with Robot Manager, or simply a robot automation or your activity. If you use a robot automation you can pull the fields of the form into robot manager and add your check here. Then you can simply add this automation name to PostProcessing on your Flow Action/Assignment, that way, once you upload the form, the robot takes a minute to validate and then it should either continue, or return an error, however since you mentioned that you would like the assignment to be routed to a new queue, perhaps you can set a property in the automation to true if the validation fails, and in your workflow, add a property after the assignment (upload) that if property is true, reroute assignment to new user. If you use robot manager, this task would be even simpler, you can keep your robot automation and simply change the robot SetCompletion to Failed. In this case, all failed assignments will be routed to your FailedRobotQueue. I hope that this is something that may help you. To keep things simple you could also just use a Decision gate to check the values of the form.
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
CollabPartnerz
IN
If flow contains a utility then user intervention is not req.
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689992000/b0e00dd3-9541-48bd-853e-9cc5219a666c.jpg?itok=mEwJo1yy)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689992000/b0e00dd3-9541-48bd-853e-9cc5219a666c.jpg?itok=mEwJo1yy)
700Apps
SA
User uploading file which contains more than 5000 records, and if we keep the utility and then the user can not submit until the utility complete. It will not work as a background process and it working as a post-processing.
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Pegasystems Inc.
IN
Please check if this works, a flow with 3 shapes
1. In first assignment step, upload the file with 5000 records. Just upload the file in post processing of assignment.
2. add a utility shape, in this utility activity now validate the file and decide on the workbasket. and set the workbasket name to a property.
3. Add an assignment shape, select route to custom--> to workqueue --> give the above property for workbasket parameter.
See attached screen shot.
-
Kaveesh Joshi
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689992000/b0e00dd3-9541-48bd-853e-9cc5219a666c.jpg?itok=mEwJo1yy)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689992000/b0e00dd3-9541-48bd-853e-9cc5219a666c.jpg?itok=mEwJo1yy)
700Apps
SA
Hi Vanna,
We upload the file, xlxs and parse the file and then validating the records.
If we keep the utility there then the user can not submit until the parse, validation completed.
I have tried your approach but it is taking approximately 3 minutes to submit. To avoid this validation we want to run in background.
Thanks,
Srikanth M.
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Pegasystems Inc.
IN
If you want to run in the background, you can queue the activity but with that you cannot stop the case until the queue finishes its process.
Lets try this approach, spun of a sub case which contains only one utility which validates the file. Mark the parent case as dependent on this subcase resolution, with this you can make the parent case wait until the subcase finishes the process. Once the subcase finishes the process determine the workbasket and move the assignment to the appropriate work basket. Thanks.
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689992000/b0e00dd3-9541-48bd-853e-9cc5219a666c.jpg?itok=mEwJo1yy)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689992000/b0e00dd3-9541-48bd-853e-9cc5219a666c.jpg?itok=mEwJo1yy)
700Apps
SA
Thanks for the reply,
I have tried in the way you mentioned above but it is working as a post processing.
Attaching the flow that i have created
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Pegasystems Inc.
IN
i didnt get what you mean by post processing. Once the user submits the first assignment, he is not blocked right? he can do any other operation as we just spun off a sub case.
After the wait shape, you need to add your another assignment which needs to be performed after the sub case gets resolved. Thanks.
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689992000/b0e00dd3-9541-48bd-853e-9cc5219a666c.jpg?itok=mEwJo1yy)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689992000/b0e00dd3-9541-48bd-853e-9cc5219a666c.jpg?itok=mEwJo1yy)
700Apps
SA
No, User is getting blocked until the completion of the sub process utility.
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689992000/b0e00dd3-9541-48bd-853e-9cc5219a666c.jpg?itok=mEwJo1yy)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689992000/b0e00dd3-9541-48bd-853e-9cc5219a666c.jpg?itok=mEwJo1yy)
700Apps
SA
Created new child case,calling the queue for agent and kept wait shape until the agent run complete.