9. Add a Task Step to Keep or Delete the New Site

In this step, you add and configure a Task step. Here, the originator must decide if they want to keep or delete the subsite after some period of time. In the real world, this step helps keep your SharePoint environment neat and tidy by reminding you to delete any sites no longer used. Of course, you can keep sites as well if you choose. You will also add a reminder to the step. A reminder puts a time frame on the task, then performs some action if the time frame lapses and the task still remains active. The reminder sends an email to the task recipient.

  1. From the Toolbox > Basic node, add a Task step to the canvas and connect it to the Set Status Site Created step. Configure the Task step as follows:
    • Instructions: Please indicate whether to keep or delete the new SharePoint site.
    • Actions: Keep Site, Delete Site
    • Form: SmartForm > Display Site Requests
      • 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: Originator (keep the default)
    • Email Alert: Personalize the notification to include Context Browser references.
      Sample Task Notification Email
    • Properties: Rename the step: Keep or Delete Site
    1. From the Toolbox > Basic node, drag a Task step below the Set Status Site Created step. Connect the two steps.
      If you are running out of room on the design canvas, click anywhere on the canvas and drag your mouse. This moves the workflow structure. You can position it so you have more space to work with.
      Adding a Task Step to the Canvas
    2. Select the Task step, then expand the Configuration Panel. For the INSTRUCTIONS, enter
      Do you want to keep or delete this site?
      then, for the ACTIONS, click Add (+). For the first action, enter
      Keep Site
      then add a second action,
      Delete Site
      Entering Actions for a Task
    3. Click the Form tab. For the FORM TYPE, select SmartForm. For the FORM, browse to and select the Display Site Requests form.
      Your explorer structure may be different than the image below, depending on your environment and how you configured SharePoint (such as subsite and list name).
      Browsing to Select a SmartForm
    4. The Open Task on a Form wizard launches.

    5. On the REFERENCES screen, confirm that K2 discovered the Site Requests SmartObjects. Click NEXT.
    6. On the OPEN TASK screen, select Help me configure it, then click NEXT.
    7. On the WORKFLOW VIEW screen, select the Use an existing State option, then select Workflow Task. Click NEXT.
      Workflow View Screen for the Task Form Wizard
    8. On the OPEN TASK RULE ACTION screen, there are no changes. Click NEXT.
    9. On the AFTER SUBMIT ACTION screen, there are no changes. Click NEXT.
    10. The final screen is the Summary. Review the settings, then click SAVE AND FINISH. When you see the Success check, click OK.
    11. Next, you configure the recipient, or the person who is responsible for completing this task.

    12. Click the Recipients tab. Confirm the RECIPIENTS value is Originator.
      Adding a Task Recipient
    13. Click the Email Alert tab. CHECK the box to Customize Notification.
      Editing the Task Notification Email
    14. Enter the following into the Subject line:
      Site created for site request:
      then append the Fields (tab) > Site Requests (REFERENCES) > Title reference to the end of the line.
      Using a SmartObject Reference in an Email Subject Line
    15. For the message body, let the originator know their site is ready for use. Include a link to the new subsite. Then, instruct the originator to action the task by deciding to keep or delete the site.

    16. In the BODY section of the email, add your content after the Dear Participant line. For example:
      Your new site is ready for use. You can access the site using this link: [Link to Site].
      Please action this task by indicating if you want to keep or delete this site.
      then add the Site Requests > Link to Site reference in place of the [Link to Site] placeholder.
      Customizing an Email Message
    17. Click the Properties tab. Rename the step
      Keep or Delete Site.
      Changing the Task Step Name and Label
  2. Add a reminder that sends an email after 14 days. Use your own content for the email subject line and message body.
    1. Next you add a reminder to the step to remind the user to decide whether to keep the site or delete the site.
      A reminder (also known as an escalation) puts a time frame on a Task step. The reminder fires if the recipient has not responded to the task in the time allotted. Reminders can be simple such as sending reminder emails. They can be more complex such as redirecting the task to another recipient. You can configure reminders to repeat themselves. For example, a reminder can send an email every three days, three times.
      Take care when using email reminders! Reminder emails can crowd a recipient's in-box quickly. Keep in mind who you are sending the reminder to (managers? directors?). Consider sending the reminder to the workflow originator, so that they can follow up as is appropriate. Consider limiting the emails to only what is truly necessary.
      Click the Reminders tab. Under the REMINDERS heading, click the Add an Email Reminder link.
      Adding an Email Reminder
    2. Send an email reminder after 14 days. For this application, you will not repeat the escalation.
      In the Task Recipient Email section, leave the default After entry, then enter
      14
      into the Days text box. Click the EDIT EMAIL... link to open the email editor.
      Configure the Escalation
    3. Next you configure the reminder email for the task participants.

    4. By default, K2 sends the reminder email to task participants. You can choose to send a copy to the originator, along with other email recipients. By sending a copy to the originator, they can follow up with the task recipient. In this case, you are the originator and the task recipient, so one reminder email will suffice. For this application, keep the default Send email to task participants.
      Escalation Recipients
    5. For the SUBJECT line, enter
      Reminder: Respond to Site Request Task
    6. For the BODY, enter any text you like. Include some properties from the Context Browser to personalize the email. For example:
      This is a reminder that you have a task due. Please either keep or delete the following SharePoint site request:
      Site Title: [Title]
      Date Created: [Site Created On]
      Edit Email Body
    7. Collapse the Email Editor, Context Browser, and Configuration Panel.
  3. Add a Decision step and connect it to the Keep or Delete Site task step.
    1. From the Toolbox > Logic node, drag a Decision step below the Keep or Delete Site step. Connect the two steps.
      The Site Request Workflow Partial Complete
    2. Your workflow should look similar to the image below at this point.
      Site Requests Workflow - Partial

Review

In this step, you added a Task step and assigned the workflow originator as the recipient. The originator must decide whether to keep or delete the new site. You also added a reminder, which sends an email after 14 days, if the originator has not responded to the task. In the next step, you complete the Delete Site steps for the workflow.

Next Step: 10. Configure the Delete Site Outcome