yesamer commented on code in PR #6213: URL: https://github.com/apache/incubator-kie-drools/pull/6213#discussion_r1920522144
########## kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/B-FEEL/ConstraintsChecksBFeel.dmn: ########## @@ -0,0 +1,94 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + --> + +<dmn:definitions xmlns="http://www.trisotech.com/definitions/_238bd96d-47cd-4746-831b-504f3e77b442" + xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" + xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" + xmlns:dmndi="https://www.omg.org/spec/DMN/20230324/DMNDI/" + xmlns:feel="https://www.omg.org/spec/DMN/20240513/B-FEEL/" + xmlns:dmn="https://www.omg.org/spec/DMN/20230324/MODEL/" Review Comment: @gitgabrio As B-FEEL is a DMN 1_6 feature, I guess we should move this file into `DMNv1_6` directory, and we should update the xmlns:dmn to 1.6, I guess. ########## kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/functions/DateFunction.java: ########## @@ -51,6 +52,7 @@ public class DateFunction .withResolverStyle(ResolverStyle.STRICT); } + Review Comment: @gitgabrio Please save github HD space removing this unnecessary line :asd: ########## kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/B-FEEL/BFeelOverrideChecks.dmn: ########## @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + --> + +<dmn:definitions xmlns="http://www.trisotech.com/definitions/_238bd96d-47cd-4746-831b-504f3e77b442" + xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" + xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" + xmlns:dmndi="https://www.omg.org/spec/DMN/20230324/DMNDI/" + xmlns:feel="https://www.omg.org/spec/DMN/20240513/B-FEEL/" + xmlns:dmn="https://www.omg.org/spec/DMN/20230324/MODEL/" Review Comment: @gitgabrio As B-FEEL is a DMN 1_6 feature, I guess we should move this file into `DMNv1_6` directory, and we should update the xmlns:dmn to 1.6, I guess. ########## kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/FEELFunction.java: ########## @@ -70,6 +70,24 @@ public interface FEELFunction { */ Object invokeReflectively(EvaluationContext ctx, Object[] params); + /** + * The default value to return instead of <code>null</code>, to be used with the B-FEEL (and other different dialects) syntax + * @return + */ + default Object defaultValue() { + // To be overridden by specific classes for B-FEEL compliance + return null; Review Comment: @gitgabrio I would consider removing the default behavior of this method. If someone, by mistake, removes the overridden definition in one or more specific sub-classes, there's the risk that B-FEEL will act as FEEL, returning null. I guess the risk is low, as we have the Unit Tests, but I would consider that. WDYT? ########## kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/B-FEEL/BFeelChecks.dmn: ########## @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + --> + +<dmn:definitions xmlns="http://www.trisotech.com/definitions/_238bd96d-47cd-4746-831b-504f3e77b442" + xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" + xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" + xmlns:dmndi="https://www.omg.org/spec/DMN/20230324/DMNDI/" + xmlns:feel="https://www.omg.org/spec/DMN/20240513/B-FEEL/" + xmlns:dmn="https://www.omg.org/spec/DMN/20230324/MODEL/" Review Comment: @gitgabrio As B-FEEL is a DMN 1_6 feature, I guess we should move this file into `DMNv1_6` directory, and we should update the xmlns:dmn to 1.6, I guess. -- 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]
