I have a process deployed in the orchestroter morder folder. I want the same process to get the moder folder name on which it is running. Can someone please help me with the syntax
Thank you for replying… i am only getting output for this activity…is this the same activity which you are using?
You have to configure / set an Output Variable (yellow mark)
from there you can retrieve as mentioned above
Hi @Pinky_AG
Use Get Current Job Info activity and in JobData create a variable say JobData
which will be Output variable. After that you can use JobData.FolderName
to get the folder name.
Regards
Hi @Pinky_AG
JobData.FolderName
Use the above syntax to get orchestrator folder name. JobData
is the output of Get Current Job Info activity.
Regards
then use a newer package version if possible UiPath.System.Activities.
Which one is used at your end
Already using 22.4.5
22.4.5 is quite an old package published in 2022 could you upgrade to something new and try the expression Peter gave
we assume that the above mentioned property was on newer version introduced.
- Upgrade the package (if Possible)
This is the latest i can see in my organization. So upgrade is not possible. Any otger way of doing ?
you can check ORC REST API for e.g. building a same / similar functionality
looks like you are on older version…you can still use orchestrator api
- Use orchestrator http request activity and first use get jobs and filter it with current job name
api: /odata/Jobs - Then get the folder it from the organization unit field in the response json
- Use the folder id to get the folder name
api: odata/folders(ID from step2) - From the response get display name to get the folder name you need
Hope this helps
for more details check swagger - <OrchestratorURL>/swagger/index.html
cheers
@Pinky_AG
there may also be a chance to use Get Jobs Activity along with a filter on the name and state.
But we recommend also to check if driving into a XY-Problem is not risked.
Just tell us more about the motivation and scenario, why the Folder Name is to retrieve. When the Process is rolled out only to one Folder, we can handle via REST Api different and maybe more direct
When we get asset from orchestrator, there is an option to provide in_orchestratorfolderpath. This parameter i dont want to send as an argument.
So the goal is to get the folder name during runtime and pass that variable rather than sending as in argument
Hi @Pinky_AG - correct me if I’m wrong. So let’s say you run a job in folder F, and you want to get an asset, A, within folder F. For that, you want to provide your folder name (in this case, F) to use the ‘Get Asset’ activity, right?
Hi @Pinky_AG - OK, pretty sure you mean something different. Anyways, since you said you can’t upgrade to a later version in Studio, can’t you ask your team to upload newer package versions of UiPath.System.Activities to the tenant? Then you can upgrade to a later version, and you can use the approach which @ppr provided.
@Pinky_AG
maybe you can elaborate more on your use case by describing the scenario
- process is running in folder X
- asset A is located in folder Y
- folder Y is located in relation to folder X
when process is running in Folder X
AND
Asset A is also located within the same Folder X
Then
we can leave the folder path for Asset A also blank
Thanks everyone…i know when we are running a process A in folder x, the orchestrator folder name can be blank for fetching assets from the same process in the same folder X.
But due to some other circumstances and requirements i need to pass the value.