res-write-file
The res-write-file Ant task adds a RuleApp archive to the file persistence layer of Rule Execution Server. This task does not notify any other Rule Execution Server component.
When you deploy a RuleApp with a merging policy at the ruleset level, the RuleApp that already exists in Rule Execution Server is updated with the deployed RuleApp (description, display name, properties). If you update this RuleApp by using the Rule Execution Server console, all modifications are lost at the next deployment that applies a merging policy at the ruleset level.
res-write-file element attributes
The following table describes the res-write-file element attributes and specifies whether they are mandatory or optional.
| Element attribute | Description | Mandatory/optional |
|---|---|---|
| dir | The path of the root directory of the file persistence. | Mandatory |
| 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. |
| file | The path of the RuleApp archive to write. | Mandatory |
| mergingpolicy | The server uses the merge policy to process the RuleApp archive. This attribute can take the following values:
|
Optional. The default value is ADD_AT_END_RULESET_MERGING_POLICY. |
| versioningpolicy | The server uses the versioning policy to process the RuleApp archive. This attribute can take the following values:
|
Optional. The default value is MINOR_VERSION_POLICY. |
| resourceVersioningPolicy |
The server uses the versioning policy to process the resource in the RuleApp archive. This attribute can take the following values:
|
Optional. The default value is MAJOR_VERSION_POLICY. |
| libraryVersioningPolicy |
The server uses the versioning policy to process the library in the RuleApp archive. This attribute can take the following values:
|
Optional. The default value is MINOR_VERSION_POLICY. |
| xomRepository |
(Description) The XOM repository path = dir + xomRepository Example: The value of the xomRepository attribute cannot be the same as the name of the RuleApp archive. |
Optional. The default value is res_xom. |
Example
<target name="write-archive-to-file">
<res-write-file dir="res.data"
file="myruleapp.jar"
mergingpolicy="ADD_AT_END_MERGING_POLICY"
versioningpolicy="MAJOR_VERSION_POLICY"
resourceVersioningPolicy="MAJOR_VERSION_POLICY"
libraryVersioningPolicy="MINOR_VERSION_POLICY" />
</target>