13. Add the Review Document Task Step

In this step, you add and configure the Task step for the assigned reviewers. This step is similar to the approval workflow task step. You select one or more reviewers when you complete the review request form. You will configure outcome rules as a consensus as well. This means all the reviewers must accept the document as approved or the workflow follows the rejected outcome. The Task step has two actions: Reviewed and Accepted and Rework Required.

  1. Add a Task step to the workflow with the following configuration:
    • Instructions: Please review the attached document and indicate your decision.
    • Actions: Reviewed and Accepted, Rework Required
    • Form: SmartForm > Display Document
      • References: Keep default settings
      • Open Task: Help me configure it
      • Workflow View: Create a new State: Workflow Task
      • Open Task Rule Action: Keep default settings
      • After submit: Keep default settings
      • Summary: Save and Finish
    • Recipients: Context Browser > Documents to Review and Approve REFERENCES > Reviewers
      • Use the drop-down for the Originator bar, then select Type/Construct my own. Delete the Originator's FQN value, then add the Reviewers reference.
      Use a Reference for a Recipient
    • Email Alert: Personalize the notification to include Context Browser references. Use the Document (File) reference for the email attachment.
      Adding Context Browser References
      Adding Context Browser References
      Adding Context Browser References
    • Results/Voting: Change the rule to Consensus, with Rework Required being the followed outcome if there is not a consensus.
      Adding Context Browser References
    • Properties: Rename the step:
      Review Document
    1. First, add the Task step and connect it to the Update Document Properties step. From the Toolbox > Basic node, drag a Task step below the Set Status Pending Review step.
      When adding a step to the workflow design canvas, you may see a red warning badge. This badge simply indicates the step has required configurations. When you expand the Configuration Panel, the required configuration is also flagged. (Note that the steps below may be different from your screen.)

      Red Error Badge

      Adding a Task Step
    2. Next, you will connect the two steps.

    3. Hover over the bottom border of the Set Status Pending Review step to expose a handle, then drag the handle down into the Task step. Click the design canvas to set the outcome line.
      Connecting Steps
    4. Select the Task step, then expand the Configuration Panel. Click the Task tab to make it active, if it is not already. For the INSTRUCTIONS, enter
      Please review the attached document and indicate your decision.
      Task Step Instructions
    5. Click the Add (+) icon under the ACTIONS heading to add the task actions:
      Reviewed and Accepted
      Rework Required
    6. Click the Form tab. You will select the display form for the task steps, as you do not want the recipient to make changes to the original form entries.
      Forms Tab
    7. For the FORM TYPE, select SmartForm. For the FORM, browse to and select the Display Document form. Your menu structure may be different than the image below, depending on subsites and other naming conventions. Click OK.
      Selecting a Task SmartForm
    8. The Open Task on a Form wizard launches.

    9. On the REFERENCES screen, notice that K2 has found the Documents to Review and Approve SmartObject reference. Click NEXT.
      Open Task on a Form - References
    10. On the OPEN TASK screen, select Help me configure it, then click NEXT.
      Open Task on a Form - Open Task
    11. On the WORKFLOW VIEW screen, confirm the option to Create a new State has the Workflow Task state. Click NEXT.
      Open Task on a Form - Workflow View
    12. There are no changes to the OPEN TASK RULE ACTION screen, click NEXT.
    13. There are no changes to the AFTER SUBMIT ACTION screen, click NEXT.
    14. On the Summary screen, review the settings, then click SAVE AND FINISH. When you see the green success check, click OK to close the wizard.
      Open Task on a Form - Summary
    15. Click the Recipients tab.
    16. The default recipient is Originator. You want the Reviewers property from the Documents to Review and Approve reference. At runtime, this property contains the value(s) entered by the workflow originator.

    17. Click the Originator bar. From the drop-down options, select Type/Construct my own.
      Type/Construction my own Recipient Value
    18. The recipient value changes to Originator's FQN. Expand the Context Browser. Expand the Documents to Review and Approve SmartObject under REFERENCES. Drag the Reviewers property into the Originator's FQN bar. This adds the Reviewers property to the recipient bar.
      Adding Recipients
    19. Click once on Originator's FQN, then click <DELETE> on your keyboard. This removes the value, leaving the Reviewers property as the sole recipient entry.
      Recipients - Reviewers Property
    20. Next, you will configure the task notification email using properties once again from the Context Browser.

    21. Click the Email Alert tab. CHECK the Customize Notification option. Notice that the SUBJECT and BODY fields are now editable. For the SUBJECT, enter
      Document submitted for your review:
      then drag the Title from the Documents to Review and Approve reference and append it at the end of the line.
      Adding Context Browser Properties to an Email
    22. Next, you will attach your document to the email.

    23. Scroll down to the bottom of the notification screen. You will see the ATTACHMENT box. Click the Add Attachment link. Drag the Document (File) reference into the ATTACHMENT box. You are adding a reference to the current document as an attachment to this email. At runtime, the current document is attached to the email.
      Add the Document Attachment
    24. Add additional content to the email BODY so the recipient knows what to do. For example:
      A document is waiting your review. Please review the attached document and indicate your review decision in one of the following ways:
      Customize Email Body
    25. Email variables explained:

      Worklist Item Link: This link opens the worklist item (user task). You can action (make a decision on) the item from the worklist item screen.

      Configured Actions: At runtime, K2 replaces this variable with the actions you configured for the task. For example, approved or rejected. You can reply to the email and enter one of the actions in the reply message body. K2 will read the action and move the workflow along according to the outcome rules. K2 refers to this technology as SmartActions.

      Standard Actions: Examples include: Redirect, Delegate and Sleep. Redirect sends the user task to another user and removes the task from the current user's worklist. Delegate sends the task to another user, but keeps the task open for the current user as well. Sleep pauses the worklist item. This is helpful if the user is going to be unable to action the task in the time allotted (if you specified a time allotment).

      Next you will configure the outcome rules for the Review Document step. (You will name the step in a few minutes.) All reviewers must accept the document to send the workflow along the Reviewed and Accepted outcome. If one or more approvers reworks the document, the workflow follows the Rework Required outcome.

    26. Click the Results/Voting tab. Select the Consensus option under the TASK RESULT RULE, then change the non-consensus value to Rework Required. This is saying that all recipients must accept the document, or it is sent back for rework.
      Setting Consensus
    27. Click the Properties tab. The last configuration is to rename the step. Change the name to
      Review Document
      then collapse the Configuration Panel.
      Setting a Step Name
  2. Add a Decision step and connect it to the Review Document step.
    1. From the Toolbox > Logic node, drag a Decision step below the Review Document step. Connect the two steps. Notice that the actions configured in the task step are now generated as outcomes from the decision step.
      Adding a Decision Step
    2. Your workflow should look like the image below at this point.
      Document Approval Workflow Partial One

Review

In this step, you added a Task step for the document review step. You mapped the Reviewers reference for the task recipients. You added two possible actions: Reviewed and Accepted and Rework Required. You configured the outcome rules for consensus, meaning all reviewers must accept the document for the workflow to follow the accepted outcome. If one or more approvers reworks the document, the workflow follows the rework outcome. You also learned how to add a document as an attachment to an email and how to personalize the email with references from the Context Browser. In the next step, you will complete the rework outcome steps.

Next Step: 14. Complete the Rework Outcome Steps
Document Review and Approval