Email Signers Template

This workflow alerts the people who approved a document when the document has changed.

When a document changes, each person listed in the field named, “Workflow Templates: Signatures” is emailed, and the “Workflow Templates: Signatures” field is cleared. The document is moved to the Proposed Plans folder, and the workflow waits until the document has the same number of signatures as it did before it was changed. Then, the document is moved to the Approved Plans folder.

Many advanced Workflow features are included in this workflow, such as assigning Tokens values, editing tokens, iterating through each value in a multi-value field, and using the iteration count feature of the Repeat activity.

How it works

  1. A Retrieve Field Values activity retrieves all the values from the field named, “Workflow Templates: Signatures.” Besides needing the field values to send emails, the workflow also needs to know how many values are in the field.
  2. The Assign Token Values activity edits the “Workflow Templates: Signatures” token by applying a series of Token Functions to the token to get the number of signers. (Functions can be accessed by right-clicking a token and selecting Token Editor.) First, duplicate and empty fields are removed from the multi-value Signature token. Then, the function replaces the token with the number of values in the token instead of the values themselves.
  3. After this initial information about the “Workflow Templates: Signatures” field is retrieved, a For Each Value activity goes through each value in the original token (not the edited token), finds the related user based on their name, and sends them an email alerting them the document has changed. The email includes a list of all the people who put their name in the “Workflow Templates: Signatures” field. Notice how the “Workflow Templates: Signatures” token has a different syntax in the email as compared to in the For Each Value activity’s properties box. The syntax indicates that the token is edited so it returns each value on a separate line. You can edit a token by right-clicking it and selecting Token Editor.)
    1. Edit the “Workflow Templates: Signatures” field so it lists the names of actual users in your repository. Enable the Find User and Email activities to automatically send each user an email notification when the document changes.
  4. Note: To automatically send emails to users, you must have an Email Server Properties configured in Workflow. Also, your users must have email addresses associated with them either through their Windows or LDAP account (if you are using this type of accounts) or through their Laserfiche Defining Trustee Information. Ensure the Find User activity is searching in the correct trustee directory.

  5. The next stage in the workflow is a Business Process Step activity. This activity provides instructions for how each person should re-sign the document. Inside the step activity:
    1. A Route Entry to Folder activity sends the document to the Documents to Process\Proposed Plans folder.
    2. A Repeat activity ensures that the document gets the same number of signatures as it had before. Inside the Repeat activity:
      1. A Wait for Entry Change activity waits until the “Workflow Templates: Signatures” field changes.
      2. Then the Retrieve Field Values 2 activity retrieves the new values in the “Workflow Templates: Signatures” field.
      3. Using the same editing functions as used to get the initial number of signatures in the field, the Assign Token Values 2 activity creates a token that has the current number of signatures in the field.
    3. The Repeat activity then checks to see if the current number of signatures %(Current Signature Count) equals the original number of signatures %(Original Signature Count). If it does, a Move Entry activity moves it to the Storage\Approved Plans folder. If it does not, the activities inside the Repeat activity run again.

To run this workflow template in the provided test environment

  1. Ensure the workflow’s starting rule is enabled in the Workflow Rule Manager.
  2. In the Laserfiche Windows or web client, create an annotation on (or change the electronic document of) the Plan 1 document in the Workflow Templates - Test Entries\Storage\Approved Plans folder. The document must have at least one value in its “Workflow Templates: Signatures” field. Note that Sue, Bob, and Frank have signed Plan 1.
  3. Find the document in the \Workflow Templates - Test Entries\Documents to Process\Proposed Plans folder, add values to the field named, “Workflow Templates: Signature,” and save the document. Once the document has the same number of signatures as it did originally (Plan 1 had 3 signatures), it will be routed to the \Workflow Templates - Test Entries\Storage\Approved Plans folder.

Alternatively, you can test the workflow (bypassing the starting rule) with the Run Current Workflow option in the Workflow Designer. You can test this document on the Plan 2 document the Workflow Templates - Test Entries\Storage\Approved Plans folder.

Ideas to expand this workflow

With minimal changes, this workflow can be configured to work with digital signatures.

  1. Instead of using the Retrieve Field Values activity, use the Get Document Signatures activity.
  2. Delete the Assign Token Values activity. The Get Document Signatures activity automatically provides a Signature Count token.
  3. Configure the For Each Value activity to run on the Get Document Signatures Signer token.
  4. Inside the Repeat activity, delete the Retrieve Field Values 2 and Assign Token Values 2 activities, and replace them with another Get Document Signatures activity.
  5. In the repeat condition, compare the Signature Count token from the second Get Document Signatures activity to the Signature Count token from the first activity.

Remember to republish the workflow once you made all desired changes.