17. Test the Document Review and Approval Application
In this step, you test the two workflows: Document Review Workflow and Document Approval Workflow. You upload documents to the Documents to Review and Approve library, then manually start the workflows.
To test this application, you upload documents to the SharePoint library. Consider creating at least three test documents using any editor (Word or NotePad) and save them to your desktop so that you have documents to upload.
Upload two documents and start the Document Review Workflow
-
Upload a new document to the Documents to Review and Approve library. You can use any document you like. Set the properties of the document as follows:
Property |
Value |
Notes |
Name |
Keep the default value. |
This field should already indicate the file name of the document you uploaded. |
Title |
Test One Doc Review and Approval
|
Specify a title for the document for testing purposes. |
Reviewers |
To simplify testing, enter your own account as the reviewer. |
This will be the reviewer(s) for the document. |
Review Status |
(leave blank) |
The workflow updates this field. |
Approvers |
To simplify testing, enter your own account as the approver. |
This will be the approver(s) for the document. |
Approval Status |
(leave blank) |
The workflow updates this field. |
- Upload a new document to the Documents to Review and Approve library. You can use any document you like. Set the properties of the document as follows:
Property |
Value |
Notes |
Name |
Keep the default. |
This field should be set to the file name of the document you uploaded. |
Title |
Test Two Doc Review and Approval
|
Specify a title for the document for testing purposes. |
Reviewers |
To simplify testing, enter your own account as the reviewer. |
This will be the reviewer(s) for the document. |
Review Status |
(leave blank) |
The workflow updates this field. |
Approvers |
To simplify testing, enter your own account as the approver. |
This will be the approver(s) for the document. |
Approval Status |
(leave blank) |
The workflow updates this field. |
- Check in both documents.
- Start the Document Review Workflow for both of the documents you uploaded. To access the K2 Workflows page, click the ellipses on the library toolbar and select K2 Workflows.
- Browse to the Documents to Review and Approve library and click the Upload > Files link to upload a new document.
- Upload any document you like. Edit the document properties by hovering over the row and clicking the ellipses when it appears. Click Add information now when you see the details dialog.
- Use the table below as a guide for entering the document properties. Click Save when you are ready to continue. (The order of properties on your screen may not match the table order, depending on your environment.)
Property | Value | Notes |
---|
Name |
Keep the default. |
This value is the file name of the document you uploaded. |
Title | Test One Doc Review and Approval |
Specify a title for the document for testing purposes. |
Reviewers |
To simplify testing, enter your own account as the reviewer. |
This will be the reviewer(s) for the document. In the image below, Administrator has been entered as the reviewer for the document. |
Review Status
|
(leave blank) |
The workflow updates this field. |
Approvers | To simplify testing, enter your own account as the approver. | This will be the approver(s) for the document. In the image below, Administrator has been entered as the reviewer for the document. |
Approval Status |
(leave blank) |
The workflow updates this field. |
- Upload another document and configure the properties for the second document using the table below as a guide.
Property | Value | Notes |
---|
Name | Keep the default. |
This value is the file name of the document you uploaded. |
Title | Test Two Doc Review and Approval |
Specify a title for the document for testing purposes. |
Reviewers | To simplify testing, enter your own account as the reviewer. |
This will be the reviewer(s) for the document. |
Review Status |
(leave blank) |
The workflow updates this field. |
Approvers | To simplify testing, enter your own account as the approver. |
This will be the approver(s) for the document. |
Approval Status |
(leave blank) | The workflow updates this field. |
You are now ready to start the first workflow, Document Review Workflow.
- Select the first document, then click the ellipses in the menu bar to expand the menu options. Click K2 Workflows.
- From the K2 Workflows page, select the Document Review Workflow, then click the Start button.
You are returned to the Documents to Review and Approve library. You should see that the Review Status column has been set to Pending Review (if not, wait a few seconds, then refresh the page). This is a visual indication to you that the workflow started.
- You can check the workflow progress from the K2 Workflows page (the same page you started it from). Select the first document once again and click the ellipses in the menu bar, then K2 Workflows. (You may see the K2 Workflows option in the recent section of your menu bar as well.)
- Locate the Workflow History heading. The first test workflow now appears in the Workflow Instances list. If time allows, open the View Flow report to verify that the workflow is waiting for the reviewer to action their task.
- Return to the document library and launch K2 Workflows for the second test document.
- Start the Document Review Workflow for the second document.
Review the documents
-
Open the first document reviewer’s email and locate the task notification email. (If you just added yourself alone as the reviewer, open your email client.) Open the attached document, then reply to the email with Reviewed and Accepted.
- Verify that the first document's review status is set to Reviewed and Accepted, then open the K2 Workflows page for the first document. Verify that the Document Review Workflow completed.
- Review the second document and send the document back for rework.
Resubmit the document for review
-
Still in K2 Workspace, open the Rework Document task and submit it with the Resubmitted action. (Optional: you can open the document and make changes before resubmitting the task, however, you must save the updated document in the library and check it back in so the changes are saved.)
- In K2 Workspace, click the Refresh icon to load the Rework Document task.
- Click the Rework Document task to open the form.
- Select the Resubmit action and click Submit. Click OK for the confirmation dialog, then close the browser window. If you decide to edit the attached document, be aware that you must save it in the library and re-check it in. Otherwise, the changes are not saved with the attachment.
- In the Documents to Review and Approve library, confirm the document review status for the second document now displays Rework Resubmitted.
Process the second document reviewer user task
-
Open the email client for the second document's reviewer (if it is not you - otherwise, return to your email). Review the document, then reply to the email with the Reviewed and Accepted decision.
- On the Documents to Review and Approve library, confirm the Review Status displays
Reviewed and Accepted for the second document.
- Open the email client for the second document's reviewer (if it is not you - otherwise, return to your email). Review the document, then reply to the email with the
Reviewed and Accepted
decision. Click Send. - Return to the Documents to Review and Approve library and confirm the review status now reflects Reviewed and Accepted.
Submit the first document to the Document Approval Workflow, then reject the document
-
From the K2 Workflows page, submit the first document to the Document Approval Workflow.
- Ask the document approver to review the task notification email, then reply to the email to reject the document.
- Confirm the document Approval Status displays Rejected.
- Review the workflow history for the first document. You should see two workflows listed, one for the Document Review Workflow and the other for the Document Approval Workflow. Use the View Flow reports to investigate the history for each of the workflows.
- In the Documents to Review and Approve library, open the K2 Workflows page for the first test document. (Select the document, click the ellipses, and select K2 Workflows.)
- Start the Document Approval Workflow.
- Return to the document library and confirm the document Approval Status displays Pending Approval.
- Ask the document approver (it could be you) to open their email client and review the document approval task. Reply to the email with
Rejected.
- Verify that the document’s Approval Status displays Rejected.
- Open the Approved Documents library. Confirm the first document is not displayed, because it was not approved and therefore, it was not moved to the approved library.
Submit the second document to the document approval workflow, then approve the document
-
From the K2 Workflows page, submit the second document to the Document Approval Workflow.
- Ask the document approver to approve the document either by replying to the task notification email, or from K2 Workspace.
- Confirm the first document moved to the Approved Documents library.
- In the Documents to Review and Approve library, open the K2 Workflows page for the second document.
- Start the Document Approval Workflow.
- Ask the document approver to approve the task either by replying to the email or from K2 Workspace.
- Open the Approved Documents library. Confirm K2 moved the document to the new library. (It may take a minute or so - refresh the page if necessary.)
Review
In this step, you tested two workflows that integrate with SharePoint libraries. Some of the more interesting concepts include:
- Working with documents
- Building workflows with rework loops
- Including documents as email attachments
- Starting workflows on-demand for library items (manually)
By now, you have the basics for working with K2 for SharePoint applications. In the next step, you have a brief introduction to the K2 Designer, where you will edit several views.