res-jar
The res-jar Ant task creates a well-formed RuleApp archive with all its mandatory execution resources.
The deployment descriptor uses a set of subelements to identify the different resources of each ruleset in the archive.
The following table describes the res-jar element attributes and specifies whether they are mandatory or optional.
| Element attribute | Description | Mandatory/Optional |
|---|---|---|
| description | A description of the RuleApp content. | Optional |
| destfile | The destination of the stored RuleApp archive file. | Mandatory |
| displayname | The display name of the RuleApp to give a more explicit name without any constraint. Not used for the execution. | Optional |
| failonerror | If you set this attribute to false, a warning message is logged when an error occurs, but the build process is not stopped. | Optional. The default value is true. |
| name | The name of the RuleApp contained in the archive. Use only a-z, A-Z, 0-9, '_' and do not start with a digit. |
Mandatory |
| version | The version of the RuleApp that is contained in the archive is formatted with a major and minor version number. For example, 1.2. |
Optional. The default value is 1.0. |
ruleset subelement of <res-jar>
<res-jar destfile="myruleapp.jar" name="myruleapp" version="1.0">
<ruleset rulesetarchive="rulesetarchive.jar" name="myruleset" version="1.0" />
</res-jar>
The ruleset subelement defines each ruleset for the RuleApp archive. It supports a set of subelements to build the XOM file for each ruleset.
The following table describes the attributes of the ruselet subelement and specifies whether they are mandatory or optional.
| Element attribute | Description | Mandatory/optional |
|---|---|---|
| description | A description of the ruleset content. | Optional |
| displayname | The display name of the ruleset, to give a more explicit name without constraint. Not used for the execution. | Optional |
| name | The name of the ruleset. Use only a-z, A-Z, 0-9, '_' and do not start with a digit. | Mandatory |
| rulesetarchive | The ruleset archive file. | Mandatory. |
| version | The version of the ruleset is formatted with a major and minor version number. For example, 1.2. | Optional The default value is 1.0. |
property subelement of <ruleset>
The property subelement declares the properties for a ruleset. The Ant task generates a Java™ properties file that the rule engine uses at run time.
<res-jar destfile="myruleapp.jar" name="myruleapp" version="1.0">
<ruleset rulesetarchive="${ruleapp.directory}/myruleset1.jar" name="ruleset1"
version="1.0">
<property name="myruleset1Property" value="ruleset1 custom
property"/>
</ruleset>
<ruleset rulesetarchive="${ruleapp.directory}/myruleset2.jar"
name="ruleset2" version="1.0">
<property name="myruleset2Property" value="ruleset2
custom property"/>
</ruleset>
<property name="ruleapp.interceptor.classname"
value="xom.java.IlrTestInterceptor"/></res-jar>
The following table describes the attributes of the property subelement and specifies whether they are mandatory or optional.
| Element attribute | Description | Mandatory/optional |
|---|---|---|
| name | The name of the property. | Mandatory |
| value | The value of the property. | Mandatory |