1.17.1 Setup Multi-Level Authorization

This topic describes the informtion to setup Multi-Level Authorization.

Changes in Process Flow (All Party types)

  1. In Retail and SMB process-flows, Review stage is renamed as Recommendation stage.
  2. Common Review, Recommendation and Approval UI screens and corresponding services (Backend service definition and tables) are created for all party types.
  3. New tables created for Review, Recommendation and Approval stages is as follows:
    • OBPY_TB_PRTY_REVIEW_MSTR
    • OBPY_TB_PRTY_REVIEW_DETAILS
    • OBPY_TB_PRTY_REVIEW_DTLS_LIST
  4. New Sub-workflows is created for Recommendation and Approval stages with single task in each stage.

    Download the Approval_SubWorkflow.json and Recommendation_SubWorkflow.json sub-workflow files for reference.

    Note:

    Sub-workflow definition created here has only one task/stage in the sub-workflow.
  5. Sub-workflow definition must be updated in below endpoint in each environment:

    plato-orch-service/api/metadata/workflow

    Sample CURL for the endpoint is as follows:
    curl --location --request POST 'https://ofss-mum-753.snbomprshared1.gbucdsint02bom.
    oraclevcn.com:6008/plato-orch-service/api/metadata/workflow' \
    --header 'Accept: application/json' \
    --header 'appId: platoorch' \
    --header 'Authorization: Bearer {{token}}' \
    --header 'authToken: token' \
    --header 'branchCode: 000' \
    --header 'Connection: keep-alive' \
    --header 'Content-Type: application/json' \
    --header 'userId: SASIKALA' \
    --header 'entityId: DEFAULTENTITY' \
    --data-raw '’ à Sub-workflow definition
  6. After the request is posted with 201 Created HTTP status, workflow definition can be checked in PLATOORCH schema table: META_WORKFLOW_DEF table.

    Definition of META_WORKFLOW_DEF table:

    ID –> Unique_id

    CREATED_ON -> created date timestamp

    MODIFIED_ON -> modified date timestamp

    NAME -> Process-code . For eg: REOB, CPOB, Approval_Sub_Workflow etc

    VERSION -> version number

    LATEST_VERSION -> latest version number

    JSON_DATA -> workflow definition

    The following screenshot of META_WORKFLOW_DEF table after sub-workflow is created through REST endpoint:

  7. The Changes is done in process-flow for Recommendation and Approval stages.

BEFORE:

Review task:
{
  "name": "Review",
  "taskReferenceName": "Retail_Review",
  "inputParameters": {      
    "FUNCTIONAL_CODE": "OBPY_FA_REOB_REVIW",
    "applicationDate": "${workflow.input.txnIdentification.taskCreationDate}",
    "applicationNumber": "${workflow.input.txnIdentification.moduleCode}",
    "customerNumber": "${workflow.input.transactionData.moduleData.customerId}",
    "processName": "Retail Onboarding",
    "partyId": "${workflow.input.transactionData.moduleData.customerId}",
    "productCode": "${workflow.input.transactionData.moduleData.productCode}", 
    "processRefNumber": "${workflow.input.txnIdentification.processRefNo}",
    "processCode": "REOB",
    "branch": "${workflow.input.txnIdentification.branchCode}",
    "stageId": "OBPY_FA_REOB_REVIW",
    "priority": "${workflow.input.txnIdentification.taskPrioirty}",
    "instanceId": "${workflow.input.instanceId}",   
    "stage": "Review",
    "TASK_OUTCOMES": ["PROCEED","ADDITIONAL_INFO","MANUALRETRY"]},
    "type": "WAIT",
    "startDelay": 0,
    "optional": false, 
    "asyncComplete": fals
}
Review task:
{
  "name": "Approval",
  "taskReferenceName": "Retail_Approval",
  "inputParameters": {
    "FUNCTIONAL_CODE": "OBPY_FA_REOB_APPRL",  
    "applicationDate": "${workflow.input.txnIdentification.taskCreationDate}",      
    "applicationNumber": "${workflow.input.txnIdentification.moduleCode}",      
    "customerNumber": "${workflow.input.transactionData.moduleData.customerId}",      
    "processName": "Retail Onboarding",      
    "partyId": "${workflow.input.transactionData.moduleData.customerId}",      
    "productCode": "${workflow.input.transactionData.moduleData.productCode}",      
    "processRefNo": "${workflow.input.txnIdentification.processRefNo}",      
    "processRefNumber": "${workflow.input.txnIdentification.processRefNo}",      
    "processCode": "REOB",      
    "branch": "${workflow.input.txnIdentification.branchCode}",      
    "stageId": "OBPY_FA_REOB_APPRL",      
    "priority": "${workflow.input.txnIdentification.taskPrioirty}",      
    "instanceId": "${workflow.input.instanceId}",      
    "stage": "Approval",      
    "TASK_OUTCOMES": ["PROCEED", "REJECT", "ADDITIONAL_INFO", "MANUALRETRY"]      
  },
  "type": "WAIT","startDelay": 0,
  "optional": false,
  "asyncComplete": false
}

