4.1 Defining workflow using Netflix conductor

Netflix Conductor is a popular and widely used open source orchestration engine. It uses JSON-based DSL (short for, domain-specific language) to define the workflows and workflow steps (tasks). These simple/worker tasks are implemented by application(s) and run in a separate environment from Conductor. These tasks talk to Conductor server through REST client and provides the following notable features: Provides visibility and traceability of workflows.

Below is a standard example of a workflow DSL.
  • The tasks section of a DSL is an array of batch jobs to be executed in sequence.
  • In the input Parameters section http_request to be passed. So, this would contain the standard batch request contents for example, url, headers, body etc.
  • Certain set of parameters like branchCode, userId are obtained from the input of request from where this DSL would be invoked to run. Hence, they are referred to as ${workflow.input.xxx}.
  • Certain parameters like runDate are obtained as output from any tasks, preceding the task which is using it.
Standard DSL
{     "name": "TaskBatchJobsWf",
               "description": "TaskBatchJobsWf puts the jobs in the order of execution sequence.",
               "tasks": [
                {
                "name": "obcr-task-init",
                "taskReferenceName": "obcr-task-init",
                "inputParameters": {
                    "http_request": {
                        "connectionTimeOut": "36000000", 
                        "readTimeOut":"36000000", 
                        "vipAddress":"obcr-task-services", 
                        "uri":"/obcr-task-services/jobLauncher/runBatch/", 
                        "method":"POST", 
                        "headers": {   
                            "appId": "CRTASK", 
                            "branchCode":"${workflow.input.branchCode}", 
                            "userId":"${workflow.input.userID}", 
                            "entityId":"DEFAULTENTITY",
                            "Accept":"application/json"  
                         },
                            "body": {  
                              "jobName":"obcr-task-init", 
                              "jobParameters":[    
                                  {                                
                                    "key": "runDate", 
                                    "value":"${workflow.variables.runDate}"  
                                  },  
                                   {                                
                                     "key": "branchCode",  
                                     "value":"${workflow.input.branchCode}"  
                                    },  
                                    {                                
                                      "key": "userId", 
                                      "value":"${workflow.input.userID}"  
                                     }  
                                     ]  
                                  }        
                                }  
                              },  
                               "type": "HTTP",  
                               "startDelay": 0,
                               "optional": false,      
                               "asyncComplete": false 
                        } 
                      ],    
                      "schemaVersion": 2, 
                      "restartable": true,    
                      "workflowStatusListenerEnabled": false 
                }
Below is the SOP to upload and execute the DSL.
  • A standard workflow DSL which includes BOD, MOD & EOD workflows has been provided in the release package.
  • Please upload this DSL to the conductor server via the app-shell. (Need to find the exact page as we have not followed this way).
  • Next, navigate to Core Maintenance → Branch EOD → Configure EOD and add this workflow to the EOD.
  • Once configured, please navigate to Core Maintenance → Branch EOD → Invoke EOD, enter the branch code and start the workflow by clicking on start.
  • Further steps are provided in Success and Failure Analysis section (refer 2.4.4).

    The above steps can be followed through the attached Postman collections as well. Batch Sequencing Guide.postman_collection.json.

    Execute the 'Post Workflow' postman request to upload the DSL to the conductor server. The DSL would be passed in the body of the request.

  • Next, navigate to Core Maintenance → Branch EOD → Configure EOD and add this workflow to the EOD.
  • Once configured, please execute the 'Initiate Workflow' postman request to execute the DSL. The request would have branchCode and userId in the request body and the workflow name as the URL path variable.