To run the CER code generator, run the following command:
build creole.generate.test.classes
The target will also run the CER rule set validator on your rule sets. If there are any errors, the CER rule set validator reports the errors and processing halts. If there are no errors, the CER generator will output generated Java classes and interfaces for your CER rule sets and rule classes.
The CER code generator will place its output in the EJBServer/build/svr/creole.gen/source directory.
Here is an example generated interface for the HelloWorld rule class:
/* * Generated by Curam CREOLE Code Generator * Generator Copyright 2008-2010 Curam Software Ltd. */ package curam.creole.ruleclass.HelloWorldRuleSet.impl; /** * Code-generated interface for tests. * <p/> * Clients must not implement this interface. */ public interface HelloWorld extends curam.creole.execution.RuleObject { /** * Code-generated accessor for tests. * @return container for the greeting attribute value */ public curam.creole.execution.AttributeValue<? extends java.lang.String> greeting(); }
You do not need to regenerate the test classes if your changes are limited to the implementation of a rule attribute (i.e. its derivation expressions). The derivations are always processed dynamically from the rule set at run time and are not present in the generated test classes.