12. Add an Update Document Properties Step

In this step, you begin building the Document Review Workflow with an Update Document Properties step. You will set the Review Status property to pending. This lets your users know you have submitted the document for review.

  1. From the Toolbox > SharePoint > Document node, add an Update Document Properties step to the empty placeholder below the Start step. Set the Review Status property to Pending Review, then map the Reviewers and Approvers references. Name the step Set Status Pending Review.
    1. If you see the Welcome to Workflow Designer animated box, click CLOSE. From the Toolbox > SharePoint > Document node, drag an Update Document Properties step into the empty placeholder below the Start step. Select the step.
      Adding an Update Document Properties Step
    2. Expand the Configuration Panel. Click the Update Document Properties Detail tab to make it active, if it is not already. Use the drop-down arrow for the Pick Document option and select the Documents to Review and Approve. Because the Approvers and Reviewers properties require values, K2 adds them under the PROPERTIES heading. You will add the status property as well, then populate all three properties.
      Update Document Properties
    3. Next, you will add the status property to the list of properties to update.

    4. Click the Add (+) icon. CHECK the box for the Review Status column. For the value, enter
      Pending Review
      Adding a PROPERTIES Column - Update Document Properties
    5. Next you will set the values for the Reviewers and the Approvers columns. You will find these values in the Context Browser.

      The Context Browser provides access to data about the current user and process, as well as functions and SmartObject data. You can use variables dragged from the Context Browser throughout the configuration of workflow steps. At runtime, K2 replaces the variables with "live" data. There are four tabs:
      • Fields: This section contains references to SharePoint lists, SmartForms, and SmartObjects. You can also create variables to hold and use data within the workflow itself, such as to store record IDs.
      • Functions: This section contains tools for transforming data. Some examples include performing calculations, formatting text, and working with date and time values.
      • SmartObjects: This section contains system and custom SmartObject references.
      • Workflow: This section contains process variables. Examples include the originator's name, email, manager, and folio.
    6. Expand the Context Browser. Expand the Documents to Review and Approve SmartObject under REFERENCES. Drag the Reviewers property into the Reviewers (properties to update) text box and drag the Approvers property into the Approvers text box. Collapse the Context Browser.
      A reference is essentially an association between a workflow instance and record(s) in some data store. For example, an item added to a SharePoint list starts a workflow. K2 creates a reference between the workflow instance and the item that was created in the SharePoint List. This allows you to easily work with the list item that started the workflow.
      Adding References for Property Values
  2. Rename the step Set Status Pending Review.
    1. Click the General Properties tab. Name the step
      Set Status Pending Review
      then collapse the Configuration Panel.
      Changing a Step Name Label
    2. Your workflow should look like the image below.
      Document Review Workflow Partial One

Review

In this step, you added an Update Document Properties step. You set the status property as pending, so your users will know the document is waiting review. You used references from the Documents to Review and Approve SmartObject for the Approvers and Reviewers values. At runtime, K2 replaces these references with the actual value entered by the workflow originator. In the next step, you will add and configure the reviewer's Task step.

Next Step: 13. Add the Review Document Task Step
Document Review and Approval