Hi,
I wanted to build a orquesta workflow that has two (multiple) “when” statements that can all be true and should be executed. For now I was not successful. Is there any order how the “when” statements are worked on? I tried like in the code below and got the error
YaqlEvaluationException: Unable to evaluate expression ‘<% ctx(regex_result[0]) = “12” %>’. NoMatchingFunctionException: No function “#indexer” matches supplied arguments
For me it looks like the “regex_rseult” variable I created before is not available during the execution
of the second “when” statement.
If I exchange the second when statement for testing purposes by “when: <% succeeded() %>”, it is
executed but the following tasks are failing, because variables from there first statement were not
defined.
tasks:
Task1:
action: some.action
input:
ticket_id: <% ctx().ticket_id %>
next:
- when: <% regex_match(result().result.Ticket.Article[0].Body, "^Some content.*") %>
publish:
- article_dict: <% result().result.Ticket.Article %>
- regex_result: <% regex_substring(result().result.Ticket.Article[0].Body, '.*Details:(\d{1,3}) (.*)') %>
- when: <% ctx(regex_result[0]) = "12" %>
publish:
- some_value: "test123"
do: Task2
Task2:
action: core.http
Any ideas?
Thanks.