The documentation states that the "generated Java system will contain also issue codes (as public string constants) that will be used by the generated validator when a rule fails." Unfortunately, this doesn't work in my case. Did I miss something?
Here is how I retrieve the code:
var List<Issue> validate = validate(mymodel);
var issue = validate.head;
assertNotNull("No issue code provided", issue.code);
And this is the validation which creates the issue:
checkrule CheckTClassHierachyNotCyclic for
TClass cl
from {
if (cl.superType != null) {
! superclasses(cl).contains(cl)
or
fail
error "Cycle " + cl.name + " with " + superclasses(cl)
source cl
}
}
~~~~~~
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the quick reply. I also had some standard rules failing, but no code has been issued. But maybe I was wrong. But of course, the code is also very important for checkrules.
Regards,
Jens
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The documentation states that the "generated Java system will contain also issue codes (as public string constants) that will be used by the generated validator when a rule fails." Unfortunately, this doesn't work in my case. Did I miss something?
Here is how I retrieve the code:
And this is the validation which creates the issue:
~~~~~~
I have to take a look at this.
If I remember correctly, issue codes are automatically created for standard rules, but probably not for checkrules... in that case I could fix that.
Thanks for the quick reply. I also had some standard rules failing, but no code has been issued. But maybe I was wrong. But of course, the code is also very important for checkrules.
Regards,
Jens