How can I invoke foreground xaml in a backgound xaml using windows framework?

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.

Thanks in advance!

As per the UiPath Guideline, you can run bot two why based on the UiPath Licence type

  1. Un-Attended: From Orchestrater
  2. Attended: By Manual

Regard
Mukesh Singh
Mukesha.com

Hi @donfeng91

You can utilize the “Invoke Workflow File” activity. This activity allows you to call another XAML file.

You can directly convert your legecy project to windows project.

image

Hope this helps :slight_smile:

@donfeng91

May I know why you want to do this?

And also if it is working on ui …how is it background?

Cheers

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.

Now, I use windows task schedule, python and powershell to manage UiPath bots.
I think it is nothing about Attended or Un-Attended.

@donfeng91

If it is adifferent project you can call it using invoke process activity where the foreground process would be called…please try the same

Cheers

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.

@donfeng91

The process needs to bepublished

Also you can use start jobs as well to trigger that process and then wait for it…start job with rwsume is also there

Cheers

  1. 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.

Yeah! Thanks! You remind me of requesting orchestrator api trigger which is an useful way and can pass parameters as well. By the way, I posted another help on this forum few months ago. And I really like api trigger feature.
API triggers issue(sync long-polling): UIPath studio http activity get error message - Feedback / Orchestrator - UiPath Community Forum

1 Like

@donfeng91

So is this sorted for you know? or you have any further questions?

And regarding api trigger why not directly use startjob trigger

check the swagger <orchestratorurl>/swagger/index.html

the other issue is addressed there I guess

cheers

I found one of my UIAutomation projects in which I turn on starts in background toggle. It runs very well.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.