Is there a way within an automation to retrieve the name of the Orchestrator folder that the job is running out of? For example, if an automation is running from a folder named “System” I want it to use the Start Job command to queue another automation, but if the same automation is running out of a folder named “User Jobs”, I don’t want it to action the Start Job activity in my logic. I’d like to do this with a simple If condition that tests some kind of attribute that tells me the name of the Folder.
Could you tell me what would be the use case for such behavior? I don’t see the point of doing such as you can create automation based on queue where for example another automation will be triggered only when queue item is pushed to selected place. Eventually you can work with triggers.
The use case is that I want the automation to be able to use Start Job to kick off another Unattended job if the automation is running out of my “System” folder where Unattended stuff is running. Users can also run the same automation from their folders. The user folders are geared toward Attended jobs run from Assistant. The user folders generally do not have an Unattended robot available in them to run unattended stuff. So I want the Start Job to only be actioned if running in a folder that I know has Unattended robot(s) available. From a config table, I know which folders have Unattended robot(s) available. So I was hoping their would be some kind of UIPath-level system variable/function that returned the name of the folder the process started in. I can work around this in various ways, but was just hoping there was something available. Queues might work, but I would still have to know whether to queue the job item for the queue processor to start the job. Hope that helps you understand the rationale.
Seems quite clear to me but it looks like something applicable for only dedicated use case. I mean there are not a lot of processes which works like this so it will be rather dedicated option for only small amount of possible usage. And it’s still something what can be achievable with queue items and some Orchestrator API calls to get robot status etc.
Hi guys, did you get a solution for this? I also need this. I have a report data after the process has completed running that is being sent to the email.
ProcessName: XXX Environment: Production/NonProduction RobotUser: XXX DateTime: XXX Status: Success/Business/System Error FolderName: Folder that the process has run from
I’m able to get all the information except the folder name. If I can get folder name I can also use below API to get more information.
I am having the same issue. Recently upgraded to newer version and trying to get our company onto cloud orchestrator. Our existing bots will not run in newer studio connected to cloud because Get Asset activities require folder now. We can hard-code the value for testing, but while in DEV folder now, it will eventually be in UAT or PROD once we promote and need to have the appropriate value so that the assets can be retrieved.
If you know the folder ID (and want to use it by static):
You could create asset in each folder and fill it with right value.
You can also check with API the job you are currently working by filtering in get jobs. For ex.
State eq 'Running' and HostMachineName eq 'Environment.MachineName'
Environment.MachineName is of course dynamic part.
So in that case (if your automations are not background) you should receive 1 job in response. And there is value in response for the job:
BTW: My friend @Adrian_Star made pretty sweet solution for dynamic jobs in empty spaces beetween triggers. You can exactly declare which workstation you want to work with, when there is for ex. 10 min free space before trigger job.:
Those should be optional if you like to take asset from the folder you are working with…
What Studio and Robot version do you have? Here you can check compatibility:
If you struggle with that I think you should create a ticket to support (I assume you have enterprise version)
Thanks for the matrix. That makes things a little clearer. I was on studio version 2021.10.4. It is now working with the folder not being populated. We were in the middle of migrating to cloud when I first posted and completely on cloud now, so it seems to have been an issue that has since been ironed out.