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.

Hi
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+"'"

1 Like

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

https://www.odata.org/documentation/odata-version-2-0/uri-conventions/

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: