This PR sets up the basic logic for taking in a preset template -> generating a UI flow, and taking a UI flow -> generating final backend template:
conversion from template -> flow: via toTemplateFlows() + added fns in template_to_workflow_utils. Enhances the existing logic to be more generic and handle conversion at a per-node granularity. Also takes into account previous node inputs to pass when generating the final fields for each template flow. Note that there's TODOs for all of the current gaps and where current logic is hardcoded
conversion of flow -> template: via enrichPresetWorkflowWithUiMetadata() in workflows/new_workflow_utils. Enhances the existing logic to be more generic and handle conversion at a per-preset-template granularity. For each preset use case, we return a standalone hardcoded set of UI nodes/edges.
other general util fn refactoring
adds a few interfaces and types to represent the backend flow and sub-flow structures in more detail
other general state handling and guardrails, due to parsing changes, such as only rendering valid templates on UI page that can parse a UI flow
Note this is just the initial setup of the overall structure for doing full generic conversion. For the initial release of a set of static supported workflows, we will have partially hardcoded logic. Subsequent PRs will add more of these cases, like different processor nodes for handling different ML transforms on ingest. We can utilize these fns to minimize as much code duplication as possible.
[x] Commits are signed per the DCO using --signoff
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.
Description
This PR sets up the basic logic for taking in a preset template -> generating a UI flow, and taking a UI flow -> generating final backend template:
toTemplateFlows()
+ added fns intemplate_to_workflow_utils
. Enhances the existing logic to be more generic and handle conversion at a per-node granularity. Also takes into account previous node inputs to pass when generating the final fields for each template flow. Note that there's TODOs for all of the current gaps and where current logic is hardcodedenrichPresetWorkflowWithUiMetadata()
inworkflows/new_workflow_utils
. Enhances the existing logic to be more generic and handle conversion at a per-preset-template granularity. For each preset use case, we return a standalone hardcoded set of UI nodes/edges.Note this is just the initial setup of the overall structure for doing full generic conversion. For the initial release of a set of static supported workflows, we will have partially hardcoded logic. Subsequent PRs will add more of these cases, like different processor nodes for handling different ML transforms on ingest. We can utilize these fns to minimize as much code duplication as possible.
Demo video:
screen-capture (27).webm
Issues Resolved
Makes progress on #73
Check List
--signoff
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.