roneddy

Interesting behavior when adding positionally extracted field

0 votes

Hello,

We are still using the classic signer UI and have a question.

We have a use case which uses position extraction (as documented here).  In this use case our document has multiple signature fields for each signer but for various technical reasons our internal partner application is unable to provide the exact fields for each signer. For example, lets say signer 1 must sign field "sig1" but not "sig2" in some cases, but in other cases they sign both.  For reasons that are not important our application is not able to differentiate these.  So we tried getting creative.

As a possible workaround to this we had them try passing in all possible field names for a given signer.  We then try to setup a signing with a PDF which only has a single one of these named fields.  Our hope was that OneSpan Sign would basically ignore the "extra" field names since they are not found in the document, or perhaps even error because the fields were not found.  Instead what we found was that OneSpan does not error and in fact in the signing experience it believes there are 2 total signatures.  It allows us to sign the first signature and then updates the progress to show 1 of 2 signatures as signed.  However, there is no 2nd signature to sign and so the signing ceremony is essentially 'stuck' here.

Here is an example of how we send this:
Note: To repeat this you would use a PDF which contains only a field named signer1_1 and no field named signer1_2.

.withDocument(newDocumentWithName("First Document")
         .fromFile("DOC_FILE_PATH")
         .enableExtraction()
         .withSignature(signatureFor("[email protected]")
                     .withName("signer1_1")
                     .withPositionExtracted())
         )
         .withSignature(signatureFor("[email protected]")
                     .withName("signer1_2")
                     .withPositionExtracted())
         )

My question to you, is there any way to make this use case work in OneSpan?  Essentially we would like to be able to provide a list of all possible signature field names and then OneSpan applies them to the document using whatever it actually finds there, ignoring the rest.

Thanks!


Reply to: Interesting behavior when adding positionally extracted field

0 votes

Hi Ron,

 

Thanks for the post! From my understanding, OneSpan Sign system will ignore the fields if the forms don't exist. However, this seems to be an changed behavior in a past release and since you are developing on an on-premise environment, it might occurred after your current version therefore you saw the inconsistence. To work it around, you can try deleting all signatures with size of (0,0) after the initial upload:

 

        PackageId packageId = new PackageId("-FudIlfyODJ1G5Rr1Dy1Ipujl7g=");
        DocumentPackage package1 = eslClient.getPackage(packageId);
        Document document = package1.getDocuments().stream()
            .filter(doc -> doc.getId().getId().equals("document1"))
            .findFirst()
            .get();
        
        for (Signature signature : document.getSignatures()) {
            if (signature.getHeight() == 0 && signature.getWidth() == 0) {
                eslClient.getApprovalService().deleteSignature(packageId, "document1", signature.getId());
            }
        }

 

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