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

Create/Populate Activity Outcomes at Runtime #873

Closed
tomy2105 opened this issue Apr 16, 2021 · 7 comments · Fixed by #1064
Closed

Create/Populate Activity Outcomes at Runtime #873

tomy2105 opened this issue Apr 16, 2021 · 7 comments · Fixed by #1064
Labels
enhancement New feature or request prio low Is not on the roadmap for the near-future
Projects
Milestone

Comments

@tomy2105
Copy link
Contributor

Similar to question asked in #831.
Is there a way to create outputs list of the activity in the runtime, during initialization (or completely in runtime)?

@sfmskywalker
Copy link
Member

What do you mean by "outputs list"? Do you mean some form of metadata about what output(s) an activity might provide?

@tomy2105
Copy link
Contributor Author

Yes, that is exactly what I mean.
A dynamic way of creating Outcomes = new[] { True, False, OutcomeNames.Done }......
Something like OutcomesProvider similar as now there is OptionsProvider for activity properties options.

@sfmskywalker
Copy link
Member

Ah I see. You are referring to outcomes, not outputs (I do understand the ambiguity).

Right now there's no way, except in the form of a workflow designer plugin. This is used for example for the Fork activity, where the user can define branches from the activity editor, and then these branches are displayed as outcomes on the designer.

What you are asking for is a way to provide a list of outcomes at runtime from the server. I think we can make that happen. But out of curiosity, what's your use case for this?

@tomy2105
Copy link
Contributor Author

tomy2105 commented Apr 16, 2021

A very simplified example.
I try to develop workflow for non-programmers.
They use a web service (and I hide all the complex detail of calling it into nice activity with two parameters) which returns an int which actually has few values depending on the configuration of this 3rd party service (and configuration changes from time to time).
Web service has metadata api which allows you to fetch all current possible values of this integer with user friendly description.
So instead of forcing user to do Switch with comparison to int I want to have simple "dynamic" block which will have that many outputs as there are unique values of that int, with output names being user friendly description from metadata.

@tomy2105
Copy link
Contributor Author

tomy2105 commented Apr 16, 2021

Ah I see. You are referring to outcomes, not outputs (I do understand the ambiguity).

Ah, yes......
outputs in code == ActivityName,Output in designer.
outcomes in code == activity outputs (lines with names coming out of activity :)) in designer :).
Don't know what proper "nomenclature" for designer items is :(......

@sfmskywalker
Copy link
Member

I see. So if you were able to dynamically control the activity's outcomes when initializing the activity registry, you can read this API metadata and provide the appropriate outcomes, right?

@tomy2105
Copy link
Contributor Author

Yes, that is right.

@sfmskywalker sfmskywalker added enhancement New feature or request prio low Is not on the roadmap for the near-future labels Apr 19, 2021
@sfmskywalker sfmskywalker added this to Needs triage in Triage via automation Apr 19, 2021
@sfmskywalker sfmskywalker moved this from Needs triage to Triage complete in Triage Apr 19, 2021
@sfmskywalker sfmskywalker changed the title Create/Populate activity outputs in runtime. Create/Populate Activity Outcomes at Runtime May 25, 2021
@sfmskywalker sfmskywalker added this to the Elsa 2.1 milestone May 25, 2021
sfmskywalker added a commit that referenced this issue May 30, 2021
sfmskywalker added a commit that referenced this issue May 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request prio low Is not on the roadmap for the near-future
Projects
No open projects
Triage
Triage complete
Development

Successfully merging a pull request may close this issue.

2 participants