sean.garrett | Posts: 3

unable to send two documents for signature

0 votes
Hello there, I am trying to send two documents to be signed by the same person. so I am creating two document builders adding the email address to each one of them, but it keeps failing with the error that the email is already in use for this package. The PDF I am using has form fields in it with field extraction enabled. This is my code and I need to get this working. I appreciate your help. for(DocumentInfo document: documents){ // this is the document representation of the objects that need to // be signed. DocumentBuilder documentBuilder = this.getDocumentBuilder(document); // add all the signatures to sign the document. List signatures = document.getSignatures(); String email = null; // iterate over the signatures and set the properties // according to the signers for(Signature signature: signatures){ email = signature.getEmail(); // create the signer and set it on the package. SignerBuilder signerBuilder = getSignerBuilder(signature); packageBuilder.withSigner(signerBuilder); // go over all the signature fields. List signatueFields = signature.getSignatureField(); for(SignatureField signatureField: signatueFields){ // create the signature builder and set it // on the document. SignatureBuilder signatureBuilder = this.getSignatureBuilder(email, signatureField); documentBuilder.withSignature(signatureBuilder); } } packageBuilder.withDocument(documentBuilder); } // create the document package DocumentPackage documentPackage = packageBuilder.build(); PackageId packageId = eslClient.createPackage( documentPackage ); log.info("Package successfully sent to esign - pacakge ID: " + packageId.getId()); // send the package eslClient.sendPackage( packageId );

mwilliams | Posts: 957

Reply to: unable to send two documents for signature

0 votes
Hey Sean, It looks like this post got caught up in the spam filter and I didn't notice it til just now. Hopefully you've solved this issue. Let me know.

sudhangi | Posts: 59

Reply to: unable to send two documents for signature

0 votes
Hi Micheal, I have a similar requirement where I would have 2 documents which might have the same signer . I get the error message "The email is already in use for this package." Any idea how I can avoid this? If you want I can share the code with you. Thanks a bunch, Sudhangi

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