How to pass OutputArguments through orchestrator start job api?

Hello

I ran the process through orchestrator’s start jobs api.
Then, I want to pass a string variable with output argument, but I don’t know how.

I tried these things.

I made an output argument in advance and assigned string values to it.

Nevertheless, the output arguments in api appears to be null.

Please help me. Thank you in advance.

Hi

Let’s sort out one by one
First make sure the job run is over and is successfully completed
This might be a problem of timing.

If you are using POST​/odata​/Jobs​/UiPath.Server.Configuration.OData.StartJobs , then the command to start a Job will be sent, but the request doesn’t wait for the Job to finish, so the response doesn’t have the output results.

After you send that command, you need to wait for the Job to finish and then retrieve the arguments using the endpoint GET ​/odata​/Jobs(ID) . This ID can be retrieved from the response of the first request that you made to start the Job.

Also, if it’s a Job that takes a lot of time, you need to make sure that it finished successfully before trying to get the result. For that, check if the field State of the response from GET ​/odata​/Jobs(ID) has the value Successful .

Cheers @sssi

3 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.