elsa-workflows / elsa-workflows/elsa-core

Error When Accessing Sub-Workflow Outputs Using JS Syntax

Open
#5,010 1 comment 1 reaction 0 assignees View on GitHub
bug elsa 3 triaged
Dominant language
C#
Stars
7.9k
Forks
1.5k
Avg merge
15h 22m
Merged PRs (30d)
114

Description

## Issue Description
When creating a workflow that includes an activity with an output, and this workflow is then utilized as a sub-workflow in another workflow, attempting to access the output of the sub-workflow using the JavaScript syntax `get{output_name}From{activity_name}()` results in an error. Specifically, the error message encountered is similar to `"getOutput1FromSub1 is not defined"`.

## Steps to Reproduce
1. Import the provided workflows into Elsa Workflows.
2. Publish the imported workflows.
3. Execute the Main workflow.
4. Observe the error when the system attempts to access an output from a sub-workflow using the specified JS syntax.

## Expected Behavior
The expected behavior is that the consuming workflow should be able to access outputs from activities within a sub-workflow using the `get{output_name}From{activity_name}()` JavaScript syntax without encountering errors.

## Actual Behavior
An error is thrown stating that the method (e.g., `getOutput1FromSub1`) is not defined, indicating that the consuming workflow cannot access the sub-workflow's activity outputs using the expected JS syntax.

## Additional Information
- The issue is reproducible with the attached workflow exports.

[workflow-definitions-output.zip](https://github.com/elsa-workflows/elsa-core/files/14417193/workflow-definitions-output.zip)

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.