Background Process template vs Normal RE-Framework Template

Hi all,

I have a some doubts on the working definition of these 2 types of Templates. I have created a Automation Project in REFramework which runs in the Background and has same Project Dependencies as mentioned in the guide of Background Process.

Now, as mentioned above, it was not build using Background process template, my question is, can it work in similar way Background process runs ?

I mean, quoting Document of Background Process:

The Background Process is a template for creating processes that can run in parallel on the same Robot, together with one foreground process.

Can my Project work in the same way or do I need to do some changes in RE-Framework or recreate whole project in Background Process template ?

Please advise.

Thanks,

Hi @mayank_26

Check this

Thanks
Ashwin S

Hi @AshwinS2,

This is the same document I have shared on my initial post. I have read it. My question is, do I have to use Background process template to develop something which can run in parallel to Foreground Automation ?

What if I have developed something which works in background but I have used Re-framework to build it. Please note, I have also taken care of the Project Dependencies and only included those which can work in background.

Can such development work in background while a Foreground Automation runs in parallel ?

Hi @Cosin ,

Sorry to drag you here, but reading forum post it seems you are engaged with Background Automation.

Could you please advise in this case ? I have removed UiAutomation Activities from my project and only using activities mentioned in the document.

Though my Project is accessing specific drive locations to read Excel Files.

I am using an Studio Robot and a trigger to start the background process.

Thanks in advance for your help.

hey @mayank_26 I have actually been wondering the same thing. Can’t seem to find anything useful on the forum yet. Have you been able to test this or find out the answer?
Thanks!

Hey @mayank_26 I actually have some updates. Decided to try out some ideas myself.
I basically created a blank background process and looked at the project.json settings. The only difference here was “requiresUserInteraction”: false. So after opening up a bot built with the REF, I first removed the dependencies that have UI automation, saved, and then changed the setting in json file to false. When I tried to publish, these 2 xaml files errored, but of course screenshots for a background process are irrelevant, and test xamls are not something I use. After publishing to orch I tested running this new process concurrently with others and happy to report that it works! :slight_smile:

So to recap the steps are:

  1. Remove UiPath.UIAutomation package dependency
  2. Change Project.json “requiresUserInteraction”: false
  3. For REF get rid of take screenshot xaml and run all tests xaml

Hope this helps. Cheers

image

5 Likes

Hi @efleurent,

Thank you for your research, this is good information, although I think UiPath will not support this modification when it comes to raising an IT ticket for any further issues in the project.

Though I will test this myself and see if this resolves my current issue with the background process I have created. I was not getting any information and thus I changed my template to Background process. Now I am facing an other issue while running this Background template from Orchestrator.

I will take your feedback and do these modification in REF and see if this works with Orchestrator.

regards,

I tested it in the Studio and it works fine, however, did you check its functionality with Orchestrator ?

I tried and it failed. :frowning:

1 Like

yup, worked fine for me. Just make sure that studio did not change the json setting back, thats what happened to me the first time. I think its because I did step 2 before doing step 1, but not sure thats just a theory. I was able to run a UI interaction bot while the background process was running no problem

Let me check the rights at the orchestrator because mine is not working with Orchestrator. :frowning:

Hi @mayank_26 looks like the latest LTS release fixes this issue you were having, by allowing you to change the settings from project settings. Looking at the documentation, it does exactly what I did which was just change the json setting files :smiley:

This should solve your issue.

Cheers

So I have an additional question in regards to this topic, as stated in the documentation:
" The Background Process is a template for creating processes that can run in parallel on the same Robot, together with one foreground process. For this reason, background processes must not contain activities that require user interaction."
Question is, what if I want to trigger the same background process multiple times, passing in a different Parameter? Would that work or would it only create one Pending Job and not create other Jobs on the same Robot?
Currently there is a limitation of a single Process running on single Robot. If you try and create or trigger another instance of the Process on the Robot, it will create a Pending Job, but any attempt to create any additional Jobs will fail, so wondering if this gets around that limitation…?

Also, does anybody know what this means - " Please note that a Background Process runs in Session 0 when started from Orchestrator on an Unattended Robot."…?
What is “Session 0”…?

Hi @Scott_Taylor,

Thank you for raising these questions.
To answer your first question:
It will work and will not create pending jobs on the orchestrator. The limitation of single process on single robot is only valid for UI automation or i can say Foreground processes. With latest update of 20.4 you can run 5 background process at once on one robot as well.

Session 0 is an isolated environment which is not bothered by any other applications in an active session. You can read more about it on google.

Well, we are running 2019.10.4 but did a quick POC and as originally stated, it will throw the 2nd instance of the Job into a Pending Status, so the limitation still seems to be there, guess it is only possible in version 20.4…? Both of the Jobs / Processes were created using the Background Template, but cannot run multiple instances via Orchestrator in Unattended mode on Automation Server.

I had the same question posted in another thread. I investigated it more and I think I found the answer why it runs in parallel from Studio or the Assistant, but not scheduled from Orchestrator (where it is pending). Here is the thread with the explanation:

And I have also created a video showing what settings must be changed to convert a standard REFramework to a Background Framework - you can navigate directly to that section of the video with the chapters in the description of the video (minute 18:59). Hope this helps: