12. Add an Update Document Properties Step
In this step, you begin building the Document Review Workflow with an Update Document Properties step. You set Review Status to pending. This lets your users know you have submitted the document for review.
-
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.
- 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.
- Expand the Configuration Panel. Click the Update Document Properties 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.
- Click the Add (+) icon. CHECK the box for the Review Status column. For the value, enter
Pending Review - 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.
- 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. A reference is created 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.
Next, you will add the status property to the list of properties to update.
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, the variables are replaced with "live" data. There are four tabs: - 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.
-
Rename the step Set Status Pending Review.
- Click the Properties tab. Name the step
Set Status Pending Review
then collapse the Configuration Panel.
Your workflow should look like the image below.
- Click the Properties tab. Name the step
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.