Workflow 2.0 Configuration doc

Migration:

In workflow 2.0 assignee is changed from a object to list of objects. To accommodate this change a new table named 'eg_wf_assignee_v2' is added which maps the processInstaceIds to assignee uuids. To deploy workflow 2.0 in environment where workflow is already running assignee column needs to be migrated to eg_wf_assignee_v2 table. The following query does this migration:

 

INSERT INTO eg_wf_assignee_v2(processinstanceid, tenantid, assignee, createdBy, lastModifiedBy, createdTime, lastModifiedTime) SELECT id, tenantid, assignee, createdBy, lastModifiedBy ,createdTime,lastModifiedTime FROM eg_wf_processinstance_v2 WHERE assignee IS NOT NULL;

 

Configurations:

Persister:

Persister config for egov-workflow-v2 is updated. Insert query for the table eg_wf_assignee_v2 is added in egov-workflow-v2-persister.yml. The latest updated config can be referred from the below link:

 

https://github.com/egovernments/configs/blob/master/egov-persister/egov-workflow-v2-persister.yml

Seacher:

The employee inbox has added column to display the locality of the applications. This mapping of the application number to locality is fetched by calling searcher API for the respective module. If new module is integrated with workflow it's searcher config should be added in the locality searcher yaml with module code as name in definition. All the search url’s role action mapping have to be added in MDMS. The format of the url is as follows:

/egov-searcher/locality/{MODULENAME}/_get

 

Sample request for TL:

curl -X POST \ https://egov-micro-dev.egovernments.org/egov-searcher/locality/TL/_get \ -H 'Content-Type: application/json' \ -H 'Postman-Token: 1c2adbb9-004f-42ce-8aab-a29a2b0df7a7' \ -H 'cache-control: no-cache' \ -d '{ "RequestInfo": { "apiId": "Rainmaker", "ver": ".01", "ts": 0, "action": "_create", "did": "1", "key": "", "msgId": "20170310130900|en_IN", "authToken": "5cb9019c-f690-4c88-850d-d15cbc2c6e54", "correlationId": "a2e4642e-8cb5-483b-8ea2-827cbe822c5f" }, "searchCriteria": { "referenceNumber":[ "PB-TL-2019-04-24-001768","PB-TL-2019-04-22-001764"] }Migration }'

 

The searcher yaml can be referred from the below link:

https://github.com/egovernments/configs/blob/master/egov-searcher/localitySearcher.yml

BusinessService:

For sending back the application to citizen the action with key 'SENDBACKTOCITIZEN' has to added. The exact key should be used. The resultant state of the action should be a new state. If pointed to existing state the action in that state will be visible to CITIZEN even when the application reaches the state without send back as the workflow is role based. To update the businessService for send back feature add the following state and action in the search response at required places and add call businessService update API it will assign uuid to the new state and action and will create the required references. We have added RESUBMIT action as optional action so that counter employee can also take action on behalf of citizen.

State json:

 

Action json:

 

Integration changes:

  • For API /egov-workflow-v2/egov-wf/process/_transition :
    The field assignee of type User in ProcessInstance object is changed to list of 'User' called assignes.
    User assignee --> List<User> assignes

  • For Citizen Sendback:
    When the action SENDBACKTOCITIZEN is called on the entity the module has to enrich the assignes with the uuids of the owners and creator of the entity

 

Workflow 2.0 UI Configuration:

Quick Actions:





Each Items in the above dropdown is displayed by adding an object in https://github.com/egovernments/egov-mdms-data/blob/master/data/pb/ACCESSCONTROL-ACTIONS-TEST/actions-test.json

 

Eg:

 {

    "id": 1928,

    "name": "rainmaker-common-tradelicence",

    "url": "quickAction",

    "displayName": "Search TL",

    "orderNumber": 2,

    "parentModule": "",

    "enabled": true,

    "serviceCode": "",

    "code": "",

    "path": "",

    "navigationURL": "tradelicence/search",

    "leftIcon": "places:business-center",

    "rightIcon": "",

    "queryParams": ""

  }



  • id , url, displayName, navigationURL

    • Mandatory properties.

  • The value of url  property should be “quickAction” as shown above.

 

Accordingly add role-actions :

https://github.com/egovernments/egov-mdms-data/blob/master/data/pb/ACCESSCONTROL-ROLEACTIONS/roleactions.json

{

    "rolecode": "TL_CEMP",

    "actionid": 1928,

    "actioncode": "",

    "tenantId": "pb"

  }

 

Sla Configuration:

Sla slots and background color of the SLA days remaining in Inbox page will be defined in mdms configuration as shown above.

For example: If maximum SLA is 30 then , it has 3 slots

  1. 30 - 30*(1/3) => 20 - 30 : will have green color defined

  2. 0 - 20 : will have ye cllow color defined

  3. <0 will have red color defined.

Colors are also configured in mdms