Skip to content

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

@userlocalhost

Description

@userlocalhost

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions