Madeva | Posts: 29

Need to be extend package expiry date of packages for counter signers.

0 votes
Please find following requirement condition-1: We have three signers, need to be signed. condition-2: if signer one and signer two had signed and signer three not yet signed, if the package going to be expired in one day then we need to extend it. This applies to all the packages which will meet the above conditions. So do we have an event that will notify the expiry of the package one day before or prior to expiry? So that we can handle this event for extend of the expiry date based on our requirement.

Duo_Liang | Posts: 3776

Reply to: Need to be extend package expiry date of packages for counter signers.

0 votes
Hi Madeva, Sorry for the late reply! For the callback notification, there's no event "certain days before a package get expired", for the current OneSpan Sign implementation. There could be a notification email sent out to your recipient certain days before expiry, which might be helpful. To tell whether signer one and two have signed, whereas signer three doesn't, you can loop through all signatures belonging to one person and check whether the "accepted" date is not null, refer to below code snippet:
		DocumentPackage package1 = eslClient.getPackage(new PackageId("gQxS8Zgr_hGrmauGv3tnubbHfYU="));	
		Document document = package1.getDocument(document_name);	
		for (Signature signature : document.getSignatures()) {
			if(signature.getSignerEmail().equals(signer_email)) {
				if(signature.getAccepted() != null) {
					System.out.println(signer_email + " signed " + signature.getId() + " at " + signature.getAccepted());
				}
			}
		}
If there's attachment required to a signer, also looping through all attachmentRequirements:
DocumentPackage myPackage = client.getPackage(packageId);
		
List signer1Attachments = myPackage.getSigner("[email protected]").getAttachmentRequirements();
		
for(AttachmentRequirement attachment : signer1Attachments){
      System.out.println(attachment.getName() + " " + attachment.getStatus() + " " + attachment.getId());
}
To work around the expiry date, below are three potential solutions, that I'd like to discuss with you: (1)You can still wait until the package gets expired, grab the package and filtering through the signing status, and then extend it: Depending on your requirement, if a package was already in a "EXPIRED" status, but you still want to extend the expiry date for your signers. Simply update the package with a future expiration date, and the package will automatically convert to a "DRAFT" status:
DocumentPackage package1 = eslClient.getPackage(packageId);
package1.setExpiryDate(newDate);
eslClient.updatePackage(packageId, package1);
Next, you can modify the package, if necessary, and resend it. (2)Instead of depending on the callback notification, to use a middleware database storing all packages of their ID, expiry date, recipients signing status(using callback notification), so that you can run a batch script every day to filter through all packages meetting the requirement. (3)You can choose a certain time a day, actively polling packages that are still ongoing, from OneSpan Sign, then filter through the expiry date and the signing status. Hope this could help! Duo

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