Usage of Get Jobs activity

Activity UiPath.Core.Activities.GetJobs is used to retrieve Orchestrator jobs using filters (using the Filter parameter in the activity). What can be passed to this parameter (please provide examples)?

I have a use case to get all running jobs for a specific process using this activity, but I would like to have a grasp of the activity’s full capabilities.

Usually to get the jobs using Get Jobs activity we will be mentioning the FILTER property with some values in it

  • Filter - The API Orchestrator URL that contains the filter, such as "State eq 'Pending'" which helps you retrieve all the jobs that are in a Pending state. This property supports only strings or string variables.

Cheers @Anthony_Humphries

Here is an example that gets the jobs of the existing process so it can decide if it needs to start the job again. This is being used for multiple robot processing to keep the number of robots specified as an argument running on that number of robots:

"(State eq 'Running' or State eq 'Pending') and Release/Name eq '"+config("Orchestrator_ProcessName").ToString+"_"+in_ProcessEnvironment+"'"


Thanks! This helps with my use case. Is there a full list of filter parameters I can get somewhere? You have State and Release/Name, but I’m curious what else I can filter with this activity.

1 Like

The fields that can be used in the activity’s filter are the same as the ones that can be used in a direct call to the API, so you can find them in Orchestrator’s Swagger page:

1 Like

Reviving this thread from 2020 as I have an observation between the Get Jobs Activity vs the Jobs API itself and a questoin related to this observation related to Classic vs Modern folders.

First, I was just experimenting with it via Swagger and the Studio “Get Jobs” activity. The Get Jobs Activity gives a slimmed down result which does not include everything the direct Jobs API does itself but Filtering for things the Get Job Activity doesn’t include in its results still works :slight_smile: One thing I’m interested in filtering for is input arguments which doesn’t appear included in the Get Job Activity output but specifying this filter still provides the correct response:

"( State eq 'Running' or State eq 'Pending') and InputArguments eq '{""in_OrchestratorQueueName"":""Whatever the queuename is""}' "

Observation: The Jobs API includes a value called “ReleaseName” but it does not include a “ProcessName” value. The “Get Job” Activity includes a “ProcessName” but not “ReleaseName”. Both values look to be the same thing which is:

<Process Name>_<Environment Process is attached to>

Question related to the above Observation - What does the Jobs API / “Get Job” Activity return for process names (ReleaseName / ProcessName) in a Modern folder considering Environments are a Classic-only thing? We haven’t moved to Modern folders yet so just curious if anyone hit this yet with the Job API / Get Job Activity.

I am getting this error when I run GetJobs activity from Studio ver 2021.10.5.
Operation returned an invalid status code ‘Forbidden’

I can run all other bots normally but why would I get this error only for this activity?