anwaykabir

Query package fails only for 'Change Signer' usecase

0 votes
Hello, We have integrated our salesforce application with onespan using APEX SDK for our signature use cases. We have setup below usecase which is working fine. 1. Sent e-signature request to John smith (only one signer on the package). 2. John Smith signs the document. 3. we query the package using below code, we can retrieve the package details and do necessary operations by parsing the JSON. We used below code to retrieve the package. OneSpanAPIObjects.Package_x pkg = new OneSpanAPIObjects.Package_x(); OneSpanSDK sdk = new OneSpanSDK(); pkg = sdk.getPackage('wxZW2jEcl1DTCchw8P8Ygxu8Z3A='); Now below scenario is failing: 1. Sent e-signature request to John smith (only one signer on the package). 2.John Smith re-assigns the signer to Tom Murphy by clicking 'Change Signer' button. 3. Tom Murphy signs it. 4. Now, we query the package using below code: OneSpanAPIObjects.Package_x pkg = new OneSpanAPIObjects.Package_x(); OneSpanSDK sdk = new OneSpanSDK(); pkg = sdk.getPackage('3tdG1ROOaVIoErcgazoq6f1jE-Y='); but below is the error that we are getting: FATAL_ERROR Class.OneSpanRESTAPIHelper.getPackage: line 770, column 1 OneSpanRESTAPIHelper.OneSpanRestAPIHelperException: Error getting the Package: Illegal value for primitive Please note for this same transaction we are able to retrieve the Audit document by using: String auditBody= sdk.getAudit('3tdG1ROOaVIoErcgazoq6f1jE-Y='); Thanks Anway Kabir

Reply to: Query package fails only for 'Change Signer' usecase

0 votes
Hi Anway, The error "Illegal value for primitive" means there's a type mismatch when parsing json to object. In this case, it's the "data" attribute under the "roles" node: line 688 in OneSpanAPIObjects class, it's expecting a string data -- public String data; However, the actual type should be Map --
{
  "emailMessage": {
    "content": ""
  },
  "type": "SIGNER",
  "data": {
    "eslColorIndex": null
  },
  "name": "Signer2",
  "id": "a85689b2-50f5-4c64-90d3-ad1c721554ed",
  "attachmentRequirements": [],
  "reassign": true,
  "deliverDocumentsByEmail": false,
  "locked": false,
  "specialTypes": [],
  "index": 0,
   ......
}
I've created a Github issue for you. Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off