Workflow
Overview
The content on this page helps you set up and verify the workflow for the complaints module using Postman APIs. Workflows define how a complaint moves from one stage to another (e.g., from "Apply" to "Resolved").
A workflow defines:
All states a complaint goes through (e.g., Pending, Resolved)
Transitions between states (what happens when a user clicks Assign, Resolve, etc.)
Roles allowed to take each action
SLA (Service Level Agreement) durations for each state
Configure Workflows
Import Postman Collection
Use the provided Postman collection for workflow setup.
Make sure your Postman environment contains the following values:
baseUrl (e.g., https://dev.digit.org)
authToken (Superuser token)
tenantId (e.g., pb, uk)
Sample Workflow Payload
Below is an example workflow for the complaints module:
{
"tenantId": "pb",
"businessService": "PGR",
"business": "pgr-services",
"businessServiceSla": 432000000, // 5 days
"states": [
{
"isStartState": true,
"isTerminateState": false,
"isStateUpdatable": true,
"docUploadRequired": false,
"actions": [
{
"action": "APPLY",
"nextState": "PENDINGFORASSIGNMENT",
"roles": ["CITIZEN", "CSR"]
}
]
},
{
"state": "PENDINGFORASSIGNMENT",
"applicationStatus": "PENDINGFORASSIGNMENT",
"isStateUpdatable": false,
"actions": [
{
"action": "ASSIGN",
"nextState": "PENDINGATLME",
"roles": ["GRO", "DGRO"]
},
{
"action": "REJECT",
"nextState": "REJECTED",
"roles": ["GRO", "DGRO"]
}
]
},
{
"state": "PENDINGFORREASSIGNMENT",
"applicationStatus": "PENDINGFORREASSIGNMENT",
"isStateUpdatable": false,
"actions": [
{
"action": "REASSIGN",
"nextState": "PENDINGATLME",
"roles": ["GRO", "DGRO"]
},
{
"action": "REJECT",
"nextState": "REJECTED",
"roles": ["GRO", "DGRO"]
}
]
},
{
"state": "PENDINGATLME",
"applicationStatus": "PENDINGATLME",
"sla": 259200000, // 3 days
"actions": [
{
"action": "RESOLVE",
"nextState": "RESOLVED",
"roles": ["PGR_LME"]
},
{
"action": "REASSIGN",
"nextState": "PENDINGFORREASSIGNMENT",
"roles": ["PGR_LME"]
}
]
},
{
"state": "REJECTED",
"applicationStatus": "REJECTED",
"isTerminateState": true,
"actions": [
{
"action": "REOPEN",
"nextState": "PENDINGFORASSIGNMENT",
"roles": ["CITIZEN", "CSR", "CFC"]
},
{
"action": "RATE",
"nextState": "CLOSEDAFTERREJECTION",
"roles": ["CITIZEN", "CFC"]
}
]
},
{
"state": "RESOLVED",
"applicationStatus": "RESOLVED",
"isTerminateState": true,
"actions": [
{
"action": "REOPEN",
"nextState": "PENDINGFORASSIGNMENT",
"roles": ["CITIZEN", "CSR", "CFC"]
},
{
"action": "RATE",
"nextState": "CLOSEDAFTERRESOLUTION",
"roles": ["CITIZEN", "CFC"]
}
]
},
{
"state": "CLOSEDAFTERREJECTION",
"applicationStatus": "CLOSEDAFTERREJECTION",
"isTerminateState": true
},
{
"state": "CLOSEDAFTERRESOLUTION",
"applicationStatus": "CLOSEDAFTERRESOLUTION",
"isTerminateState": true
}
]
}
Developer Notes
SLA Values
In milliseconds (e.g., 5 days = 432000000)
businessService
Must match what’s used in PGR module backend
Roles
Must exist in MDMS role-action mapping and Keycloak
Workflow Transitions
Each action should correctly link one state to another
Summary
1️⃣
Import Postman Collection
2️⃣
Set authToken, tenantId
3️⃣
Create workflow via /businessservice/_create
4️⃣
Verify with /businessservice/_search
5️⃣
Update using /businessservice/_update if needed
Last updated
Was this helpful?