Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YAQL methods can't handle an array of dict value at 'items' of 'with' parameter #176

Closed
userlocalhost opened this issue Aug 26, 2019 · 0 comments

Comments

@userlocalhost
Copy link
Member

userlocalhost commented Aug 26, 2019

An execution of following workflow would fail with this error message when user specifes an array of dict value.

'YaqlEvaluationException: Unable to evaluate expression ''<% ctx(array_input).distinct() %>''. TypeError: unhashable type: ''BaseDict'

Metadata file (test_input.yaml)

---
name: test_input
description: Test action to check input parameter would be handled correctly
runner_type: orquesta
entry_point: workflows/test_input.yaml
enabled: true
parameters:
  array_input:
    type: array

Orquesta file (workflows/test_input.yam)

version: 1.0

input:
  - array_input

description: Intermediate workflow to check performance

tasks:
  task:
    action: core.echo
    with:
      items: <% ctx(array_input).distinct() %>
    input:
      message: <% item() %>

Execution result

ss_for_reporting_issue_of_orquesta_20190825

Environment of st2

スクリーンショット 2019-08-26 10 33 39

Note

This problem was happend at calling YAQL method 'distinct' to evaluate array of dict value which was specified in 'items' parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants