StackStorm / st2flow

DEPRECATED & OBSOLETE! Previously StackStorm Enterprise (EWC) Workflow Editor. Now integrated directly into StackStorm OSS Core platform (st2web).
https://github.com/StackStorm/st2web/
Apache License 2.0
16 stars 6 forks source link

Escaping Jinja expressions #325

Open LindsayHill opened 5 years ago

LindsayHill commented 5 years ago

From Nick

When i try to enter an expression to a task input or task transition 'when', if i put a " or a \ it automatically escapes it for me, so i'm unable to make valid Jinja expressions

version: 1.0
    tasks:
      # [189, 75]
      hello_world:
        action: core.echo
        input:
          message: {{ ctx().message }}
        next:
          # #629e47
          - do:
              - task2
            when: {{ succeeded() }}
            publish:
              - thisvar: {{ result() }}
      # [400, 231]
      task2:
        action: core.local
        input:
          cmd: "\"echo '{{ ctx().thisvar }}'\""
    input:
      - message
bigmstone commented 5 years ago

I'm not sure how to handle this from UX perspective. Meaning if you leave the quotes out then it is desired behavior. If we don't escape quotes that could lead to some interesting failure modes.