Rikkola opened a new issue, #7293:
URL: https://github.com/apache/incubator-kie/issues/7293

   ### Describe the bug
   
   ## Summary
   
   In the Sequence DSL, `absent()` written right after `oneOf()` or 
`noneOrAll()` does not follow step order. This causes two problems.
   
   ## Problem 1: `absent()` blocks too early
   
   ```java
   sequence(
       pattern(start),
       oneOf(alarmA, alarmB),
       absent(blocker),
       pattern(done)
   )
   ```
   
   `absent(blocker)` is written after `oneOf()`, so it should only watch the 
period between `oneOf()` matching and done arriving.
   
   **Events**: start, blocker, alarmA, done
   
   * **Expected**: the rule fires. The blocker arrived before `oneOf()` 
matched, so it is outside the `absent()` window.
   * **Actual**: the blocker cancels the sequence, because absent() was already 
watching.
   
   
   ## Problem 2: a valid rule is rejected
   ```java
   sequence(
       oneOf(alarmA, alarmB),
       absent(blocker),
       pattern(done)
   )
   ```
   
   * **Expected**: the rule builds and fires. A leading oneOf() is valid.
   * **Actual**: the rule is rejected with a "leading `absent()`" error. While 
compiling, the rule builder moves the `absent()` in front of the `oneOf()`, and 
the check then sees the moved order instead of what the user wrote.
   
   ### Expected behavior
   
   _No response_
   
   ### Actual behavior
   
   _No response_
   
   ### How to Reproduce?
   
   _No response_
   
   ### Output of `uname -a` or `ver`
   
   _No response_
   
   ### Output of `java -version`
   
   _No response_
   
   ### 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)
   
   _No response_
   
   ### Build tool (ie. output of `mvnw --version` or `gradlew --version`)
   
   _No response_
   
   ### Additional information
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to