Configure workflow with multiple approval routes

You can define multiple workflow routes in Vera Workflow. You can also define unique route templates in the Vera Approval Policy for each workflow route by adding a constraint to the workflow that defines the record's current state.

For example, you can define a defect workflow with the following workflow states:

States Type Trigger Action
Draft GENERIC Route for Review Transition to Routing for Review
Routing for Review ROUTE Route Complete Transition to Accepted
Routing for Review ROUTE Route Rejected Transition to Cancelled
Routing for Review ROUTE Withdraw Transition to Draft
Cancelled GENERIC Reopen Transition to Draft
Accepted GENERIC Start Work Transition to In Progress
In Progress GENERIC Ready to Verify Transition to Fixed
In Progress GENERIC Move back to queue Transition to Accepted
Fixed GENERIC Rework Requested Transition to In Progress
Fixed GENERIC Route for Approval Routing for Approval
Routing for Approval ROUTE Route Complete Transition to Approved
Routing for Approval ROUTE Route Rejected Transition to Rejected
Routing for Approval ROUTE Withdraw Transition to Fixed
Approved COMPLETE N/A N/A
Rejected GENERIC Rework Requested Transition to In Progress
Rejected GENERIC Route for Approval Routing for Approval

Create route templates for workflow routes

You can create route templates for each workflow route in the approval policy. Add constraints to the route templates using the current state to differentiate the workflow routes.

In this example, the defect workflow has two route states:

States Type Trigger Action
Draft GENERIC Route for Review Transition to Routing for Review
Fixed GENERIC Route for Approval Routing for Approval
Rejected GENERIC Route for Approval Routing for Approval

The record is in Draft when the record is routed for review. The record is in Fixed or Rejected state when routing for approval. You can use state constraints to define the approval template for routing for review and routing for approval.

Approval template Route state Record state Constraint
Defect Review Routing for Review Draft State Is "Draft"
Defect Approval Routing for Approval Fixed or Rejected State Is One OF "Fixed, Rejected"

Approval policy examples

The following examples show how to configure the approval policy for the defect review and defect approval route templates.

Defect Review route template

This route template applies when the record is in Draft state:

Copy
{
   "Name": "Defect Review",
   "Rank": "1",
   "Record Types": [
      "qTest Defect"
   ],
   "Levels": [
      {
         "Name": "Level 1",
         "Approvers": [
            "Defect Manager"
         ]
      }
   ],
   "Constraints": [
      {
         "Type": "State Is",
         "Ignore Case": true,
         "State": "Draft"
      }
   ],
   "Prevent Author Approval": null,
   "Signatures Required": "true",
   "Allow Multi Task Approval": null
}

Defect Approval route template

This route template applies when the record is in Fixed or Rejected state:

Copy
{
   "Name": "Defect Approval",
   "Rank": "2",
   "Record Types": [
      "qTest Defect"
   ],
   "Levels": [
      {
         "Name": "Level 1",
         "Approvers": [
            "Business",
            "Technical"
         ]
      },
      {
         "Name": "Level 2",
         "Approvers": [
            "Quality"
         ]
      }
   ],
   "Constraints": [
      {
         "Type": "State Is One Of",
         "Ignore Case": true,
         "States": [
            "Fixed",
            "Rejected"
         ]      
      }
   ],
   "Prevent Author Approval": null,
   "Signatures Required": "true",
   "Allow Multi Task Approval": null
}