Previous Next JavaScript must be enabled to correctly display this content

## 3 Job Definition Naming Convention

This topic describes about the naming convention to be followed when a custom job is introduced as a task into EOD process.

Milestone task name and taskReferenceName must be same and prefixed with “MS-“. Ex: MS- EOFIMilestone

Milestone

EOD run pause at each Milestone shall be resumed by clicking Proceed button manually.

Refer Section 2.5 Branch EOD in Oracle Banking Common Core User Guide.

Figure 3-1 Sample template for Milestone stage

Description of "Figure 3-1 Sample template for Milestone stage"

Steps to integrate Custom Jobs

1. If the custom job uses Oracle Banking Microservices Architecture Batch service, then use the below template to include the job as a task in EOD Flow definition.

       {
        "type":"HTTP",
        "name":"<MilestoneCode.JobName>",
        "taskReferenceName":"<MilestoneCode.JobName>",
        "inputParameters":
         {
         "http_request":
          {
          "connectionTimeOut":"0",
          "readTimeOut":"0",
          "vipAddress":"PLATO-BATCH-SERVER",
          "uri":"/plato-batch-server/jobLauncher/launch/",
          "method":"POST",
          "headers":
           {
           "appId":"${workflow.input.appId}",
           "branchCode":"${workflow.input.branchCode}",
           "userId":"${workflow.input.userId}"
          },
          "body":
          {
          "jobName":"<JobName>",
          "jobParameters":
           [
            {
            "key":"appId",
            "value":"<Application ID of microservice>"
            },
            {
            "key":"microServiceName",
            "value":"<Microservice name>"
            },
            {
            "key":"contextRoot",
            "value":"<Context root of microservice>"
            },
            {
            "key":"workflowId",
            "value":"${workflow.workflowId}"
            },
            {
            "key":"referenceTaskName",
            "value":"<MilestoneCode.JobName>"
            },
            {
            "key":"userId",
            "value":"${workflow.input.userId}"
            },
            {
            "key":"branchCode",
            "value":"${workflow.input.branchCode}"
            },
            {
            "key":"isCallback",
            "value":"Y"
            },
            {
            "key":"callbackType",
            "value":"PLATOORCH"
            }
           ]
          }
         },
         "asyncComplete":true
        },
        "startDelay":0,
        "optional":false,
        "asyncComplete":true
       }

2. If the custom job doesn’t uses Oracle Banking Microservices Architecture Batch service and the Batch API is implemented as a synchronous call, then use the below template to include the job as a task in EOD Flow definition.

       {
        "type":"HTTP",
        "name":"<MilestoneCode.JobName>",
        "taskReferenceName":"<MilestoneCode.JobName>",
        "inputParameters":
        {
         "http_request":
         {
          "connectionTimeOut":"0",
          "readTimeOut":"0",
          "vipAddress":"<Microservice name registered in eureka>",
          "uri":"<relative URL>",
          "method":"<HTTP Method>",
          "headers":
          {
           "appId":"${workflow.input.appId}",
           "branchCode":"${workflow.input.branchCode}",
           "userId":"${workflow.input.userId}"
          }
         },
         "asyncComplete":false
        },
        "startDelay":0,
        "optional":false,
        "asyncComplete":true
       }

   Note:

   HTTP Method - One of the GET, PUT, POST, DELETE, OPTIONS, HEAD
3. If the custom job doesn’t uses Oracle Banking Microservices Architecture Batch service and if the Batch API is implemented as an asynchronous call, then call back needs to be implemented in the respective API. Please use the below template to include the job as a task in EOD Flow Definition.

       {
        "type":"HTTP",
        "name":"<MilestoneCode.JobName>",
        "taskReferenceName":"<MilestoneCode.JobName>",
        "inputParameters":
        {
         "http_request":
         {
          "connectionTimeOut":"0",
          "readTimeOut":"0",
          "vipAddress":"<Microservice name registered in eureka>",
          "uri":"<relative URL>",
          "method":"<HTTP Method>",
          "headers":
          {
           "appId":"${workflow.input.appId}",
           "branchCode":"${workflow.input.branchCode}",
           "userId":"${workflow.input.userId}"
          }
         },
         "asyncComplete":true
        },
        "startDelay":0,
        "optional":false,
        "asyncComplete":true
       }

Table 3-1 Batch API

Serial Number | Milestone | Job Name
--- | --- | ---
URL | http://<hostname>:<port>/plato-orch-service/api/tasks | –
Headers | userId : <Logged in user id> branchCode : <Logged in branch code> appId : platoorch Content-Type : application/json Accept : application/json | userId – User who updates the task branchCode – Branch where the update is performed
Body |
    {
     "workflowInstanceId":
     "<EOD_Workflow_ID",
     "taskId": "<Task_ID>",
     "status": "<Status>"
    }
| EOD_Workflow_ID – A Workflow ID gets generated when EOD is invoked Task_ID – Unique task ID gets generated for each task once it starts Status – COMPLETED / FAILED_WITH_TERMINAL_ERROR / FAILED / IN_PROGRESS

Note:

asyncComplete – field in EOD workflow definition should be set to true, if the Http task makes an asynchronous call. The task has to be updated explicitly by calling the above update APIs. Only after successful update, the next task will get executed.