ILOG JRules User Guide > Deploying Rules > Reference > RuleApp Management Using Ant > res-fetch Task

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

Table 7 res-fetch Element Attributes
Element Attribute 
Description 
Required 
ruleapp 
The name of the RuleApp in the server. 
Yes 
version 
The version of the RuleApp in the server. 
No. Default value is 1.0 
destfile 
The destination of the stored RuleApp archive file. 
Yes 
portnumber 
The port number of the Rule Execution Server Console. 
Yes 
hostname 
The host name of the server where the Rule Execution Server Console is installed. 
Yes 
userid 
The user name to log into the Rule Execution Server Console. 
No 
password 
The password linked to the user name to log into the Rule Execution Server Console. 
No 
credentialsfile 
A file containing the userid and password, encrypted when the attribute is first used. If this attribute is present, you must not use the userid and password attributes. 
No 
webapp 
The prefix of the Rule Execution Server Console. 
No. Default value is bres 
failonerror 
The default is set to true. If it is set to false, a warning message is logged when an error occurs, but the build is not stopped.  
No 
secured 
The default is set to false. If it is set to true, the task performs an HTTPS upload. 
No 

The following Ant task code provides an example of how to use the element attributes:

<res-fetch hostname="localhost" destfile="myruleapp.jar" portnumber="7001"
userid="bres" password="mypassword" ruleapp="myruleapp" version="1.0"/>

Here is an encrypted example, using the credentialsfile attribute:

<res-fetch hostname="localhost" destfile="myruleapp.jar" portnumber="7001"
credentialsfile="mypasswordfile" ruleapp="myruleapp" version="1.0"/>

where the credentials file is a text file that contains:


 
username=bres 
password=mypassword  

The file must follow the Java property files format. For more information, see http://java.sun.com/j2se/1.4.2/docs/api/java/util/Properties.html#load(java.io.InputStream). After the first execution of the res-deploy ANT task, the contents are encrypted. For example:


 
username={DES}oLHZROlruWw\= 
password={DES}als58ekruWw\=  

With encryption, the userid and password never appear in plain text in traces during the RuleApp deployment operation.

Related Concepts

RuleApps and RuleApp Projects

Related Topics

Task Mappings
Rule Execution Server Tasks
res-jar Task
res-fetch-all Task
res-deploy
res-undeploy Task
res-write-file Task
res-write-db Task
res-delete-file Task
res-delete-db Task

Related Tasks

Deploying and Exporting RuleApps

Related Samples and Tutorials

Tutorial: RuleApp Management
How to Automate Ruleset Management
How to Migrate RuleApps

Related Reference

RuleApp Management Using MBeans Accessor API
http://ant.apache.org/