In many companies, business processes, in which contracts and agreements are created and sent to external parties for filling and signing, are still the norm. Often, this involves sending a physical document back and forth: from the initial issuer to one or several recipients and back again. Taking into account the time spent for manual interactions and costs incurred by this procedure multiplied by a factor to scale, the opportunity to automate such tasks and to accomplish them electronically becomes priceless. This is where Adobe EchoSign comes into play.
Adobe EchoSign is an electronic signature and Web contracting solution. Its major features focus on document signing, tracking, and filing. It supports signing by email (e-signature) or by fax [1].
In this blog, I am going to elaborate on the topic of integrating Adobe EchoSign services into a business process developed with SAP NetWeaver BPM. To illustrate this routine, I have developed a business process, which involves the creation of an agreement with the SAP NetWeaver BPM environment, sending it for signing to an external party via email, and getting back a notification that the document has been signed. Both, the issuer and the signer of the agreement are expected to fill some custom data into the agreement. The process extensively explores the functionality provided by Adobe EchoSign.
To see a demo of the scenario, please watch the following video:
The blog is organized as follows: first, I describe the use case for the process at hand in greater detail and give an overview of its main parts. After that, a detailed description of each part is provided. I close with a conclusion and references to further information on the topic overall. At the very end of this blog post, you can find an appendix with the points that should be taken into account for productive scenarios.
The user story for our business process is as follows:
To be able to integrate the functionality of Adobe EchoSign and SAP NetWeaver BPM, some preparatory steps are required:
Details are provided at the end of this blog post in the Appendix.
To access the online signature features, a master account within Adobe EchoSign has to be created and the corresponding tariff plan needs to be chosen (this can be done here). Depending on the tariff plan, the master account allows creating a number of sub-accounts for different users and assigning relevant permissions and rights to them. This functionality makes a lot of sense for companies where multiple users are expected to send and/or process the agreements. The available functionality depends on the tariff plan, but it is possible to set up a free developer account as a starting point.
We have created a demo process which utilizes the functionality of Adobe EchoSign. The process involves two parties: a manager (the BPM process owner) and a student (an external party who is supposed to sign the agreement).
The process consists of 4 main parts:
In the figure below, the process diagram is shown:
In the first task, the manager specifies - in a SAPUI5 UI - the name of the student and proposes a salary. This information will be used in the text of the agreement sent to the student. In addition, the manager specifies the student's email, which is used while sending the agreement for signing. Also, at this stage, we save the principal ID of the task processor in the process context. Afterwards, this is used to obtain his email address to identify the Adobe EchoSign sub-account in the name the agreement is sent.
In our process, the manager as well as the student needs to specify some information as part of the agreement. Adobe EchoSign provides an opportunity to achieve this by introducing so-called form fields.
You essentially add tags in a text document (e.g., Microsoft Word, PowerPoint, Excel, .txt or .rtf files) typing in a special string of characters. Adobe EchoSign will automatically find those tags and convert them into properly placed signature blocks, initials, check boxes, radio buttons, and form fields. Advanced optional field processing rules are taken into account as well. This conversion happens when the document is sent for signature or uploaded to the Adobe EchoSign Document Library.
The Adobe EchoSign text tags usually appear between {{ and }}.
The example below shows the text of the agreement which is used in our process:
Dear {{!StudentName}},
We are happy to invite you for a student job in our company with a salary of {{!StudentSalary}} EUR per month.
Please, give us your address and sign this contract:
Address: {{* StudentAddress_es_:signer }}
To get more information about the fields available in the Adobe EchoSign documents, please, refer to this document.
It is possible to access the services provided by Adobe EchoSign in two ways:
The latter is of interest in this blog post. As soon as a master account is created within Adobe EchoSign, a constant unique API key is assigned to it. If you already have a master account, you could find your API key here. This key is used as a parameter for almost all Adobe EchoSign Web services in order to identify the master account, on which behalf the services are executed. In the software component provided with this blog post, the API key must be specified in the web.xml as a parameter. The example software component contains a Web project development component, in which we provide a facade to the Adobe EchoSign Web service. In case you need to access functionality of Adobe EchoSign that is not covered by this facade. I would recommend to extend the facade in this case. The description of all the API functions of the Adobe EchoSign is available, here.
The Adobe EchoSign Web service used for sending a document in the example process is
send(API_KEY apiKey, SenderInfo senderInfo, DocumentCreationInfo documentCreationInfo).
For the full list of parameters that can be specified when an agreement is sent, please, see Adobe EchoSign API methods documentation.
As soon as the document is sent, Adobe EchoSign assigns a unique string document key to it (if the agreement for signing is successfully sent, the Adobe EchoSign API send returns this key as its result). The document key is further used for obtaining the status of the document as well as for getting the data filled into the agreement during sending and signing.
Adobe EchoSign supports two ways of checking the status of a document:
We have created a generic, reusable process DocumentSigningCheckProcess which implements a timeout pattern and supports both strategies for checking the status of the document. One of the branches of the process expects a callback from Adobe EchoSign. The other branch waits for a certain time period and, if no relevant message arrives during this time period, polls the Adobe EchoSign service to obtain the current status of the document. The process runs in a loop as long as the status of the document is not equal to "SIGNED".
The lightweight form of checking the status of a document is listening to the callback from Adobe EchoSign. As soon as the status of the document changes, Adobe EchoSign queries (HTTP GET or POST) the URL specified at the sending stage and adds the documentKey and status parameters to it. It can be specified that the agreement is also uploaded to this URL through a POST request.
In our process, we use an intermediate message event to listen to callbacks from EchoSign. The message trigger EchoSignCallBackMessage relates to an asynchronous call-back operation of the EchoSignCallBack Web service. The documentKey and status are the parameters of this operation. The documentKey is used in the correlation condition of the intermediate message event:
string-equal(DocumentKey_DO, CallBack/DocumentKey)
This scenario is preferred in terms of system load. However, it does not guarantee the delivery of the awaited messages (best effort delivery only). That is why it is recommended to also support the alternative way of checking the status of the document, which is not so sensitive to system failures.
A more reliable (but also performance-heavier) way to check the status of the sent document is to poll the Adobe EchoSign service.
The Adobe EchoSign API getDocumentInfo(String documentId) function is called in this case.
A list of all the agreement statuses in the Adobe EchoSign document lifecycle is available here. In our process, however, we just check whether the status of the document is equal to SIGNED>.
It is not recommended to poll the Adobe EchoSign service too often. In our processes, it is possible to configure the TimeInterval parameter to adjust the polling interval according to your needs. However, these adjustments should be done with care and the corresponding value should be adjusted to the amount of documents which you expect to be sent using the Adobe EchoSign service. For more details and suggestions on the polling strategies, please, refer to the following document.
As soon as the process gets the notification that the agreement has been signed, the process flow proceeds to the next task where the manager can view the information entered by the student in a custom SAPUI5 UI.
To retrieve the agreement details, the following Adobe EchoSign API function is called: getFormData(ApiKey, DocumentKey). The API key refers to the unique identifier of the master account within Adobe EchoSign and the document key is the unique identifier of the document of interest.
In this blog, I briefly described the online signature features provided by Adobe EchoSign and how you can integrate them into SAP NetWeaver BPM. We created an example process which explores the Adobe EchoSign API in order to send an agreement for signing, get a notification when the agreement is signed, and obtain an overview of the signed agreements. The process is modeled generically, easy to extend, and can be used as a starting point for further use cases.
The trigger of the start message event for our process relates to the StartHiringProcess operation of the StudentHiringProcess Web service. This operation requires the following parameters to be specified:
We access the functionality of Adobe EchoSign through the Web service via HTTPS. To be able to call the Web service methods from Java code, the SSL certificate of Adobe EchoSign needs to be installed in the system and imported to the key storage of the JRE. To this end, the following steps should be accomplished:
When dealing with any sort of documents within SAP NetWeaver BPM, a good practice is to store the document in SAP ECM. SAP ECM allows controlling the rights of users who try to access its documents. The software component provided here as an example contains a Web Dynpro development component, namely eswd, which provides the interface to upload and access the documents within SAP ECM. The user of SAP NetWeaver BPM is supposed to have the necessary permissions to the folder where the agreement template is stored. Note, this exemplary ECM integration is not intended to be deployed in a productive scenario since typically stricter authentication handling needs to be performed for users who are to access the documents in ECM.
As the process provided is intended for demo purposes only, there are several points that should be done for a real productive scenario.
The SCA archive with the demo process can be downloaded here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
10 | |
10 | |
7 | |
7 | |
7 | |
6 | |
6 | |
5 | |
4 |