Completing Tasks

Goal

Complete the Fill Amount task.

The workflow looks like this:

When the workflow started, a verification was performed that determined no amount was given in the contract properties. Therefore, a task has been assigned to the workflow initiator (Alicia Fraser in this case) so that she may fill it in before having it reviewed by a manager.

Procedure

Create a file called handleUserWorkflowTasks.js with the following content. While completing a task, you can send the information filled in by a user (Alicia Fraser in this case). Here, send the contract amount.

Ending the Workflow

Goal

Review and validate the contract.

The contract should now be reviewed by a manager:

This time a task has been assigned to the managers group (represented by Sarah Connor). Validating the contract will trigger some logic and end the workflow, rejecting it will ask the workflow initiator to update it.

Procedure

Create a file called handleManagerWorkflowTasks.js with the following content. Log in as Sarah Connor this time since she is a manager, and as such the one that needs to complete this task.