[Integration]{class="badge positive"}

Send documents for signature using workflow

[AEM Forms 6.5]{class="badge informative"}

Create an AEM workflow using sign document component. Utilize the auto-generated DoR to send for signatures using the sign component.
The video explains the various steps needed to create effective workflow to send documents for signature.

Transcript
Hi, we will now take a look at creating an AEM workflow. To create a workflow I’ve logged into my AEM forms, and going to my tools menu, click on workflow and click on models.
From here we’ll create our workflow model, provide a meaningful title, and click on done.
So now that our workflow is created, let’s open it in edit mode.
So every workflow has a flow start and some workflow components in the middle and then there’s a flow end at the end. And on the left hand side, you will see the various workflow components that are available for you in building your workflow and you can filter these workflow components by categories. For example, if you want to list the workflow components specific to forms workflow, you can filter that using the forms workflow option from the drop down list and this option here variables allows you to create variables. So the first thing that we need to do is to delete the step one here from our workflow and go back to our steps here and search for a component called set variable.
So that’s the second variable component they can drag and drop and place it between the flow start and the flow end. The next component that we’re going to add is sign document, here it’s a signed document.
Now that our workflow components are added, the next step is to configure these components and add some variables to our workflow.
So I have added three variables to our workflow. The first variable is called submitted data and it is of type XML. The second one is called signers email and it is of type string. The third one is signature status. It is of type string as well. The submitted data will hold the data from an adaptive form submission. The signers email will hold the email ID of the person to whom we need to send the document for signature and the signature status variable will be responsible for storing the status of the document that has been sent out for signature. To create a variable it’s quite easy. You click on the variable step and click on the add variable button here, give a name and select the appropriate variable type.
So once our variables are created, the next thing to do is to initialize these variables and to initialize the variable we use a set variable component that has been added to our workflow. So let’s open this set variable component and go to its mapping tab here. So the first variable that we need to initialize or map is the submitted data, and we mapped that using the relative to payload mapping mode and we specify a value here, data or xml. So this is the same value that we have specified when we configure our adaptive form to trigger an AEM workflow. The second variable that we need to initialize is the signer’s email. So remember, this is the email that will be used to send the document for signing to the recipient. So here we going to use the expat as a mapping mode, and we going to use the submitted data, which is of type xml, and inside that xml data we need to drill down to the appropriate element whose value we need to extract and store the signers email variable. So for that, we have gone into afData/afUnboundData/data/recipientEmail .
So this is the same structure that is stored in whenever an adaptive form is submitted and the submitted data is stored in an XML format. So if you go into the data or XML here you’ll see afData, afUnboundData, and data.
So now that our variables are initialized, the next thing to do is to use the sign document component. So let’s open up and configure the signed document component. So under the general tab, because we’ll have to provide an agreement name, so here we’re going to make it a literal nondisclosure agreement, specify the locale. In this case, it’s going to be English. So select the Adobe sign cloud configuration. So this is the same cloud configuration that we had created in the earlier videos. And we need to pick that from the dropdown list here, and then we need to specify the document that needs to be sent for signature. So here we need to specify related to build payload option here and specify the name in the agreement.pdf. Again, this is the same name that we had used when we configured our adaptive form to trigger an AEM workflow. And then the other options we can leave them blank and the signature process is going to be sequential because there’s only one person in this signature workflow.
The next thing is the signers. So every document that you sent will have signers and here we’re going to select the signer manually and the email here for the signer is going to be a variable and we can select the signer’s email as the variable. So what that means is whatever value is stored in the signers email variable, that value will be used to send the document for signing purposes. We are not going to select any two step verification and so that’s why we’re going to leave it as none. Then the signed document, what do you want to do with the signed document? So the signature status can be stored in the variable of types of variable called signature status, which is of type string and signed document can be stored under the payload folder, and it will be stored in a file called signed agreement.pdf. So now that our workflow is complete, make sure you click on sync and submit your adaptive form to trigger this particular workflow. -

Next steps

Create and Configure Adaptive Form

recommendation-more-help
8de24117-1378-413c-a581-01e660b7163e