res-fetch

The res-fetch task downloads a specified RuleApp archive from Rule Execution Server over Hypertext Transfer Protocol (HTTP) or HTTP Over SSL (HTTPS).

res-fetch element attributes

The following table describes the res-fetch element attributes and specifies whether they are mandatory or optional.

Table 1. res-fetch element attributes
Element attribute Description Mandatory/optional
New in 8.10.3 authorizationToken

Supports token authentication by using OpenID Connect.

If you set this attribute, it takes precedence over the credentialsfile, userid, and password attributes.

Optional

credentialsfile

A file that contains the userid and password, encrypted the first time the attribute is used. If you set this attribute, do not use the userid and password attributes.

A credentials file is a text file that sets two properties: username and password.

Optional
destfile The destination of the stored RuleApp archive file. 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.

hostname The host name of the server where the Rule Execution Server console is installed. Mandatory
password The password that is linked to the user name to log in to the Rule Execution Server console. If you set this attribute, do not use the credentialsfile attribute. Optional
portnumber The port number of the Rule Execution Server console. Mandatory
ruleapp The name of the RuleApp in the server. Mandatory
secured If you set this attribute to true, the task works through an HTTPS connection. Optional
version The version of the RuleApp in the server.

Optional.

The default value is 1.0.

userid The user name to log in to the Rule Execution Server console. If you set this attribute, do not use the credentialsfile attribute.

Optional

The default value is false.

webapp The prefix of the Rule Execution Server console.

Optional.

The default value is res.

Example: RuleApp download with no encryption

The following code sample shows how to use the element attributes:
<res-fetch hostname="localhost" 
           destfile="myruleapp.jar" 
           portnumber="9080" 
           userid="res" 
           password="mypassword" 
           ruleapp="myruleapp" 
           version="1.0"/>

Example: Encrypted RuleApp download

Here is an encrypted example, which uses the credentialsfile attribute:
<res-fetch hostname="localhost" 
           destfile="myruleapp.jar" 
           portnumber="9080" 
           credentialsfile="mypasswordfile" 
           ruleapp="myruleapp" 
           version="1.0"/>
The credentials file is a text file that sets these values:
username=res
password=mypassword
The file must comply with the Java™ format for property files. For more information, see the Java documentation. After the first execution of the res-deploy Ant task, the contents are encrypted. For example:
username={AES}6ee3l4NrmD3p8QTViSszow\=\=
password={AES}6ee3l4NrmD3p8QTViSszow\=\=

With encryption, the userid and password elements are never displayed in plain text in traces during RuleApp deployment.