Adding CoSign Digital Signatures to Nintex Workflows

Adding CoSign Digital Signatures
to Nintex Workflows
ARX | 855 Folsom St. Suite 939, San Francisco, CA 94107 | Tel. (415) 839-8161 | www.arx.com | [email protected]
2
Introduction
It’s easy to add CoSign digital signatures to Nintex Workflows. This example demonstrates how to create a
Nintex Workflow that:



Starts automatically when a new file is added to a document library
Creates a Signature Task for the initiator’s manager
After the manager signs or declines to sign the document, the initiator is notified
This example is based on a similar example from Nintex, Nintex Workflow 2013 - Simple Approval
Workflow.
Pre-requisites
Please ask your system administrator to install the following software on your SharePoint on-prem
system:



Nintex Workflow
CoSign Connector for Nintex
CoSign Connector for SharePoint Server
The CoSign Client for Windows is included with the CoSIgn Connector for SharePoint Server. The CoSign
Client should be configured to work with a CoSign Central server or with CoSign Cloud.
A signer account is needed on the CoSign server. You can receive a free developer account via
developer.arx.com
Add CoSign at the SharePoint Site level
For each SharePoint site that will use CoSign, a one-time process is needed to add CoSign services to the
site.
1. Navigate to the site home
2. Using the gear icon, choose Site Settings
ARX | 855 Folsom St. Suite 939, San Francisco, CA 94107 | Tel. (415) 839-8161 | www.arx.com | [email protected]
3
3. In the Site Actions section, click Manage Site Features
4. Activate the CoSign Connector for both document libraries and lists:
Create and Configure a Document Library
For our example, create a document library Simple Approval
Configure CoSign for the document library
By default, the CoSign Connector only enables documents that include a preset signing field to be signed.
This behavior can be changed using a signing profile for a document type, or by changing the default for a
library.
1.
2.
3.
4.
5.
6.
Go to the your new Simple Approval document library
Library ribbon, Settings section, click Library Settings
In the General Settings section, click CoSign digital signature settings
In the Content Types section, click Document
In the Settings section, click Configuration settings
Enable user-generated signature fields:
7. Enable users to create signature fields and sign them:
ARX | 855 Folsom St. Suite 939, San Francisco, CA 94107 | Tel. (415) 839-8161 | www.arx.com | [email protected]
4
8. Configure signature field settings:
9. Use the Add button to add pre-defined signing reasons “Agreed” and “Approved:”
10. Use the Save button to save your changes.
Add CoSign meta-data columns to the document library
Meta-data columns related to documents’ signing status (Last signer, time signed, etc) can be added to
document libraries and lists. The meta-data columns will be managed and updated by the CoSign
Connector.
1.
2.
3.
4.
Go to the your new Simple Approval document library
Library ribbon, Settings section, click Library Settings
In the Columns section, click Add from existing site columns
Select ARX CoSign Signature Columns from the menu
ARX | 855 Folsom St. Suite 939, San Francisco, CA 94107 | Tel. (415) 839-8161 | www.arx.com | [email protected]
5
5. Add signature meta-data columns as shown below. For this example, we’re adding the name of
the last signer and when the document was last signed. SharePoint can also be configured to
include some or all of the CoSign meta-data columns with new libraries by default.
6. Click the OK button to save your changes.
Add columns to the document library for signature status
The CoSign meta-data column Last Signature Reason shows the signing reason provided by the last signer.
For our example, we also want to show the reason given when a signing request is declined (rejected).
We also want a simple status column that will show the document’s signing status—requested, signed, or
declined. We’ll use workflow to manage this column.
1. Create a column “Signing status” with type Choice. Choice values: {New, Requested, Signed,
Declined}. Default value: New
2. Create a column “Reason” with type Single line of text
Prepare Nintex
Your administrator installs Nintex Workflow and CoSign Connector for Nintex Workflow. In addition, for
each SharePoint Site, it is recommended to add CoSign columns to the Workflow Tasks list.
Add CoSign columns to the Workflow Tasks list
By default, Nintex stores status and state for workflow instances in the Workflow Tasks list. The CoSign
meta-data columns are used to receive information from CoSign tasks.
ARX | 855 Folsom St. Suite 939, San Francisco, CA 94107 | Tel. (415) 839-8161 | www.arx.com | [email protected]
6
1. Go to your Workflow Tasks document library:
Use your site’s Gear icon and choose Site contents. Then choose the Workflow Tasks list.
Tip: if the list doesn’t exist yet, start a Nintex Workflow. Nintex will then create the Workflow
Tasks list.
2. List ribbon, Settings section, click List Settings
3. In the Columns section, click Add from existing site columns
4. Select ARX CoSign Signature Task Columns from the menu
5. Add all of the signature task meta-data columns as shown below.
6. Click the OK button to save your changes.
ARX | 855 Folsom St. Suite 939, San Francisco, CA 94107 | Tel. (415) 839-8161 | www.arx.com | [email protected]
7
Create the Approval Workflow
1. Open the Simple Approval document library
2. Library ribbon, Settings section, Workflow settings menu: choose Create a Workflow in Nintex
Workflow
3. The wizard Select a Workflow Template may be shown with sample workflow templates. Select
the Blank template.
We’ll start with a blank canvas and build the workflow from there.
Workflow settings
Set the workflow’s name and startup settings.
Nintex Workflow ribbon, Settings section, Workflow Settings menu, Workflow Settings item:
1. Title: CoSign digital signatures
2. Start when items are created: Yes
3. Save your changes
ARX | 855 Folsom St. Suite 939, San Francisco, CA 94107 | Tel. (415) 839-8161 | www.arx.com | [email protected]
8
Add workflow variables
The workflow will take different actions depending on whether the manager signs (and approves) the
signing request, or declines the request. We add several variables:




