bpmn-io / bpmn-io/variable-resolver

Array/List values are not resolved as expected

Open
#82 2 comments 0 reactions 0 assignees View on GitHub
backlog bug
Dominant language
JavaScript
Stars
0
Forks
1
Avg merge
8h 41m
Merged PRs (30d)
3

Description

### Describe the Bug

Array/List values are not resolved as expected. Currently, a variable with a value of `["1", 1, { "test": { "sample": 123 } }]` is resolved as below.

The problems I can observe;

- `type` is `Context`, but should have been `List`
- First two entries that are `"1"` and `1` are omitted, but should have been preserved and resolved accordingly
- `isList` flag is missing

```json
{
"name": "arrayValue",
"provider": [
null
],
"type": "Context",
"info": "",
"entries": [
{
"entries": [
{
"atomicValue": 123,
"entries": [],
"type": "Number",
"info": "123",
"name": "sample",
"detail": "Number"
}
],
"type": "Context",
"info": "",
"name": "test",
"detail": "Context"
}
],
"detail": "Context"
}
```

### Steps to Reproduce

1. Create an input/output mapping
2. Enable FEEL expressions
3. Provide a value like `["1", 1, { "test": { "sample": 123 } }]`

### Expected Behavior

`variable-resolver` resolves this variable with `type=List` and `isList=true` (?) and its entries accordingly without omitting sub-values and their schema.

### Environment

- Library version: main, cover-null-variable-type

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.