I am building a case management solution. Here I am getting a json string from a RPA flow, and another json string from an agent.
Now I’m passing first json string to some other agent and it works.
Now, I’m passing the those both json strings to another agent agent. Here first string (which was already used in one agent) is being parsed automatically as a object/JObject and second string (unused till this point) being parsed as json string. and input types are string and causing below error:
{“code”:“Agent.InputArgumentsSchema”,“message”:“Failure in the Orchestrator Job”,“detail”:“Input does not conform to schema\n/properties/AppealPacketMetadata.type:Value is "string" but should be "object"\nErrorCode:Agent.InputArgumentsSchema\n”,“category”:“System”,“status”:400,“traceId”:null,“response”:null}
I have tried changing the input types to Object but still getting the same error.
This is very strange behaviour. Also, I’m not able to use any expressions to convert it to string or JObject externally.
Can someone please help to identify the cause and resolve.
Try this
Pass both the input as string
Like that AppealPacketMetadata → String
AgentResponseData → String
Then pass it inside the agent
metadataObj = Newtonsoft.Json.Linq.JObject.Parse(AppealPacketMetadata)
agentObj = Newtonsoft.Json.Linq.JObject.Parse(AgentResponseData)
Let me know if u still face the issue
Thanks & Hapoy Automations
The expression editor (C#) in case management has very limited capabilities and cannot use any namespaces. It support only basic methods. Due to which not able to this or any other method to parse.
I was using the string type initially and passing the string variables directly but that was also throwing same error at runtime.
@Rohit_More
In Case Management and Agents, once an agent is created and published, its input schema is fixed (immutable). Even if the argument type is later changed in Studio (for example from Object to String), Orchestrator still validates the job input against the original schema.
Please create another agent and define the json input as string and try
Hope it resolve your issue
I have changed the input types to object and it is now working.
I did observe some strange behaviour, I’m getting string input, when passing it first time then it’s passed as string, afterward it’s being treated as object. It may be some bug and might be fixed in future.