st2flow icon indicating copy to clipboard operation
st2flow copied to clipboard

Orquesta workflows: Task transition lines of slight complex WFs are hard to understand

Open m4dcoder opened this issue 6 years ago • 1 comments

Given the following workflow, the lines for the task transition is not clean and very hard to make sense of. For example, there's no option to anchor the endpoints of the lines to someplace else on the task box so a line is force to input on top and output at the bottom. If there's a retry loop defined, the lines get messy with overlaps and hard to understand.

version: 1.0

vars:
  - file: /tmp/<% str(random(1000000, 9999999)) %>

tasks:
  # [377, 28]
  init:
    action: core.local
    input:
      cmd: rm -rf <% ctx().file %>
    next:
      # #629e47
      - do:
          - check
          - create
        when: <% succeeded() %>
  # [126, 133]
  check:
    action: core.local
    input:
      cmd: echo 'Do something useful here.'; if [ ! -e <% ctx().file %> ]; then exit 1; fi
    next:
      # #629e47
      - do:
          - delete
        when: <% succeeded() %>
      # #d1583b
      - do:
          - rollback
        when: <% failed() %>
  # [387, 133]
  create:
    action: core.local
    input:
      cmd: sleep 3; touch <% ctx().file %>
  # [106, 238]
  delete:
    action: core.local
    input:
      cmd: rm -f <% ctx().file %>
  # [367, 238]
  rollback:
    action: core.local
    input:
      cmd: echo 'Rollback something here.'; sleep 1
    next:
      # #629e47
      - do:
          - check
        when: <% succeeded() %>

m4dcoder avatar Mar 11 '19 19:03 m4dcoder

Re-anchoring transitions to other points on the task is going to require some serious rework, especially since the YAML will need YAMeaningfuL Comment to establish it. Deprioritizing until after 3.0.0 due to the work involved and because clicking any transition will highlight it with outlines, mitigating the confusion.

bmomberger-bitovi avatar Mar 19 '19 04:03 bmomberger-bitovi