-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using DMN Runner with Included Model fails to run #403
Comments
I couldn't reproduce this for named imports. For unnamed imports, though, I had the results not showing the external Decision, and D3 being evaluated to (null). Please import this gist (https://gist.github.com/tiagobento/aff4c6055219b614119f6632cb6e3fbb) using the Import From URL card at https://sandbox.kie.org/dev to see what I mean. |
Hi @tiagobento Beside that, please use those other models -> https://github.com/apache/incubator-kie-drools/blob/4004fe9bf745c5eae18223cd1d3a42d8efd4566e/kie-dmn/kie-dmn-test-resources/src/test/resources/Imported_Model_Unamed.dmn I've uploaded them to sandbox, and when I open Importing_Named_Model , this is what I see in logs for validation:
(there should be both models/resources, but only one is sent) |
After debugging and talking to @gitgabrio, @yesamer and @ljmotta, we found that there are three things in the files shared by @gitgabrio that are "unexpected" for KIE Sandbox, DMN Runner, and the new DMN Editor.
I'd say the only actionable item here in the short term would be item 3, and we can create a new task for addressing 2, as it is already listed at #796 |
When I model a decision (from scratch using the new DMN editor), that uses an imported BKM (also modelled in the editor), imported using the empty name (1.5 feature), it also doesn't work with the runner (I am getting Unknown variable 'sayHello' errors - sayHello is the name of the imported BKM). I see the potential problem could be, how the editor adds the knowledgeRequirement:
It is added with the namespace prefix (namespace before #). The namespace shouldn't be there, because the import with empty name imports into the default namespace of the model. This is from spec:
So it should be used like this:
@tiagobento @jomarko @ljmotta, should I file this as a separate issue please? |
@baldimir it depends, if the namespace thing you speak about and @tiagobento namespace thing he speaks about is the same or not. to me your findings seems a little bit different scenario than #403 ticket. To me it sounds you speak about new way/alternative of importing models. To me it would make sense to have a separate ticket. |
Ok, @jomarko thanks for feedback. I created it as a separate issue here #1066 @tiagobento @ljmotta |
So I guess we can set this task as simply normalizing the DMN model to always have a |
This can land after #785 where we introduce the normalization mechanism for the DMN Editor. |
When using an included model with the DMN runner within Sandbox, you cannot use a DMN that incorporates an included model in the DMN model you're currently on.
Test Scenario within Sandbox
Error returned in JavaScript console:
In best practices of models, this is a common pattern to use shared models amongst multiple decisions.
The text was updated successfully, but these errors were encountered: