Skip to content

Conditionals in DAG spec #28

@EpicWink

Description

@EpicWink

Support conditionals in DAG-type workflow-spec.

Sometimes activity tasks in workflows only need to be run if a certain condition is met. There is no way to have optional branches in the current workflow spec definition.

Proposed syntax example:

tasks:
  - id: foo
    type:
      name: spam-foo
      version: "0.3"
    if:
      from: workflow
      key: $.run-workflow
  - id: bar
    type:
      name: spam-foo
      version: "0.4"
    dependencies:
      - foo
    if:
      from: dependency
      key: $

Nothing more complex should be required as a prior task could be used to use the entire current workflow state to determine if a branch should be run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions