If you have a static method that performs validation then you should specify the qualified name of the method in the specification field. It's needed because this JAR file is not like \openapi\examples\actiontypes having needed init/registration partsĭoes this example need to be under plugins\.validation for it to work or it can even be under plugins\validation ? It means does Cameo checks for the ID in the plugin.xml to match to the directory structure or it doesn't check and the directory name can be anything? John S Forum Beginner It's needed for the "JavaConstantNameValidationRuleImpl" example to work as it's using a different mechanism than the "ClassifierNameValidationRules" ? So I didn't need this registration in ValidationRuleExample class under init() for my other JAR file. I copied files for the "." to that other JAR file and restarted Cameo it worked and could do the validation. I have another regular plugin JAR File which has menu action options similar to the Cameo example in \openapi\examples\actiontypes I am not sure if I understand what this code is for. This code informs MD where it have to search for validation rule implementation classes. So when do we put this class path in the specification body and when in the implementation ? Could you please add this info to the documentation so that other people know that too. Why here you are saying the specification body should be empty ? In other cases and in the documentation it was the specification body which will have the class path ".validation.JavaConstantNameValidationRuleImpl". I tried this but didn't work and didn't show any error even after restart of Cameo. "implementation tag value of the validation rule should be set to: .validation.JavaConstantNameValidationRuleImpl"ġ.a On the constraint rule specification click the TAGS and choose implementation ? Under TAGS there is no implementation name what we have are:Ībbreviation, errorMessage, parentObject, parentRule, severeityġ.b On the constrait rule specification click the IMPLEMENTATION name/value and in the value put ".validation.JavaConstantNameValidationRuleImpl" Posts: 67 Posts Rating:1 Joined: Mon 7:52 pm Full name: John S If I add a dummy number like 5 to the pathĬom.JavaConstantNameValidationRuleImpl5.isJavaConstantįrom above tests it means the class is found something else is wrong.Ĭould you please let me know what's wrong and what needs to be done to make this (or any similar example with Correction (FixJavaConstantNamesAction) working? John S Forum Beginner That means it finds the class but doesn't like the method. Note2: If I add the java method to the path :Ĭom.JavaConstantNameValidationRuleImpl.isJavaConstantĪnd choose LIteralString as constraint the error says "no such method" Note1: In the case of working above the class is found and both are in the same JAR file. The error Message is : "Non-executable:No class found \Validation Profile\Rule Validation Suite When I run the validation (both active and regular) on lower right corner I get ErrorĬhecking the error it's from the system "BinaryExpressionExecutable" under \UML Standard. The documentation says for the Constraint specification I should choose the Class name it means:Ĭom.JavaConstantNameValidationRuleImplįor the Constrained element I choose "Class" and "Interface" The example "JavaConstantNameValidationRuleImpl" doesn't work * Constrained element of the constraint should be Classifier Constraint specification should be set to: The example "ClassifierNameValidationRules" works where I choose the following: I create a Validation suite (tried both regular and active one) ation ruleĬopy to plugins\validation the validation.jar and plugin.xml Does it mean this registration makes it possible that all the validation rules in this JAR are then available to the validation engine or it's just a dummy example showing how to register ?įor example right now the "ClassifierNameValidationRules" works in my validation suite is it because in that JAR file there is a registration ? or if I take this class and put it in any other regular Plugin it will still work? Question 2: What does the registration in ValidationRuleExample class does under init(). Question 1: Please see my steps below in and let me know which part I have to change ? There is only 1 word somewhere saying the "Specification" should be the implementation class name but I get an error. I went through all the documentation and comments in the code but can't make the example JavaConstantNameValidationRuleImpl in \validation directory working.
0 Comments
Leave a Reply. |