Rikkola opened a new issue, #7100:
URL: https://github.com/apache/incubator-kie/issues/7100
### Describe the bug
### 1. Mixed alpha + beta expressions in one step → `ClassCastException`
When a single step has both an alpha expression and a beta expression
referencing the anchor:
```java
sequence(
pattern(toy)
.expr("alpha", t -> t.getName().startsWith("a"))
.expr("beta", person, (t, p) ->
t.getName().equals(p.getName()))
)
```
`PhreakNodeFactory` wraps the constraints in `CombinedAlphaConstraint`,
whose `getRequiredDeclarations()` always returns an empty array.
`DynamicFilter` then evaluates the whole thing as an alpha constraint and never
supplies the anchor tuple to the beta part, which causes a `ClassCastException`.
A single beta expression works fine (existing tests cover that). The issue
is only with mixed alpha+beta in the same step.
If supporting this combination is out of scope for now, it would be good to
reject it at build time with a descriptive error.
**Relevant code:**
- `CombinedAlphaConstraint.java:54`
- `PhreakNodeFactory.java:184`
- `DynamicFilter.java:59`
### 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]