Compile error in EDD

17 views
Skip to first unread message

mauro

unread,
Dec 27, 2011, 10:06:01 AM12/27/11
to DTRules
I have the following EDD data

ProductSelector ProductId integer 0 main rw
ProductSelector CurrentDate date main r
ProductSelector DateValidity date 01/01/2012 main r
ProductSelector ErrorCode integer 0 main rw
BureauScore Range string main rw
BureauScore Value integer main r
INTSocScore Range string main rw
INTSocScore Value integer main r
Prot Ind string main r
Preg Ind string main r
InstituteScore Value integer main r
InstituteRating Value integer main r
InstituteRating Range string main rw
InstituteClass Value string main r
SocScore Range string main rw
SocScore Value integer main rw


When I compile I get the following error:

Compiling: Tue Dec 27 15:48:26 CET 2011
java.lang.Exception: Conflicting types for attribute /Value on
InstituteClass In
stituteScoreDone: Tue Dec 27 15:48:26 CET 2011
Failed to convert the Excel files
java.lang.NullPointerException
java.lang.NullPointerException
at
com.dtrules.compiler.excel.util.Excel2XML.compileRuleSet(Excel2XML.ja
va:397)
at
com.dtrules.compiler.excel.util.Excel2XML.compile(Excel2XML.java:360)

at
com.dtrules.compiler.excel.util.Excel2XML.compile(Excel2XML.java:332)

at
com.dtrules.compiler.excel.util.Excel2XML.compile(Excel2XML.java:313)

at crif.cbs.decisionrulesconsole.Compiler.Compile(Unknown
Source)
at
crif.cbs.decisionrulesconsole.DecisionRulesConsole.main(Unknown Sourc
e)


I tried to replace the attribute Value of Entity InstituteClass with
new name Range and everything works fine.


Any idea about it?

Thanks

paul snow

unread,
Dec 27, 2011, 1:40:45 PM12/27/11
to dtr...@googlegroups.com
The problem is that Attribute names must be the same type, even if the Attributes are on different entities.  Also, an Entity name cannot be used as an Attribute of a different type (like String or Integer) on a different Entity.  This is a restriction of the reference compiler el.  The problem is that we use the attribute types to drive the parser, but at compile time we don't 
know for sure the context that will be in place.  The solution is that attributes can almost be considered to exist separately from Entities, and they get assigned to Entities.  

For example, if you have entities CLIENT, and CASE, then the following will give you errors:

Client  name  String  main rw
Client  case   String  main rw   <<== ERROR: case can't be a string
Case  name   Integer main rw  <<== ERROR: name is string on Client
Case number Integer main rw
Reply all
Reply to author
Forward
0 new messages