Hello,
I am having an error 500 when trying to invoke Orchestrator API to add queue items which contains complex information (i.e. not only primitives key-value pairs): the funny part is that even the Swagger API documentation example gives the error.
Here is an example:
Input:
{
"itemData": {
"Name": "Queue",
"Priority": "High",
"SpecificContent": {
"DynamicProperties": {}
},
"DeferDate": "2018-04-02T15:41:44.806Z",
"DueDate": "2018-04-02T15:41:44.806Z",
"Reference": "string"
}
}
Output of Orchestrator 2018.1 APis:
{
"message": "queueItemParameters is null!",
"errorCode": 0,
"resourceIds": null
}
The only way to make it work is to send only key-value pairs inside the “SpecificContent” field (you get the same error if you try to send anything different from a key-value, i.e. if you try to put a complex object inside or an array).
So the only way to work with the APIs is to send something like:
{
"itemData": {
"Name": "StageOneQueue",
"Priority": "High",
"SpecificContent": {
"key1": "value1",
"key2": 34,
"myArrayItem1Field1": "item1Field1_value",
"myArrayItem1Field2": "item1Field2_value",
"myArrayItem2Field1": "item2Field1_value",
"myArrayItem2Field2": "item2Field2_value"
},
"DeferDate": "2018-04-02T15:41:44.806Z",
"DueDate": "2018-04-02T15:41:44.806Z",
"Reference": "ref2"
}
}
In this case it works, here is the full output:
{
"@odata.context": "https://vbox-uipath/odata/$metadata#queueItem/$entity",
"QueueDefinitionId": 2,
"OutputData": null,
"Status": "New",
"ReviewStatus": "None",
"ReviewerUserId": null,
"Key": "0f9d8618-cbe0-49a4-90d1-d898afe1a540",
"Reference": "ref2",
"ProcessingExceptionType": null,
"DueDate": "2018-04-02T15:41:44.806Z",
"Priority": "High",
"DeferDate": "2018-04-02T15:41:44.806Z",
"StartProcessing": null,
"EndProcessing": null,
"SecondsInPreviousAttempts": 0,
"AncestorId": null,
"RetryNumber": 0,
"SpecificData": "{\"DynamicProperties\":{\"key1\":\"value1\",\"key2\":34,\"myArrayItem1Field1\":\"item1Field1_value\",\"myArrayItem1Field2\":\"item1Field2_value\",\"myArrayItem2Field1\":\"item2Field1_value\",\"myArrayItem2Field2\":\"item2Field2_value\"}}",
"CreationTime": "2018-04-02T16:33:41.7712822Z",
"Progress": null,
"RowVersion": "AAAAAAABMO8=",
"Id": 80,
"ProcessingException": null,
"SpecificContent": {
"key1": "value1",
"key2": 34,
"myArrayItem1Field1": "item1Field1_value",
"myArrayItem1Field2": "item1Field2_value",
"myArrayItem2Field1": "item2Field1_value",
"myArrayItem2Field2": "item2Field2_value"
},
"Output": null
}
As you can see as part of the output, you get this interesting information:
....
"SpecificData": "{\"DynamicProperties\":{\"key1\":\"value1\",\"key2\":34,\"myArrayItem1Field1\":\"item1Field1_value\",\"myArrayItem1Field2\":\"item1Field2_value\",\"myArrayItem2Field1\":\"item2Field1_value\",\"myArrayItem2Field2\":\"item2Field2_value\"}}",
....
So it seems the “DynamicProperties” field is not usable calling the API: this is an issue because it does not enable us to send lists as data inside a queue item.
To my understanding, considering the documentation as “correct”, this is a bug in the implementation.
Any feedbacks on this ?