StackStorm / orquesta

Orquesta is a graph based workflow engine for StackStorm. Questions? https://github.com/StackStorm/st2/discussions
https://docs.stackstorm.com/orquesta/
Apache License 2.0
98 stars 39 forks source link

Passing true to decrypt of st2kv function does not work #124

Closed m4dcoder closed 5 years ago

m4dcoder commented 5 years ago

Taking the examples.orquesta-st2kv workflow as an example, https://github.com/StackStorm/st2/blob/master/contrib/examples/actions/workflows/orquesta-st2kv.yaml. If the expression <% st2kv(ctx().key_name, decrypt=ctx().decrypt) %> is changed to <% st2kv(ctx().key_name, decrypt=true) %>, the value is not decrypted. If the literal true is explicitly set to bool like <% st2kv(ctx().key_name, decrypt => bool('true')) %>, then the value is decrypted.

jinpingh commented 5 years ago

https://github.com/StackStorm/orquesta/pull/127/ This is documentation issue. The original documentation has wrong example.

Named parameters in function call must use the sign => for assignment. Equal sign = in YAQL is used for evaluation and will result in the wrong value being passed for the parameter.