Hi all,
I’m trying to start a job with input arguments on Orchestrator using the http request activity from Studio. I already managed to start a job without input parameters using this string as the JsonPayload Argument:
“{startInfo: {ReleaseKey: ‘********-****-47a1-84d1-d51789b65331’,RobotIds: ,JobsCount: ‘1’,JobPriority: ‘Normal’,Strategy: ‘JobsCount’,InputArguments: ‘{}’}}”
I then altered the Json Payload to look like this to start the same job but this time with an input parameter:
“{startInfo: {ReleaseKey: ‘********-****-47a1-84d1-d51789b65331’,RobotIds: ,JobsCount: ‘1’,JobPriority: ‘Normal’,Strategy: ‘JobsCount’,InputArguments: {in_str_message:‘hello’}}}”
Unfortunately this did not work. I’m getting the following error message: “startJobsParameters must not be null”
What am I doing wrong. It might be an obvious issue with the stringified JSON because I do not have any experience with JSONs
Kind Regards
Can you try this
{
“startInfo”: {
“ReleaseKey”: “********-****-47a1-84d1-d51789b65331”,
“RobotIds”: ,
“JobsCount”: 1,
“JobPriority”:“Normal”,
“Strategy”: “JobsCount”,
“InputArguments”: “{"in_str_message":“hello”}”
}
}
Thank you for your reply,
as you can see from the attached screenshot, this formatting will not work. At least not with the way I’m using the JSON Payload. Currently im assigning the string from my original post to a variable (type string) and use this variable as input for the “Orchestrator http Request” Activity.
Is there a way to use JSONs in the format you provided, with linebreaks, whitespace and indentations? Also How do I escape the quotationmarks?
For anyone else with similar issues: I found a solution that works for me:
“{”“startInfo”“: {”“ReleaseKey”“: “”********-****-47a1-84d1-d51789b65331"”,““RobotIds””: ,““JobsCount””: ““1"”,”“JobPriority”“: ““Normal””,”“Strategy”“: ““JobsCount””,”“InputArguments”“: “”{\”“in_str_message\”“:\”“hello\”“}”“}}”
The quotation marks seem to be quite an issue…
1 Like
Hello Felix,
Check out this very fast simple VB.NET that create JSON in 1 line:
startUiPathFromSalesforce/CreateJSON.txt at master · cristinegulescu/startUiPathFromSalesforce · GitHub
And the movie for demo:
Thanks,
Cristian