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.
Test Documents

Upload two documents and start the Document Review Workflow

  1. 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:
  2. 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.
  3. 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:
  4. 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.
  5. Check in both documents.
  6. 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.
    1. Browse to the Documents to Review and Approve library and click the Upload > Files link to upload a new document.
      Upload Files
    2. 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.
      Add Information Now
    3. 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.)
      PropertyValueNotes
      Name Keep the default. This value is the file name of the document you uploaded.
      TitleTest 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.
      ApproversTo 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.
      Test Two Document
    4. Upload another document and configure the properties for the second document using the table below as a guide.
      PropertyValueNotes
      NameKeep the default. This value is the file name of the document you uploaded.
      TitleTest Two Doc Review and Approval Specify a title for the document for testing purposes.
      ReviewersTo 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.
      ApproversTo 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.
    5. You are now ready to start the first workflow, Document Review Workflow.

    6. Select the first document, then click the ellipses in the menu bar to expand the menu options. Click K2 Workflows.
      Launch K2 Workflows
    7. From the K2 Workflows page, select the Document Review Workflow, then click the Start button.
      Start Workflow Manually
    8. 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.
      Pending Review Status

    9. 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.)
      Launch K2 Workflows
    10. 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.
      Workflow Instances
      View Flow Report
    11. Return to the document library and launch K2 Workflows for the second test document.
    12. Start the Document Review Workflow for the second document.
      Start Workflow Manually
  7. Review the documents

  8. 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.
  9. 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.
  10. Review the second document and send the document back for rework.
    If you selected another user as the reviewer for the submitted documents, that user will need to perform these steps. Otherwise, if you just selected yourself, you can action the workflows.
    1. Open the email client for the first reviewer (this might be you). Locate the email that says 'Document submitted for your review: Test One Doc Review and Approval'. Open the email and notice your first document is attached. You can open the document and review it. Reply to the email and enter
      Reviewed and Accepted
      as the message body. Click Send.
      Reply to Email
    2. Return to the Documents to Review and Approve library, and verify that the first document’s status displays Reviewed and Accepted.
      Updated Status
    3. Navigate to the K2 Workflows page for the first document. The workflow history now displays Completed.
      Workflow History
    4. Return to your email. Confirm you have a notification saying the reviewers accepted the document. (You may need to refresh your email.) You have now completed testing for the first document.
      Final Email
    5. Next, you take action for the second test document. Open K2 Workspace. Click Inbox to view the tasks assigned to you.
      If you do not know how to access K2 Workspace, see Accessing K2 Sites.
      Open Worklist Item Form
    6. On the All Tasks screen, click the Review Document task.
      All Tasks Screen
    7. The Display Document form opens, along with the K2-generated Workflow view. K2 adds this view when using the form to action a task. Notice you cannot change the values on the display form. (Recall that you configured the Review Document step to use the display form and not the edit form.) Select the Rework Required action and Submit the form. Click OK when you see the success dialog.
      Submit Response
    8. Return to the Documents to Review and Approve list and confirm the second document status reflects Rework Required.
      Document Review List
  11. Resubmit the document for review

  12. 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.)
    1. In K2 Workspace, click the Refresh icon to load the Rework Document task.
      Refresh Task List
    2. Click the Rework Document task to open the form.
    3. 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.
      Resubmit for Review
    4. In the Documents to Review and Approve library, confirm the document review status for the second document now displays Rework Resubmitted.
      Document Review Status
  13. Process the second document reviewer user task

  14. 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.
  15. On the Documents to Review and Approve library, confirm the Review Status displays Reviewed and Accepted for the second document.
    1. 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.
    2. Return to the Documents to Review and Approve library and confirm the review status now reflects Reviewed and Accepted.
  16. Submit the first document to the Document Approval Workflow, then reject the document

  17. From the K2 Workflows page, submit the first document to the Document Approval Workflow.
  18. Ask the document approver to review the task notification email, then reply to the email to reject the document.
  19. Confirm the document Approval Status displays Rejected.
  20. 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.
    1. 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.)
    2. Start the Document Approval Workflow.
      Manually Start Workflow
    3. Return to the document library and confirm the document Approval Status displays Pending Approval.
      Document Status
    4. 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.
      SmartActions Reply
    5. Verify that the document’s Approval Status displays Rejected.
      Document Status
    6. 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.
  21. Submit the second document to the document approval workflow, then approve the document

  22. From the K2 Workflows page, submit the second document to the Document Approval Workflow.
  23. Ask the document approver to approve the document either by replying to the task notification email, or from K2 Workspace.
  24. Confirm the first document moved to the Approved Documents library.
    1. In the Documents to Review and Approve library, open the K2 Workflows page for the second document.
    2. Start the Document Approval Workflow.
      Workflow Manually Started
    3. Ask the document approver to approve the task either by replying to the email or from K2 Workspace.
    4. 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.)
      Approved Documents Library
Review

In this step, you tested two workflows that integrate with SharePoint libraries. Some of the more interesting concepts include:

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.

Next Step: 18. Edit a SmartForm and Remove Unnecessary Controls
Document Review and Approval