Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Every Service integrated with egov-workflow-v2 service needs to first define the workflow configuration which describes the states in the workflow, the action that can be taken on this states, who all can perform those action, SLA etc. This configuration is created using API’s and is stored in DB. The configuration can be created either state level or tenant level based on the requirements.

...

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

  2. Add Role-Action mapping for BusinessService API’s (preferably add create and update only for SUPERUSER. search can be added for CITIZEN and required employee roles like TL_CEMP etc. )

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

  4. Add businessService persister yaml path in persister configuration

Configuration Details

  1. Create the businessService JSON based on product requirement. Following is an sample json of a simple 2 step workflow where an application can be applied by citizen or counter employee and then can be either rejected or approved by the approver.

    Code Block
    {
          "tenantId": "pb",
          "businessService": "PGR",
          "business": "pgr-services",
          "businessServiceSla": 432000000,
          "states": [
            {
              "sla": null,
              "state": null,
              "applicationStatus": null,
              "docUploadRequired": false,
              "isStartState": true,
              "isTerminateState": false,
              "isStateUpdatable": true,
              "actions": [
                {
                  "action": "APPLY",
                  "nextState": "PENDINGFORASSIGNMENT",
                  "roles": [
                    "CITIZEN",
                    "COUNTER_EMPLOYEE"
                  ]
                }
              ]
            },
            {
              "sla": null,
              "state": "APPLIED",
              "applicationStatus": "APPLIED",
              "docUploadRequired": false,
              "isStartState": false,
              "isTerminateState": false,
              "isStateUpdatable": false,
              "actions": [
                {
                  "action": "APPROVE",
                  "nextState": "APPROVED",
                  "roles": [
                    "APPROVER"
                  ]
                },
                {
                  "action": "REJECT",
                  "nextState": "REJECTED",
                  "roles": [
                    "APPROVER"
                  ]
                }
              ]
            },
            {
              "sla": null,
              "state": "REJECTED",
              "applicationStatus": "REJECTED",
              "isStateUpdatable": false,
              "docUploadRequired": false,
              "isStartState": false,
              "isTerminateState": true
            },
            {
              "sla": null,
              "state": "APPROVED",
              "applicationStatus": "APPROVED",
              "isStateUpdatable": false,
              "docUploadRequired": false,
              "isStartState": false,
              "isTerminateState": true
            }
          ]
        }
  2. Once the businessService json is created add it in request body of _create API of workflow and call the API to create the workflow.

  3. To update the workflow first search the workflow object using _search API and then make changes in the businessService object and then call _update using the modified search result. (States cannot be removed using _update API as it will leave applications in that state in an invalid state. In such cases first all the applications in that state should be moved forward or backward state and then state should be disabled through DB directly)

...

Title 

Link

 Configuring Workflows For New Product/Entity

Configuring Workflows For New Product/Entity  

Workflow  Service Documentation (LINK NEEDS TO BE UPDATED)

 Business Services Workflow Service

API List

...