boomerang-io / community

The Boomerang community, roadmap, planning, and architecture repository. The central place for information on joining, contributing, and governance.
https://useboomerang.io
Apache License 2.0
11 stars 0 forks source link

Run Workflow System Task not working for Users #304

Closed tlawrie closed 2 years ago

tlawrie commented 2 years ago

Describe the bug

When creating a user workflow and using the Run Workflow system task, no workflows show up in the drop down of workflows to choose from.

This may be a UI bug as it could be building the drop up based on data already held of the workflows loaded.

What project does this issue relate to?

Boomerang Flow

To Reproduce

  1. Create two User workflow: one for running a sleep or simple function. The second workflow to use the system task for Run Workflow.
  2. On editing the Run Workflow system task, the workflows drop down will never get filled in.

Environment

Flow 3.5.0

Additional Contenxt

No response

amhudson commented 2 years ago

For team workflows, the dropdown is just the workflows associated with particular team returned from GET /workflow/teams. However, for user workflows, the workflows are not associated with a particular team but with a user. Therefore, the UI will need to populate the dropdown from GET /workflow/workflows/user. and exclude the workflow that is currently being edited.

tlawrie commented 2 years ago

Thanks for the analysis.

  1. Do we need to also check system and template workflows?
  2. Do we need to exclude the current workflow?
amhudson commented 2 years ago
  1. I've already checked the system and template workflows. They are already calling GET /workflow/workflows/system and GET /workflow/workflows/template, respectively.
  2. From what I have observed from the UI behavior, the UI is excluding the workflow that is currently being edited from the Run Workflow dropdown, perhaps to keep the workflow from executing itself.
tlawrie commented 2 years ago

Thanks @amhudson. In discussing (2), i think we remove the limitation for excluding the current workflow. The user can decide, and I am not even sure what benefit excluding it would provide, in that a user could always use two workflows to go in a loop back and forth, so there are ways to do it anyway.

Okisa commented 2 years ago

Opened a PR for this and pushed tag 3.5.8 to dev and qa to test things https://github.com/boomerang-io/flow.client.web/pull/111