fix(orchestrator): workflow start state might also be in the start.stateName variable when compiled and cloudevent input data should be one level deep#2896
Open
lholmquist wants to merge 5 commits intoredhat-developer:mainfrom
Conversation
Changed Packages
|
…ateName variable when compiled
…t inputdata.wokflowdata.values
e5ac10a to
697882d
Compare
Co-authored-by: Oleksandr Andriienko <oandriie@redhat.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2896 +/- ##
=======================================
Coverage ? 33.21%
=======================================
Files ? 162
Lines ? 5904
Branches ? 1554
=======================================
Hits ? 1961
Misses ? 3636
Partials ? 307
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
…rc/service/SonataFlowService.test.ts Co-authored-by: Oleksandr Andriienko <oandriie@redhat.com>
|
Member
Author
|
@AndrienkoAleksandr thanks for the suggestions, updated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Hey, I just made a Pull Request!
While i was testing the Emitting Cloud Events to Trigger workflows on an Openshift cluster, using "compiled" workflows instead of running them in dev mode on my laptop, I ran into this error: "Error executing workflow with id lock-flow, No States that match the start state"
I discovered that the "start" parameter might also have another parameter in it that needs to be taken into account.
For example, The previous code assumed that when parsing the source for the "start" param it would look like this:
code example from here: https://github.com/masayag/poc-kafka-logic-operator/blob/main/callback-flow/src/main/resources/lock.sw.yaml
When i ran the "compiled" version of this workflow, using the manifests that are generated when building the workflow, the source looks more like this:
code example from here: https://github.com/masayag/poc-kafka-logic-operator/blob/main/manifests/02-sonataflow_lock-flow.yaml
This code change checks for that "stateName" param and uses it if available, it not then falls back to just the "start" param
The other thing that I came across was when a workflow has input data from a form sent to it. The inputData object will look like this:
and the data section of the cloud event would look something like this:
data: { workflowData: {} }which will error the workflow when the kafka message sends the data back. The input data that is added to the data section of the cloudevent should just be the workflowData level and not the nested object. I added that fix here too✔️ Checklist