Could not update role Exception
Thursday, January 12, 2017 at 02:52amHi,
When I try to updatePackage() I get the following exception. I am trying to update the package with additional signer information to a placeholder block in the document when I get this problem. Any idea why would this happen?
com.silanis.esl.sdk.internal.EslServerException: Could not update role Exception: HTTP PUT on URI https://sandbox.e-signlive.com/api/packages/fb433c2d-8fa3-47db-97d9-81e92ff5780d/roles/FormB_RequestingProgramOfficial resulted in response with status code: [500, Internal Server Error]. Optional details: {"messageKey":"error.internal.default","packageId":null,"entity":null,"technical":null,"message":"Unexpected error. We apologize for any inconvenience this may have caused you, please try again. If the problem persists, please contact our support team.","code":500,"name":"Unhandled Server Error"}
com.silanis.esl.sdk.internal.EslServerException: Could not update role Exception: HTTP PUT on URI https://sandbox.e-signlive.com/api/packages/fb433c2d-8fa3-47db-97d9-81e92ff5780d/roles/FormB_RequestingProgramOfficial resulted in response with status code: [500, Internal Server Error]. Optional details: {"messageKey":"error.internal.default","packageId":null,"entity":null,"technical":null,"message":"Unexpected error. We apologize for any inconvenience this may have caused you, please try again. If the problem persists, please contact our support team.","code":500,"name":"Unhandled Server Error"}
at com.silanis.esl.sdk.service.PackageService.updateRole(PackageService.java:501)
at com.silanis.esl.sdk.service.PackageService.updatePackage(PackageService.java:170)
at com.silanis.esl.sdk.EslClient.updatePackage(EslClient.java:253)
Thanks,
Sudhangi
Reply to: Could not update role Exception
Thursday, January 19, 2017 at 08:11amDocumentId docId = createdPackage.getDocument("sampleAgreement").getId(); //grab document eslClient.getLayoutService().applyLayout(myPackage, docId.getId(), docLayoutId.getId()); //apply layout (3 placeholders) My document contains signatures for 3 different signers. The third being a dummy email so I can repurpose that signature from the layout to be for signer1. createdPackage = eslClient.getPackage(myPackage); //get updated package after applying layout Collection mysigs = createdPackage.getDocument("sampleAgreement").getSignatures(); //get all signatures
List sigsToMove = new ArrayList(); //create a new List to store all signatures in for "update".
Signature mynewsig = null; //create signature object to use to create new signatures to transfer from signer3 to signer1.
for(Signature sig : mysigs){ //walk through signatures
String email = sig.getSignerEmail();
if (email.equals("[email protected]")){ //check signature email against known dummy email
Collection myfields = sig.getFields(); //grab fields from signature
mynewsig = SignatureBuilder.signatureFor("[email protected]") //create new signature for signer1 and transfer all value from
.atPosition(sig.getX(), sig.getY())
.withSize(sig.getWidth(), sig.getHeight())
.withId(sig.getId())
.onPage(sig.getPage())
.build();
mynewsig.addFields(myfields); //add all fields from old signature to new signature
sigsToMove.add(mynewsig); //add new signature to signature list
}
else{
sigsToMove.add(sig);//add unchanged signature to signature list
}
}
eslClient.getPackageService().removeSigner(myPackage, createdPackage.getSigner("[email protected]").getId()); //remove the temp signer
createdPackage = eslClient.getPackage(myPackage); //get updated package
eslClient.getApprovalService().updateSignatures(createdPackage, docId.getId(), sigsToMove); //update all signatures for document You would just have to do this for each document that you apply a layout to. Hope this helps. Let me know if you have issues.Reply to: Could not update role Exception
Thursday, January 12, 2017 at 03:55pmReply to: Could not update role Exception
Friday, January 13, 2017 at 04:16amReply to: Could not update role Exception
Friday, January 13, 2017 at 04:24amReply to: Could not update role Exception
Friday, January 13, 2017 at 04:39amReply to: Could not update role Exception
Friday, January 13, 2017 at 04:57amReply to: Could not update role Exception
Tuesday, January 17, 2017 at 08:37amReply to: Could not update role Exception
Wednesday, January 18, 2017 at 08:06amReply to: Could not update role Exception
Thursday, January 19, 2017 at 09:44amReply to: Could not update role Exception
Thursday, January 19, 2017 at 09:50amReply to: Could not update role Exception
Friday, January 20, 2017 at 05:28amReply to: Could not update role Exception
Saturday, January 21, 2017 at 06:35amReply to: Could not update role Exception
Monday, January 23, 2017 at 07:04amReply to: Could not update role Exception
Monday, January 23, 2017 at 08:33amReply to: Could not update role Exception
Monday, December 10, 2018 at 08:35amReply to: Could not update role Exception
Tuesday, December 11, 2018 at 04:31ampackageToUpdate = PackageBuilder.newPackageNamed(NEW_PACKAGE_NAME) .describedAs(NEW_DESCRIPTION) .withEmailMessage(NEW_EMAIL_MESSAGE) .expiresAt(now().plusMonths(2).toDate()) .withLanguage(Locale.FRENCH) .withVisibility(NEW_VISIBILITY) .withNotarized(NEW_NOTARIZED) .autocomplete(false) .withSettings(settingsToUpdate) .build();Instead, you'd use following two functions to add signers and documents separately: 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