-
Notifications
You must be signed in to change notification settings - Fork 213
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
serverless foreach condition not honored #2866
Comments
@chris-aeviator I've created the following Jira to track it: https://issues.redhat.com/browse/KOGITO-8836 |
Action condition is not implemented for any state: foreach, operation or parallel. So, this is expected behaviour with the current implementaiton |
@ricardozanini Problem is that we do not have an action section there, this is not particular to an state, but an action property we have not implemented because it is just a shortcut for a swith state (a simple one), so this not being implemented is not really reflected there. |
I kind of achieved what I wanted by running foreach, passing stateData and starting a subflow to emit my events. I believe the spec is very much open to interpretation here. Do you have any experience/ ideas how other SW frameworks handle this? |
I understand, but we need to update the doc and say that we are not supporting it at the moment. |
To the best of my knowledge, Kogito is the one with the most features implemented. Maybe it's worth asking the CNCF community how the maintainers from other implementations are handling this. |
are there tests in place to see which features are not up to spec? Also the 🌕 /🌗 notation might be not too accurate. A clear list of supported/ unsupported features is better in that regard. |
@chris-aeviator it's tricky to add a list of supported/unsupported since a few things are open for interpretation. We are doing our best to handle everything. We add to the doc what we understand it's supported at the moment and what we know it's not working. When we come up with situations like this one, we update the doc. But I agree that we could add a list to some extent in a few items. |
@chris-aeviator https://issues.redhat.com/browse/KOGITO-8836 will be added on Kogito 1.36. The intepretation is clear, if the condition is not match, the action should be skipped. |
Describe the bug
When using the
type: foreach
state in the serverless workflow according to the v0.8 spec, kogito executes each action, even though acondition
is present.Expected behavior
Kogito only fires events/functions when a condition is met
Actual behavior
Kogito fires all events
How to Reproduce?
send a message to
orderActionplan
with"data": {"customer": {"orders": [{"name": "Account"}]}}}
consume
orderAccountCreation
,orderAICreation
,orderActionplan
Only
orderActionPlan
&orderAccount
should receive messages, but alsoorderAICreation
will receive a messsage withdata=:{name: "Account"}
Output of
uname -a
orver
Linux korny-x1 5.18.1-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 30 May 2022 17:53:11 +0000 x86_64 GNU/Linux
Output of
java -version
openjdk version "18.0.1.1" 2022-04-22 OpenJDK Runtime Environment (build 18.0.1.1+2) OpenJDK 64-Bit Server VM (build 18.0.1.1+2, mixed mode)
GraalVM version (if different from Java)
No response
Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)
quarkus --version 2.16.4.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: