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

The res-delete-db task removes a RuleApp archive from the database persistence of Rule Execution Server. This task does not notify any other Rule Execution Server component.

Table 14 res-delete-db Element Attributes 
Element Attribute 
Description 
Required 
ruleapp 
The RuleApp archive name to remove. 
Yes 
userid 
The user ID to login to the database. 
Yes 
password 
The user password to login to the database. 
Yes 
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 
driver 
The JDBC driver class name for the database. 
Yes 
url 
The JDBC URL for the database. 
Yes 
version 
The RuleApp archive version to remove. 
No. Default value is1.0 
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 

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

<res-delete-db driver="oracle.jdbc.driver.OracleDriver" 
                url="jdbc:oracle:oci:@//localhost:1521/default" 
                userid="bres" password="mypassword" 
                ruleapp="myruleapp" version="1.0">
   <classpath>
      <pathelement location="classes12.jar"/>
   </classpath>
</res-write-db>

For an encrypted example, using the credentialsfile attribute, you replace the following attributes: userid="bres" password="mypassword" with the attribute: credentialsfile="mypasswordfile"

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.

classpath Subelement

This classpath should contain the JDBC driver classes. Wherever path-like values need to be specified, you can use a nested element. This takes the general form of:

<classpath>
   <pathelement path="${classpath}"/>
   <pathelement location="lib/"/>
</classpath>

Related Concepts

RuleApps and RuleApp Projects

Related Topics

Task Mappings
Rule Execution Server Tasks
res-jar Task
res-fetch Task
res-fetch-all Task
res-deploy
res-undeploy Task
res-write-file Task
res-write-db Task
res-delete-file 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