Closed m4dcoder closed 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.
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.