Workflow Service
Last updated
Last updated
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Workflows are a series of steps that moves a process from one state to another by actions performed by different kind of actors - humans, machines, time-based events, etc., to achieve a goal such an onboarding an employee, or approving an application or granting a resource, among others. The egov-workflow-v2 is a workflow engine which helps in performing these operations seamlessly using a predefined configuration.
Before you proceed with the documentation, the following pre-requisites must be met:
Java 8
Kafka server is up and running.
egov-persister service is running and has workflow persister config path added in it.
PSQL server is running and the database is created to store workflow configuration and data.
Always allow anyone with a role in the workflow state machine to view the workflow instances and comment on it.
On the creation of workflow, it will appear in the inbox of all employees who have roles which can perform any state transitioning actions in this state.
Once an instance is marked to an individual employee, it will appear only in that employee's inbox. Point 1 will still hold true and all others participating in the workflow can still search it and act if they have the necessary action available to them
If the instance is marked to a person who cannot perform any state transitioning action, they can still comment/upload and mark it to anyone else.
Overall SLA : SLA for the complete processing of the application/entity.
State level SLA: SLA for a particular state in the workflow.
Environment Variables | Description |
| The default value of offset in search. |
| The default value of limit in search. |
| Maximum number of records that are returned in search response. |
| Boolean flag, if set to true default search, will return records assigned to the user only; if false. it will return all the records based on user’s role. (Default search is the search call when no query params are sent and based on the RequestInfo of the call, records are returned, it’s used to show applications in the employee inbox). |
| Boolean flag set to true if state-level workflow is required. |
Deploy latest version of egov-workflow-v2 service.
Add businessService persister yaml path in persister configuration.
Add role action mapping for BusinessService API’s.
Overwrite the egov.wf.statelevel
flag (true for state level and false for tenant level).
Create businessService (workflow configuration) according to product requirements.
Add role action mapping for /processInstance/_search API.
Add workflow persister yaml path in persister configuration.
For configuration details, refer to the links in reference docs.
The workflow configuration can be used by any module which performs a sequence of operations on an application/entity. It can be used to simulate and track processes in organisations to make it more efficient to and increase the accountability.
Role-based workflow.
Easy way of writing rule.
File movement within workflow roles.
To integrate, host of egov-workflow-v2 should be overwritten in helm chart.
/process/_search
should be added as the search endpoint for searching workflow processsInstance object. The search endpoint provides pagination with default value configurable. Pagination is controlled by passing limit
and offset
in query parameter.
/process/_transition
should be added to perform an action on an application. (It’s for internal use in modules and should not be added in role action mapping)
The workflow configuration can be fetched by calling _search API to check if data can be updated or not in the current state.
Title | Link |
Configuring Workflows For New Product/Entity | |
Setting Up Workflows | |
API Swagger Documentation | |
Migration to Workflow 2.0 |
Link | |
/businessservice/_create | |
/businessservice/_update | |
/businessservice/_search | |
/process/_transition | |
/process/_search |
Note: All the API’s are in the same postman collection, therefore, the same link is added in each row.