tarilabs commented on PR #5657: URL: https://github.com/apache/incubator-kie-drools/pull/5657#issuecomment-1900502590
I really wish I could dedicate unlimited time, but I'm currently on sick leave. The things I noticed, are: A. This seems a behavioural change introduced with DMNv1.5, I'd suggest first to bump the DMN engine to this level of spec conformance by parsing the metamodel, or (much less ideal) guard it under feature flag. That would also save you troubles of "old behaviour" version can be fix-pointed to the previous Drools releases. Myself and @baldimir discussed what bumping to DMNv1.5 entails during hand-over. B. Provided my understanding this is for DMNv1.5 is confirmed, this coercion seems to me applicable in 2 places: - function invocation, - and type-conformance in the DMN level. if that is indeed the semantic discussed, B.1. For function invocation, you could consider to do similarly to: https://github.com/apache/incubator-kie-drools/blob/9a3128e47f13d7c0e85fe8ff00e573ec769d2f9d/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/functions/BaseFEELFunction.java#L239-L261 this coerces the actual parameter in the case of singleton lists. You could consider similar, analogous strategy for the date->date and time coercion. You will need to implement the coercion in the actual parameter being set in the CandidateMethod (eg actual parameters value as is, except for the coerced date -> date and time) B.2. For type-conformance in the DMN level, you could consider to do similarly to: https://github.com/apache/incubator-kie-drools/blob/9a3128e47f13d7c0e85fe8ff00e573ec769d2f9d/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/impl/DMNRuntimeImpl.java#L675-L687 and https://github.com/apache/incubator-kie-drools/blob/9a3128e47f13d7c0e85fe8ff00e573ec769d2f9d/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/impl/DMNRuntimeImpl.java#L442 by introducing the additional coercion rule during type-conformance. Hope this explain better why a modification in the DMN boxed Context does not seem the appropriate solution, but that's just me. This is not a small task, so I would also suggest splitting it into subtasks. I really hope this will help you. -- 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]