TaskIDsCollection of type Collection
taskID of type Single line of text
signResult of type Single line of text
signerComments of type Single line of text
All of the variables are configured the same:


Do not show them on the Start form
No default value
ARX | 855 Folsom St. Suite 939, San Francisco, CA 94107 | Tel. (415) 839-8161 | www.arx.com | [email protected]
9
Add the variables using the Nintex Workflow ribbon, Settings section, Workflow Settings menu, Variables
item:
Result:
Close the Workflow Variable dialog.
Building the workflow
Log the workflow’s startup
As a good practice, we start by logging the workflow’s startup:
1. At the beginning of the workflow select Insert action / Operations / Log in history list
2. Set the log value to be “*** Starting workflow” and update the icon’s label to “Log startup”
ARX | 855 Folsom St. Suite 939, San Francisco, CA 94107 | Tel. (415) 839-8161 | www.arx.com | [email protected]
10
Set the Status column
1. Add a Set field value action to the workflow:
Insert action / Libraries and Lists / Set field value
2. Set Signing Status to Equal Value Requested
3. Label the action “Set Signing status to Requested”
Add CoSign digital signature task
The Nintex Assign to-do task is also used for regular CoSign digital signature tasks. A different Nintex task
is used for Auto-signing.
1. Add an Assign to-do task to the workflow:
Insert action / User interaction / Assign to-do task
Configure the task’s Action
1. Assignees: Use the notebook icon on the right side of the form to open the Select People and
Groups dialog:
2. Open the Lookup section of the dialog
3. Select Manager
4. Click Add
ARX | 855 Folsom St. Suite 939, San Francisco, CA 94107 | Tel. (415) 839-8161 | www.arx.com | [email protected]
11
5. Click OK to close the dialog
6. For the Task description field, use the Insert Reference dialog to create
Initiator's Display Name requests approval for Item Display Name
7. For the Content type field, select Use existing. Choose CoSign Workflow Signature Task.
8. For the Store task IDs in field, select TaskIDsCollection. The completed Action screen:
Configure the task’s Task Notification
1. Set the From field to be Initiator. Initiator is in the Select People and Groups dialog’s Lookup
section.
ARX | 855 Folsom St. Suite 939, San Francisco, CA 94107 | Tel. (415) 839-8161 | www.arx.com | [email protected]
12
2. Set the Subject field to
Please sign Item Display Name
3. Update the notification email text. Delete the default text.
4. Use the Insert ribbon to add a Link. Set the link’s address and display text:
ARX | 855 Folsom St. Suite 939, San Francisco, CA 94107 | Tel. (415) 839-8161 | www.arx.com | [email protected]
13
5. The completed Task Notification window:
Configure the task’s label
Use the Labels tab to title the task “CoSign signature task”
ARX | 855 Folsom St. Suite 939, San Francisco, CA 94107 | Tel. (415) 839-8161 | www.arx.com | [email protected]
14
Retrieve the results and signer comments
The signature task will complete with the document either signed or the request rejected. We need to
retrieve the signing task’s outcome and the signer’s comments so they can be used by the workflow.
To do so, we loop through the TaskIDsCollection to find the outcome from our signing task.
Add a For each loop
1.
2.
3.
4.
Insert Action / logic and flow / For each
Open the Configure dialog
Set the Target collection parameter to TaskIDsCollection
Set the Store result in field to the taskId variable.
5. Set its label to “For each taskID”
Set signResult
Add a Set variable action and configure it:
1.
2.
3.
4.
5.
Insert Action / Operations / Set variable
Open the Configure dialog
Set field: signResult
Equals field: List lookup.
In the Lookup details section, set the following parameters:
Source: Workflow Tasks
Field: Signature Task Outcome
When: ID
Equals: Workflow Data  taskID
ARX | 855 Folsom St. Suite 939, San Francisco, CA 94107 | Tel. (415) 839-8161 | www.arx.com | [email protected]
15
6. Set the label to be “Set signResult”
7. The signResult variable will be set with the task’s outcome. It will be set to “Signed” if the
document was signed.
Set signerComments
Create a second Set variable action to store the signer’s comment. The comment will be either the signing
or rejection reason, according to the outcome of the signature task.
ARX | 855 Folsom St. Suite 939, San Francisco, CA 94107 | Tel. (415) 839-8161 | www.arx.com | [email protected]
16
This action is the same as the prior action, except the Set field is set to signerComments and the Lookup
Field is set to Signer Comments:
Document signed? Branch the workflow
We want two branches for the next and final part of the workflow, one for documents that have been
signed, the second for requests that were declined.
1. After the For each (not within it), add a Set a condition action:
Insert Action / Logic and flow / Set a condition
2. Open its Configure Action dialog:
ARX | 855 Folsom St. Suite 939, San Francisco, CA 94107 | Tel. (415) 839-8161 | www.arx.com | [email protected]
17
3. Set the dialog as shown:
4. Set the action’s title to “Document signed?”
Document signed actions
On the right side (the “Yes” branch) of the condition, we’ll store the signing task’s outcome and notify the
initiator.
Set the Signing status column
1. Add a Set field value action from the Libraries and lists category
2. Set Signing status equals Value Signed
5. Set the label to “Set Signing status to Signed”
Set the Reason column
1. Add a Set field value action from the Libraries and lists category
2. Set Reason equals Workflow Data signerComments
ARX | 855 Folsom St. Suite 939, San Francisco, CA 94107 | Tel. (415) 839-8161 | www.arx.com | [email protected]
18
3. Set the label to “Set Reason”
Send notification to the initiator
We’ll let the initiator know that the document was signed. We’ll include a link to the document.
1. Add a Send notification action:
Insert Action / User interaction / Send notification
2. To: Initiator (From the Lookup section of the Select People and Groups dialog)
3. Subject:
Last Signer Name signed Context Item Display Name
Notes: Last Signer name is from the Item Properties tab.
4. Fill in the notification’s body. The Insert tab / Link command can be used to add a link to the body
of the notification. Tip: you need to explicitly delete “Link” from the display field.
ARX | 855 Folsom St. Suite 939, San Francisco, CA 94107 | Tel. (415) 839-8161 | www.arx.com | [email protected]
19
5. Label the Action “Notify initiator”
Using Last Signer Name
Why use Last Signer name rather than the Manager’s name? The initiator’s manager may have delegated
the signing task to someone else. Using Last Signer name ensures that we are showing who actually
signed the document.
Signing request was declined actions
Copy / Paste the three actions from the Yes side of the Document signed? condition to the No side. Then
update them:
1. Set the Signing status to Declined
2. No changes are needed for the Set Reason action.
ARX | 855 Folsom St. Suite 939, San Francisco, CA 94107 | Tel. (415) 839-8161 | www.arx.com | [email protected]
20
3. Update the Notify initiator action:
Testing the workflow
Upload a pdf to the document library. When the new item’s edit form is shown, you can cancel it since
there is no need to change any of the document’s meta-data.
Refreshing the document library screen will show the workflow status as In Progress:
ARX | 855 Folsom St. Suite 939, San Francisco, CA 94107 | Tel. (415) 839-8161 | www.arx.com | [email protected]
21
The initiator’s manager (as set in Active Directory) will be tasked to digitally sign the document. You can
see the workflow’s task and its log entries by clicking the In Progress link:
After the task assignee signs the document or rejects the signing request, the workflow will complete.
ARX | 855 Folsom St. Suite 939, San Francisco, CA 94107 | Tel. (415) 839-8161 | www.arx.com | [email protected]
22
Appendix
This page and the next shows the complete workflow diagram
ARX | 855 Folsom St. Suite 939, San Francisco, CA 94107 | Tel. (415) 839-8161 | www.arx.com | [email protected]
23
Comments?
If you have any comments or update suggestions about this document, please let us know!
Use the contact form in the Developer Portal.
ARX | 855 Folsom St. Suite 939, San Francisco, CA 94107 | Tel. (415) 839-8161 | www.arx.com | [email protected]