Hi all,
I am trying to fetch the newly introduced decision tables via the new business rules API using the latest Java SDK version 236.0.0
Java code used: businessRulesApi.getBusinessrulesDecisiontable(myId);
this fails with the error:
16/11 20:29:30,151 [c.z.models.architect.BusinessRuleDecisionTableModel] ERROR- Cannot construct instance of `java.util.ArrayList` (although at least one Creator
exists): no String-argument constructor/factory method to deserialize from String value ('string')
at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 2784] (through reference chain: com.mypurecloud.sdk.v2.model.DecisionTable["publishedContract"]->com.mypurecloud.sdk.v2.model.DecisionTableContract["rowAuthoringSchema"]->com.mypurecloud.sdk.v2.model.ContractJsonSchema["definitions"]->java.util.LinkedHashMap["string"]->com.mypurecloud.sdk.v2.model.ContractDefinition["type"])
this is returned in the response: notice that type is string (not a list)
"additionalProperties": false,
"definitions": {
"string": {
"title": "String",
"description": "A text value",
"type": "string"
},
ContractJsonSchema uses a map in which we have ContractDefinition class which is defined as:
private List type = null;
As you can see List is not compatible during deserialization with String. I feel that the SDK is wrong and this type should be defined as String and not a list. I raised a Genesys case and the case owner states that I should ask this on the forum. I completely disagree as this appears to be a bug so the forum wont be able to help.
has anyone seen a similar issue? I cant be the only one using this API? would you agree this is a bug that has to be fixed?
#PlatformSDK------------------------------
Zsolt Belicza
Uc, Cc Architect
------------------------------