kymr / conductor

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

Summary - System Tasks #5

Closed kymr closed 6 years ago

kymr commented 6 years ago

Link

kymr commented 6 years ago

Dynamic Task

Parameters

kymr commented 6 years ago

Decision

Parameters

name description
caseValueParam Name of the parameter in task input whose value will be used as a switch.
decisionCases Map where key is possible values of caseValueParam with value being list of tasks to be executed.
defaultCase List of tasks to be executed when no matching value if found in decision case (default condition)

Example

{
  "name": "decide_task",
  "taskReferenceName": "decide1",
  "inputParameters": {
    "case_value_param": "${workflow.input.movieType}"
  },
  "type": "DECISION",
  "caseValueParam": "case_value_param",
  "decisionCases": {
    "Show": [
      {
        "name": "setup_episodes",
        "taskReferenceName": "se1",
        "inputParameters": {
          "movieId": "${workflow.input.movieId}"
        },
        "type": "SIMPLE"
      },
      {
        "name": "generate_episode_artwork",
        "taskReferenceName": "ga",
        "inputParameters": {
          "movieId": "${workflow.input.movieId}"
        },
        "type": "SIMPLE"
      }
    ],
    "Movie": [
      {
        "name": "setup_movie",
        "taskReferenceName": "sm",
        "inputParameters": {
          "movieId": "${workflow.input.movieId}"
        },
        "type": "SIMPLE"
      },
      {
        "name": "generate_movie_artwork",
        "taskReferenceName": "gma",
        "inputParameters": {
          "movieId": "${workflow.input.movieId}"
        },
        "type": "SIMPLE"
      }
    ]
  }
}
kymr commented 6 years ago

Fork

Parameters

Example

{
  "forkTasks": [
    [
      {
        "name": "task11",
        "taskReferenceName": "t11"
      },
      {
        "name": "task12",
        "taskReferenceName": "t12"
      }
    ],
    [
      {
        "name": "task21",
        "taskReferenceName": "t21"
      },
      {
        "name": "task22",
        "taskReferenceName": "t22"
      }
    ]
  ]
}
kymr commented 6 years ago

Dynamic Fork

name description
dynamicForkTasksParam Name of the parameter that contains list of workflow task configuration to be executed in parallel
dynamicForkTasksInputParamName Name of the parameter whose value should be a map with key as forked task's reference name and value as input the forked task

Example

{
  "inputParameters": {
     "dynamicTasks": "${taskA.output.dynamicTasksJSON}",
     "dynamicTasksInput": "${taskA.output.dynamicTasksInputJSON}"
  }
  "type": "FORK_JOIN_DYNAMIC",
  "dynamicForkTasksParam": "dynamicTasks",
  "dynamicForkTasksInputParamName": "dynamicTasksInput"
}

A Join task MUST follow FORK_JOIN_DYNAMIC

kymr commented 6 years ago

Join

Parameters

Example

{
    "joinOn": ["taskRef1", "taskRef3"]
}

Join Task Output

kymr commented 6 years ago

Sub Workflow

Parameters

Example

{
  "name": "sub_workflow_task",
  "taskReferenceName": "sub1",
  "inputParameters": {
    "requestId": "${workflow.input.requestId}",
    "file": "${encode.output.location}"
  },
  "type": "SUB_WORKFLOW",
  "subWorkflowParam": {
    "name": "deployment_workflow",
    "version": 1
  }
}
kymr commented 6 years ago

Wait

External Triggers for Wait Task

SQS queue

Example SQS Payload:

{
  "some_key": "valuex",
  "externalId": "{\"taskRefName\":\"TASK_REFERENCE_NAME\",\"workflowId\":\"WORKFLOW_ID\"}"
}
kymr commented 6 years ago

HTTP

Parameters

name description
uri URI for the service. Can be a partial when using vipAddress or includes the server address.
method HTTP method. One of the GET, PUT, POST, DELETE, OPTIONS, HEAD
accept Accept header as required by server.
contentType Content Type - supported types are text/plain, text/html and, application/json
headers A map of additional http headers to be sent along with the request.
body Request body
vipAddress When using discovery based service URLs.

HTTP Task Output

name description
response JSON body containing the response if one is present
headers Response Headers
statusCode Integer status code

Example

kymr commented 6 years ago

Event

Parameters

Example

{
    "sink": 'sqs:example_sqs_queue_name'
}

Supported Sinks

Event Task Input

Event Task Output

kymr commented 6 years ago

Check it

Dynamic Task

Decision

Dynamic Fork

Wait

HTTP

Event

Common