AFTER:

Recommendation task:
{
  "name": "Recommendation_Subwf",
  "taskReferenceName": "Recommendation_Subwf",
  "inputParameters": {
    "FUNCTIONAL_CODE": "OBPY_FA_REOB_RECOM",
    "applicationDate": "${workflow.input.txnIdentification.taskCreationDate}",   
    "applicationNumber": "${workflow.input.txnIdentification.moduleCode}",   
    "customerNumber": "${workflow.input.transactionData.moduleData.customerId}",   
    "processName": "Retail Onboarding",   
    "partyId": "${workflow.input.transactionData.moduleData.customerId}",   
    "productCode": "${workflow.input.transactionData.moduleData.productCode}",   
    "processRefNumber": "${workflow.input.txnIdentification.processRefNo}",   
    "processCode": "REOB",
    "branch": "${workflow.input.txnIdentification.branchCode}",   
    "priority": "${workflow.input.txnIdentification.taskPrioirty}",   
    "moduleCode": "${workflow.input.txnIdentification.productCode}",   
    "instanceId": "${workflow.input.instanceId}",   
    "stageId": "OBPY_FA_REOB_RECOM",   
    "stage": "Recommendation"   
  },
  "type": "SUB_WORKFLOW",
  "subWorkflowParam": {
    "name": "Recommendation_Workflow",
    "version": 1
  }
}
Approval task:
{
  "name": "Approval_Subwf",
  "taskReferenceName": "Retail_Approval_Subwf",
  "inputParameters":
    {   
    "FUNCTIONAL_CODE": "OBPY_FA_REOB_APPRL",  
    "applicationDate": "${workflow.input.txnIdentification.taskCreationDate}",   
    "applicationNumber": "${workflow.input.txnIdentification.moduleCode}",   
    "customerNumber": "${workflow.input.transactionData.moduleData.customerId}",   
    "processName": "Retail Onboarding",   
    "partyId": "${workflow.input.transactionData.moduleData.customerId}",   
    "productCode": "${workflow.input.transactionData.moduleData.productCode}",   
    "processRefNo": "${workflow.input.txnIdentification.processRefNo}",   
    "processRefNumber": "${workflow.input.txnIdentification.processRefNo}",   
    "processCode": "REOB",   
    "branch": "${workflow.input.txnIdentification.branchCode}",   
    "priority": "${workflow.input.txnIdentification.taskPrioirty}",   
    "moduleCode": "${workflow.input.txnIdentification.productCode}",   
    "instanceId": "${workflow.input.instanceId}",   
    "stageId": "OBPY_FA_REOB_APPRL",   
    "stage": "Approval"   
  },
  "type": "SUB_WORKFLOW",
  "subWorkflowParam": {   
    "name": "Approval_Workflow",    
    "version": 1   
  }
}

Things to be Updated in process-flows definition

  1. When any new sub-workflow is added, to inject it into the main process-flow new task must be created as SUB-WORKFLOW and subWorkflowParam must be updated with appropriate version of sub-workflow.
  2. Latest version of the sub-workflow must be checked in META_WORKFLOW_DEF table and the same must be updated in subWorkflowParam version for any new changes in sub-workflow definition.
  3. To enable multi-level authorization (For example multiple review and approval stages) below changes must be done:
    1. Sub-workflow must be updated with multiple tasks. Based on requirement, it can be updated with parallel tasks (FORK-JOIN task) or sequential tasks (WAIT task).
    2. Main process-flow must be updated with latest version of sub-workflow.
    3. Both Sub-workflow and Main process-flow must be updated in META_WORKFLOW_DEF table through REST endpoint.