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

EPIC - Add support to multiple workflow definitions in SonataFlow CR #488

Open
ricardozanini opened this issue Jun 13, 2024 · 0 comments
Open
Assignees
Labels
enhancement New feature or request epic

Comments

@ricardozanini
Copy link
Member

Description

Currently, the SonataFlow CR specification only allows one workflow definition in the .spec.flows attribute. For users to use subflows they would need to create a specialized ConfigMap in the .spec.resources attribute so then the operator can mount these workflows in the pod's volume. From there, users can call these subflows from the main definition in .spec.flow.

The current approach presents the following drawbacks:

  • Subflows are not tracked by the operator, hence no Knative objects or service discovery bindings are processed. This limits what users can do with sub flows;
  • Subflows can not be called externally via HTTP REST calls
  • Users must create a separate object (ConfigMap) to have them in the context
  • If a sub flow also acts as a normal flow, the user will have to deploy it twice in the cluster (one as a CM and a copy of it in the SonataFlow CR)

Implementation ideas

To overcome the outlined drawbacks, we will introduce the .spec.flows which will hold an array of workflow definitions deployed together in a single pod, enabling users to call them internally as sub-flows or externally as they were common flows deployed in the architecture.

.spec.flows and .spec.flow can be defined at the same time.

Impacts

@treblereel This will impact the kn-cli manifest generation since we will drop CM support for subflows. There won't be a concept of "main" flow anymore.
@fantonangeli this may impact the UI, can you do an assessment?
@handreyrc This will for sure impact the integration with the Orchestrator. I'm unsure if the plugin is considering one workflow per deployment unit. cc @masayag to assess and help evaluating on Backstage, this is a requirement for apache/incubator-kie-issues#1181. @fjtirado fyi

@ricardozanini ricardozanini added enhancement New feature or request epic labels Jun 13, 2024
@ricardozanini ricardozanini self-assigned this Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request epic
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant