Hi everyone, One of my job RPA senarios is that:
1, firstly to query database every 10 minutes;
2, if only get the specific records, will invoke UIAutomation, which happen quite few compared with database query frequency.
By now, I invoke foreground xaml in a backgound xaml using windows-legacy framework.
But, how can I do that in windows framework?
I have several reasons to achieve it:
1, windows-legacy framework is discarded by new version UiPath;
2, windows-legacy can’t use 64 bit system components such as OCBC 64 bit;
3, some new features of UiPath.
In windows framework, We can’t invoke workflow file which is in other project file. Only xaml files in the same project folder can be invoked. What’s more, in one project only one framework can be set and between background and foreground mode can be set only one of them in one project file.
As a result, it can’t invoke foreground process from background process using windows framework. On the contrary, we can do it using legacy framework.
In my view, it is a downgrade.
I have listed few reasons above. And the most important is that the database query bot will run 7*24. If it sets to foreground mode, can’t run other foreground bots in the same computer simultaneously. So, I divide it into two parts, one background to query database, the other foreground one to run UIAutomation.
I’ve tryed to use invoke process to call foreground xaml and nupkg, but failed.
Although I can use background bot to trigger win-schedule task which is the foreground bot, it lose the capability to pass arguments to the foreground bot.
To query the database periodically, you can use UiPath Orchestrator to schedule your process to run at regular intervals. Orchestrator allows you to configure triggers for your processes, including time-based triggers such as running a job every 10 minutes. Within your UiPath workflow, you can use database activities (e.g., “Connect,” “Execute Query”) from UiPath’s database activities package to interact with the database and retrieve the required records.