Problem/Motivation
I am in the process of creating an Azure OpenAI Augmentor and have been noticing differences between the output of ECA Augmentor Minimal Content Item vs the Augmentor Default Widget when it comes to the result output. In my situation, when trying to use the ECA Action I receive an "Array" as the output of a field where I would expect a sentence of text.
It looks like by default, if you use the Augmentor Default Widget, it will automatically reset the array to index 0 (so it works as expected).

But this is not the case for the result from the ECA action, as shown below. You can see the value is actually an array, which results in the set field being displayed as "Array".

Steps to reproduce
- Install Augmentor / Azure OpenAI Augmentor / BPMN.io
- Create a new augmentor with a standard prompt to generate a site description and follow the below ECA diagram. This essentially uses the title and body field to generate a new value in the summary field.
Proposed resolution
If we reset the array like we do with the javascript it seems to solve the issue. I want to make sure I am not missing something silly here.

Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| eca_diagram.png | 119.8 KB | j-barnes | |
| reset.png | 25.76 KB | j-barnes | |
| augmentor_array_bad.png | 22.18 KB | j-barnes | |
| transform_simple_field.png | 36.25 KB | j-barnes |
Issue fork augmentor-3453751
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
j-barnes commentedComment #6
eleonelTested and merged, thanks for your contribution.