kymr / conductor

Conductor is a microservices orchestration engine - https://netflix.github.io/conductor/
Apache License 2.0
0 stars 0 forks source link

Summary - Medata Definitions #4

Closed kymr closed 6 years ago

kymr commented 6 years ago

Link

kymr commented 6 years ago

Task Definition

Example

{
  "name": "encode_task",
  "retryCount": 3,
  "timeoutSeconds": 1200,
  "inputKeys": [
    "sourceRequestId",
    "qcElementType"
  ],
  "outputKeys": [
    "state",
    "skipped",
    "result"
  ],
  "timeoutPolicy": "TIME_OUT_WF",
  "retryLogic": "FIXED",
  "retryDelaySeconds": 600,
  "responseTimeoutSeconds": 3600
}

Field Description

field description Notes
name Task Type Unique
retryCount No. of retries to attempt when a task is marked as failure  
retryLogic Mechanism for the retries see possible values below
timeoutSeconds Time in milliseconds, after which the task is marked as TIMED_OUT if not completed after transiting to IN_PROGRESS status No timeouts if set to 0
timeoutPolicy Task's timeout policy see possible values below
responseTimeoutSeconds if greater than 0, the task is rescheduled if not updated with a status after this time. Useful when the worker polls for the task but fails to complete due to errors/network failure.  
     
outputKeys Set of keys of task's output. Used for documenting task's output  

Retry Logic

Timeout Policy

kymr commented 6 years ago

Check it (Task Definition)

Check it (Workflow Definition)

kymr commented 6 years ago

Workflow Definition

Example

{
  "name": "encode_and_deploy",
  "description": "Encodes a file and deploys to CDN",
  "version": 1,
  "tasks": [
    {
      "name": "encode",
      "taskReferenceName": "encode",
      "type": "SIMPLE",
      "inputParameters": {
        "fileLocation": "${workflow.input.fileLocation}"
      }
    },
    {
      "name": "deploy",
      "taskReferenceName": "d1",
      "type": "SIMPLE",
      "inputParameters": {
        "fileLocation": "${encode.output.encodeLocation}"
      }

    }
  ],
  "outputParameters": {
    "cdn_url": "${d1.output.location}"
  },
  "schemaVersion": 2
}
field description Notes
name Name of the workflow  
description Descriptive name of the workflow  
version Numeric field used to identify the version of the schema. Use incrementing numbers When starting a workflow execution, if not specified, the definition with highest version is used
tasks An array of task definitions as described below.  
outputParameters JSON template used to generate the output of the workflow If not specified, the output is defined as the output of the last executed task
inputParameters List of input parameters. Used for documenting the required inputs to workflow optional
kymr commented 6 years ago

Tasks within Workflow

field description Notes
name Name of the task. MUST be registered as a task type with Conductor before starting workflow  
taskReferenceName Alias used to refer the task within the workflow. MUST be unique.  
type Type of task. SIMPLE for tasks executed by remote workers, or one of the system task types  
description Description of the task optional
optional true or false. When set to true - workflow continues even if the task fails. The status of the task is reflected as COMPLETED_WITH_ERRORS Defaults to false
inputParameters JSON template that defines the input given to the task See "wiring inputs and outputs" for details
kymr commented 6 years ago

Wiring Inputs and Outputs

SOURCE can be either "workflow" or reference name of any of the task
input/output refers to either the input or output of the source
JSONPath JSON path expression to extract JSON fragment from source's input/output

Example