Skip to content
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

Value not in Glossary using python 3.7 and DMN #11

Open
lrnzkck opened this issue Nov 26, 2022 · 2 comments
Open

Value not in Glossary using python 3.7 and DMN #11

lrnzkck opened this issue Nov 26, 2022 · 2 comments

Comments

@lrnzkck
Copy link

lrnzkck commented Nov 26, 2022

Working with this package and python3.7 prints after reading a dmn file with readXML() and asking for a decision results in an error that the input variables are not part of the glossary. Using python 3.9 everything works fine.

Just printed the value of the glossary attribute ob the dmn object. In python3.7 its just an empty dict:
[]

In Python3.9 there are all information about the input values:
{'age': {'item': 'Data.age', 'concept': 'Data', 'annotations': ['(number)']}, 'random_number': {'item': 'Data.random_number', 'concept': 'Data', 'annotations': ['(number)']}, 'payment_method': {'item': 'Data.payment_method', 'concept': 'Data', 'annotations': ['(string)']}}

We are working with different versions of python because of limitations made by our companies. Is there a flag or a configuration missing in the dmn, so python3.7 can handle the dmn file? Or do you have any other idea?
Adding the variables as input values in the DRD does not work.

Thanks a lot!

@russellmcdonell
Copy link
Owner

Ouch - the "required >= 3.6" comes from the fact that SLY requires 3.6 or greater.
But I must have used something in pyDMNrules that isn't 3.6 compatible.
I'll have a look into it, and if it's simple I'll fix it, but I can't promise anything.
Perhaps this is another lever you could apply in your efforts to get people to upgrade from older versions of Python.
I'll up date the 'Requires' if I can't find the issue.

@russellmcdonell
Copy link
Owner

Do you get the same issue if you create the DMN in Excel? Or are you creating the XML in some DMN tool and hoping for interopreability. I created the XML stuff so that I could run the conformance test - it wasn't mean to be the most robust part of the module. It's ugly, because the DMN XML specification is ugly. I've eyeballed the code and there is nothing there that looks syntactically complex enough to 'version dependant'. However I can't comment on XML and xml.etree which is the module I use to parse XML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants