This topic contains 16 replies, has 3 voices, and was last updated by  Duo_Liang 3 months, 1 week ago.

  • Author
  • Participant
    Regular Member
    Member since: 01.12.2015
    Number of posts: 59



    Hi Michael,
    I have come across the same problem once again while using updatePackage(). I get the error “Could not update role Exception”

    But his time my use case is very simple. I have a package in the draft status without any documents or signers in it, so essentially it is a Empty Package
    I use the Java SDK and add a document and signer to a DocumentPackage and try to update the existing empty package with it , but end up with the same exception.

    I used the sample code from:

    But instead of updating the setting I am updating the document and signer.

    Any idea why that would be the case.

    Member since: 14.06.2018
    Number of posts: 688



    Hi sudhangi,

    If you want to update/add signers and documents to an existing package, updatePackage() function won’t work. This function only updates package level attributes (settings/descriptions/emailMessage/expireData/etc.) like the sample code does:

     packageToUpdate = PackageBuilder.newPackageNamed(NEW_PACKAGE_NAME)

    Instead, you’d use following two functions to add signers and documents separately:

    eslClient.uploadDocuments(PackageId packageId, List documents);
    		eslClient.getPackageService().addSigner(PackageId packageId, com.silanis.esl.sdk.Signer signer);

    Among them, documents can be bulk uploaded while signers/roles have to be added one by one.

    And BTW, may I know the SDK version you are currently using?

    Hope this could help!

    Duo Liang
    OneSpan Junior Technical Evangelist
    • This reply was modified 3 months, 1 week ago by  Duo_Liang.

You must be logged in to reply to this topic.