Overview

Workflows are a series of steps that moves a process from one state to another state by actions performed by different kind of Actors - Humans, Machines, Time based events etc. to achieve a goal like on boarding an employee, or approve an application or grant a resource etc. The egov-workflow-v2 is a workflow engine which helps in performing this operations seamlessly using a predefined configuration.

Pre-requisites

Before you proceed with the documentation, make sure the following pre-requisites are met -

Key Functionalities

Environment Variables

Description

egov.wf.default.offset

The default value of offset in search

egov.wf.default.limit

The default value of limit in search

egov.wf.max.limit

Maximum number of records that are returned in search response

egov.wf.inbox.assignedonly

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 employee inbox)

egov.wf.statelevel

Boolean flag set to true if statelevel workflow is required

Interaction Diagram:

Deployment Details

  1. Deploy latest version of egov-workflow-v2 service

  2. Add businessService persister yaml path in persister configuration

  3. Add Role-Action mapping for BusinessService API’s

  4. Overwrite the egov.wf.statelevel flag ( true for state level and false for tenant level)

  5. Create businessService (workflow configuration) according to product requirements

  6. Add Role-Action mapping for /processInstance/_search API

  7. Add workflow persister yaml path in persister configuration

Configuration Details

For Configuration details please refer to the links in Reference Docs

Integration 

Integration Scope

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.

Integration Benefits

Steps to Integration

  1. To integrate, host of egov-workflow-v2 should be overwritten in helm chart

  2. /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.

  3. /process/_transition should be added to perform an action on a application.(It’s for internal use in modules and should not be added in Role-Action mapping)

  4. The workflow configuration can be fetched by calling _search API to check if data can be updated or not in the current state

Reference Docs

Doc Links

Title 

Link

Configuring Workflows For New Product/Entity

 Configuring Workflows For New Product/Entity

 Setting Up Workflows

 Setting Up Workflows

API Swagger Documentation

Swagger Documentation

Migration to Workflow 2.0

Workflow 2.0 Configuration doc

API List

Title 

Link

 /businessservice/_create

https://www.getpostman.com/collections/8552e3de40c819e34190

 /businessservice/_update

 https://www.getpostman.com/collections/8552e3de40c819e34190

/businessservice/_search

https://www.getpostman.com/collections/8552e3de40c819e34190

/process/_transition

https://www.getpostman.com/collections/8552e3de40c819e34190

/process/_search

https://www.getpostman.com/collections/8552e3de40c819e34190

(Note: All the API’s are in the same postman collection therefore same link is added in each row)