Hi everyone,
I am trying to start a job with input parameters using Orchestrator HTTP Request activity:
When I pass this code to JSON Payload section
"{startInfo: {ReleaseKey: '-----',Strategy: 'ModernJobsCount',JobPriority: 'Normal',InputArguments: '{strCompany:'---',strURL:'" + strURL +"'}',JobsCount: 1}}"
I get error in Orchestrator:
The JSON is not valid. (Parameter ‘JSONPayload’)
System.ArgumentException: The JSON is not valid. (Parameter ‘JSONPayload’) —> Newtonsoft.Json.JsonReaderException: After parsing a value an unexpected character was encountered: T. Path ‘startInfo.InputArguments’, line 1, position 144. at Newtonsoft.Json.JsonTextReader.ParsePostValue(Boolean ignoreComments)
at Newtonsoft.Json.JsonTextReader.Read()
at Newtonsoft.Json.Linq.JContainer.ReadContentFrom(JsonReader r, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JContainer.ReadTokenFrom(JsonReader reader, JsonLoadSettings options)
at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JToken.ReadFrom(JsonReader reader, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JToken.Parse(String json, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JToken.Parse(String json)
at UiPath.Core.Activities.OrchestratorHttpRequest.ExecuteAsync(IOrchestratorActivitiesClient orchestratorClient, AsyncCodeActivityContext context, CancellationToken ct)
— End of inner exception stack trace —
at UiPath.Core.Activities.TaskExtensions.ThrowIfNeeded(Task task, Boolean suppresThrowException)
at UiPath.Core.Activities.Orchestrator.BaseOrchestratorClientActivity.ThrowIfNeeded(AsyncCodeActivityContext ctx, Task task, Boolean suppresThrowException)
at UiPath.Core.Activities.Orchestrator.BaseOrchestratorClientActivity1.EndExecute(AsyncCodeActivityContext context, IAsyncResult result) at UiPath.Core.Activities.OrchestratorHttpRequest.EndExecute(AsyncCodeActivityContext context, IAsyncResult result) at System.Activities.AsyncCodeActivity
1.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
— End of stack trace from previous location —
at UiPath.UIAutomationNext.Activities.NApplicationCard.OnFault(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
But I exactly do the same with videos below:
UiPath Tutorial | Orchestrator HTTP Request - Start Job using Release Key and Robot ID (youtube.com)
UiPath Orchestrator API Using Orchestrator HTTP Request Activity | Part 6 | Run the Job from Studio (youtube.com)
Can you help me ?