Using Adobe Sign API in AEM/AEM Forms

This article describes using Adobe Sign in Aem/Aem Forms.Adobe Sign provides rich set of REST API for signing documents. The OSGI bundle that is provided here, encapsulates some of these API and allows you to use them within AEM. The following steps describe the process of sending a document for signing using the OSGI bundle.The first step is to deploy the bundle. Once the bundle is deployed, you will need to provide some configuration settings to the bundle.

These are your Adobe Sign specific settings. In this example I am using callback url to do some additional processing when document is signed. It is not mandatory to provide callback url

Capture

Once you have the bundle deployed and configured the following are the steps that need to be performed to send a document for signing

Download

Get the service

com.mergeandfuse.adobesign.AdobeSignService adobeSignService
= sling.getService(com.mergeandfuse.adobesign.AdobeSignService.class);

Get the transeint document id

String transienDocId = adobeSignService.getTransientDocumentID(inputstreamofDocument);

 getTransientDocumentID- The document uploaded through this call is referred to as transient since it is available only for 7 days after the upload. The returned transient document ID can be used to refer to the document in api calls like that to the API which creates agreements where uploaded file needs to be referred.

Create JSONRequest

String jsonRequest = adobeSignService.getJSONRequest(recipientsEmail,transienDocId );

getJSONRequest – This method creates the JSON request that needs to be sent to Adobe Sign. The
method accepts String array of recipientEmails and transienDocId.

Send the Document For Signing

String agreementId = adobeSignService.sendDocumentForSigning(jsonRequest);

sendDocumentForSigning – This method sends the document for signing. Method accepts the jsonRequest as input parameter.

 Method returns the agreementid that can be used to query the status of the document that was sent for signing.

Download

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy