Workflow

Configure workflows as per requirements

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 onboarding an employee, or approve an application or granting a resource etc. The egov-workflow-v2 is a workflow engine which helps in performing these operations seamlessly using a predefined configuration.

Pre-requisites

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

  • Java 17

  • Kafka server is up and running

  • egov-persister service is running and has a workflow yml added yo persister config path.

  • PostgreSQL server is running and a database is created to store workflow configuration and data

Key Functionalities

  • 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 that have roles that 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 although 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 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 VariablesDescription

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

The 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 the 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 a state-level workflow is required

Interaction Diagram

Deployment Details

  1. Deploy the latest version of eGov-workflow-V2 service

    1. Note: This video will give you an idea of how to deploy any Digit-service. Further you can find the latest builds for each service in out latest release document here.

  2. Add BusinessService Persister YAML path in persister configuration

  3. Add Role-Action mapping for BusinessService APIs

  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, refer to the links in Reference Docs.

Integration Details

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 too and increase accountability.

Integration Benefits

  • Role-based workflow

  • An easy way of writing rule

  • File movement within workflow roles

Integration Steps

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

  2. /process/_search should be added as the search endpoint for searching workflow process Instance objects.

  3. /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).

  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

Title

API List

Play around with the API's : DIGIT-Playground

Title

Note: All the APIs are in the same Postman collection therefore the same link is added in each row.

Last updated

All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.