Step 5: Get the response for the leave request

Now we set up a task to be sent to the manager to get the task response. Follow the steps below:

1

Add the action and open the action configuration window

  1. Click the User Interaction action group in the action toolbox and find the Assign a task action.
  2. or

    Type Assign a task in the Search field at the top of the action toolbox.

Add the action to the designer canvas and do one of the following to open the Action configuration window. For more information, see Action configuration window.

  • Double-click the action.
  • Click on the action and then click Configure.

2

Configure the action and Save

  1. Add the Manager's email address in the Participant field:
    1. Click and in the Equals section that appears select Workflow Context in the first drop-down.
    2. Expand the second drop-down and select Manager email address.
    3. Click Insert.

    [%Workflow Context:NW ManagerEmailAddress%] is inserted in the Participant field.

    Note: If "Requires the User Profiles service" message is displayed, see Grant access to user profile service section in step 3 of this solution.

  2. In the Task Title field, enter the following:
  3. Leave request for {Workflow Context:Initiator display name}‍

    {Workflow Context:Initiator display name}‍ is a reference you can select from the Insert References pane. To select do the following:

    1. Click inside the field. The Insert Reference pane opens on the right.
    2. Expand the Workflow Context section and double-click on Initiator display name.

  1. Select Current Item in the Related Item field.
  2. Leave the default setting for Task Outcomes.
  3. Select the Allow LazyApproval check box. This enables task outcomes to be used in email responses. For more information about LazyApproval, see LazyApproval.
  4. Click Save to save the configuration for the action.

With the above configuration, an email notification is sent to the initiator's manager to notify the manager of the leave approval task. The manager has the option of responding to the task by email reply as LazyApproval is enabled.

For more information about the fields, buttons and settings of the Assign a task action, see Assign a task fields, buttons, and settings.

Follow along

This is what your workflow looks like at this point in the solution:

Previous step:

Step 4: Send acknowledgment email

Next step:

Step 6: Result notification email