Jobs stuck on "pending" status - OrganizationUnitId Problem

Hello Devos,

First of all, this problem is in a dev-Orchestrator (version 2021.10), not in a prod:

the problem I’m facing is :
When I create a new Robot, the OrganizationUnitId value is by default NULL, and this is not normal, because what expected is that " OrganizationUnitId=FolderId ". (( I verify this in my database )).
Anyway, there is two scenarions now :
* If I continue working with the case “OrganizationUnitId=NULL”, I will face no problems while execution jobs, but if I used API request GetRobots to get the list of Robots I have ( I need to get them ), the Result will be 0 Robots.

* If I go and update the value of OrganizationUnitId to a good value for each Robot ( using SQL ), then I will get list of my Robots successfully, but when I try to execute a job, it remains stuck in "Pending" Status.

image

What I’m looking for, is there any solution so that I become able execute my jobs without stucking in pending status, and at the same time my Robots with have an apropriate value for " OrganizationUnitId"

Best regards

Hi @ElFY

Does your robot is assigned to the particular folder?

Thanks,
Srini

For getting details of the robots, check this approach

Use the Host/Tenant tenant retrieved bearer token.

POST to https://YOUR_Orchestrator_URL/api/account/authenticate

Body of type JSON

{
    "tenancyName" : "Documentation",
    "usernameOrEmailAddress" : "Documentation",
    "password" : "DocumentationAPItest"
}

Get the robot details by using

GET for https://YOUR_Orchestrator_URL/odata/Robots/UiPath.Server.Configuration.OData.GetConfiguredRobots?$top=1000&$expand=User&$orderby=User/FullName%20asc