You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "kanetran (via GitHub)" <gi...@apache.org> on 2024/11/27 04:14:36 UTC
[I] The difference in Rules when using the sandbox from apache/incubator-kie-sandbox-webapp:main and quay.io/kie-tools/kie-sandbox-image:0.32.0. [incubator-kie-issues]
kanetran opened a new issue, #1645:
URL: https://github.com/apache/incubator-kie-issues/issues/1645
Description:
I have defined a rule as follows in DMN 1.2 (with quay.io/kie-tools/kie-sandbox-image:0.32.0):
`rule "No black Friday discount after 12.12.2022"
salience 1000
when
$pp: ProductPricing(promotionCode == "BLACK1")
not $sp: SubscriptionPricingModel(subscriptionFrom < '12-Dec-2022', productCode == $pp.productCode)
then
$pp.setPromotionCode("");
update($pp);
end`
When I tried using `apache/incubator-kie-sandbox-webapp:main`, it didn’t work as expected.

I would like to ask:
1. Does apache/incubator-kie-sandbox-webapp:main use DMN 1.5?
2. Starting from versions after DMN 1.2, Decision Table (DT) analysis static became available. Is this the reason for the above error?
3. I read in some places that the ? symbol or dynamic comparisons no longer work well in versions >= DMN 1.3. So, is it correct to set a static column like subscriptionFrom < '12-Dec-2022' and evaluate it as true/false? If yes, is there any way for me to handle this? Because in my rule file, I have many comparisons of this type (subscriptionFrom < '12-Dec-2022' and productCode == $pp.productCode). If I do this, it will result in a lot of additional columns.
--
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: commits-unsubscribe@kie.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [I] The difference in Rules when using the sandbox from apache/incubator-kie-sandbox-webapp:main and quay.io/kie-tools/kie-sandbox-image:0.32.0. [incubator-kie-issues]
Posted by "yesamer (via GitHub)" <gi...@apache.org>.
yesamer commented on issue #1645:
URL: https://github.com/apache/incubator-kie-issues/issues/1645#issuecomment-2507195055
Closing as an answer has been provided (thank you @jomarko)
--
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: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [I] The difference in Rules when using the sandbox from apache/incubator-kie-sandbox-webapp:main and quay.io/kie-tools/kie-sandbox-image:0.32.0. [incubator-kie-issues]
Posted by "jomarko (via GitHub)" <gi...@apache.org>.
jomarko commented on issue #1645:
URL: https://github.com/apache/incubator-kie-issues/issues/1645#issuecomment-2505261561
Hi @kanetran
1. yes, latest sandbox webapp uses DMN 1.5
2. static analysis just report found issues, I think it reports some valid issues [1]
3. where do you read this about `?` please, see also my points [1]
4. You can turn off `extended-services`, that will stop the static analysis, however also the `DMN Runner` will be disabled in such case, basically the feature under `Run` button will be disabled
One more general comment about DRL vs DMN. They are similar, but different.
1. DMN Can not update an object, only construct a new one.
2. Your DRL will automatically try to match agains all possible pairs of `ProductPricing` and `SubscriptionPricingModel` while the DMN function will try to match against single pair of `ProductPricing` and `SubscriptionPricingModel`.
[1]
1. the question mark is not needed in your decision table, please use `>= date and time(2023,10,1,0,0,0)`
2. `not` takes as an argument boolean while you pass a string, so you can replace your `not` with a unary test like `!= pp.promotionCode`
--
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: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [I] The difference in Rules when using the sandbox from apache/incubator-kie-sandbox-webapp:main and quay.io/kie-tools/kie-sandbox-image:0.32.0. [incubator-kie-issues]
Posted by "yesamer (via GitHub)" <gi...@apache.org>.
yesamer closed issue #1645: The difference in Rules when using the sandbox from apache/incubator-kie-sandbox-webapp:main and quay.io/kie-tools/kie-sandbox-image:0.32.0.
URL: https://github.com/apache/incubator-kie-issues/issues/1645
--
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: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org