5. Add System Tasks Based On the Greeting Response

In this step, you complete the workflow build by adding two system tasks. The first system task updates the Response column in the Hello World list with a greeting if the recipient selects Say Hello. The second system task deletes the list item if the recipient selects Ignore.

  1. Add an Update List Item step so that it aligns with the Say Hello outcome. (You will find the step in the Toolbox > SharePoint > List Items node.) Connect the two steps. Add the Response column to the PROPERTIES you wish to update, then enter Hello,[space] for the response value.
    Configuring the Update List Item
  2. From the Context Browser > Workflow node, expand the ORIGINATOR node. Append the Display Name property to the end of the subject line.
    Workflow Properties
  3. Click the Properties tab. Change the name of the step to
    Set Response
    then collapse the Configuration Panel.
    1. First, add a step that updates the Response column in the Hello World list (if the task recipient selects "Say Hello"). Expand the Toolbox > SharePoint > List Items node. Drag an Update List Item step so that it aligns with the Say Hello outcome. (To return to the main Toolbox menu, click the Toolbox icon.)
      Adding an Update List Item Step
    2. Connect the Say Hello outcome to the Update List Item step.
      Connecting Steps
    3. Next, configure the Update List Item step so that it updates the Response column in the Hello World list. You will update the column with a greeting that contains the originator's name, which you will retrieve from the Context Browser system properties.

    4. Select the Update List Item step. Expand the Configuration Panel. Click the Update List Item tab if necessary to make it active. Use the drop-down for the Pick List Item option and select Hello World. Click the Add (+) icon under the PROPERTIES heading. CHECK the box for the Response column.
      Configuring the Update List Item
    5. Next, you configure the response value. You will enter some text, then append the originator's display name from system properties.

    6. Begin by entering
      Hello [space]
      into the Response text box. Expand the Context Browser. Click the Workflow tab to change to system properties. Expand the ORIGINATOR node.
      Workflow Properties from the Context Browser
    7. Drag the Display Name property and append it to the end of the response line. At runtime, the Display Name property is replaced with the originator's name. Collapse the Context Browser.
      Workflow Properties
    8. Click the Properties tab. Change the name of the step to
      Set Response
      then collapse the Configuration Panel.
      Changing a Step Name
  4. Add a Delete List Item step so that it aligns with the Ignore outcome. Connect the Ignore outcome to the new step.
    1. Next, add another SharePoint step that deletes the list item if the recipient chooses Ignore.
      From the Toolbox > SharePoint > List Items node, drag a Delete List Item step so that it aligns with the Ignore outcome. Connect the Ignore outcome to the new step. Select the Delete List Item step and expand the Configuration Panel.
      Adding a Delete List Item
    2. Click the Delete List Item tab to make it active (if it is not already). Use the drop-down for the Pick List Item option and select Hello World. In this step, you are indicating which list contains the item to delete. Collapse the Configuration Panel.
      Pick List Item on Delete List Item Step
    3. Because the current list item is tracked, you do not need to make any other configurations after selecting the delete method. The current list item is deleted.

  5. Add an End step. Connect the Set Response and Delete List Item steps to the End step.
    The Hello World Workflow
    1. There is one last step to add that gives your workflow a clean visual ending.
      From the Toolbox > Logic node, drag an End step below the Decision step. Connect the Set Response and Delete List Item steps to the End step.
      Adding an End Step to Complete the Workflow
    2. Your workflow should look like the image below.
      The Hello World Workflow

Review

In this step, you added two SharePoint list item steps. Each step performs a different function based on the recipient's decision. If the recipient selects the Say Hello action, the workflow updates the Response column in the Hello World list with a greeting. If the recipient selects the Ignore option, the workflow deletes the list item. While this tutorial is very simple, it does introduce you to several key concepts: adding and configuring steps in a workflow, using the Context Browser for dynamic content and using SharePoint steps to update or delete list items. In the next step, you will deploy the workflow to the server.

Next Step: 6. Deploy the Hello World Workflow