Step 3: Assign task to Team A to review the document

After we have our states in place we can add actions to Team A state to send a task to the first reviewer in Team A.

The State machine will start to run from Team A as we set Choose the state that this state machine will start in field to Team A in Step 2: Add the review stages of this solution.

1

Add the Assign a task action

  1. Click the User Interaction category in the action toolbox, select the Assign a task action and drag it to the Team A state inside the State machine action.
  2. Do one of the following to open the Action configuration window.

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

2

Configure the Assign a task action for the first state

Configure the Assign a task action in the first state for a task to be sent to the Team A to approve or reject.

  1. Add the email address of the recipient in Team A who should receive the task when a document is uploaded to the Document library in the Participant field.
  2. Note: Participant email must be an email account in the Office 365 tenancy.

  1. Type Document approval request - Team A in the Task Title field.
  2. Type Request for document approval from Team A in the Description field.
  1. Leave the default setting for Task Outcomes.
  2. Select the Allow LazyApproval check box. This enables users with the ability to respond to a task directly with one of the provided task outcomes. For more information about LazyApproval, see LazyApproval.
  3. Expand the Initial email options section and in Email body field, type Please review the ‍{Current Item:Name}‍ document located in ‍{Workflow Context:List Name}‍ and approve or reject this task..
    Note: 

    ‍‍{Current Item:Name} and {Workflow Context:List Name}‍ are workflow references you can insert from the Insert References pane. References and variables are used throughout our workflow to act as placeholders for an actual value that will be populated when the workflow runs.

    • {Current Item:Name} refers to the name of the Document library item on which the workflow was started.
    • {Workflow Context:List Name}‍ refers to the name of the Document library on which the list workflow is built.

    For example, if a document named Review is added to the Document Approvals SharePoint Document library, the email body will be "Please review the Review document located in the Document Approvals list and approve or reject this task."

    To insert a variable from the Insert References pane:

    1. In the email body click where you want to insert the reference. The Insert Reference pane is displayed on the right.
    2. Expand the relevant section and double click on a reference to insert it.
  4. Click Save to save the configuration for the action.

For more information about the Assign a task action and how it's used, see Assign a task.

Follow along

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

 

Next step:

Step 4: Team A approves and sends the document to the next state