res-delete-db

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.

res-delete-db element attributes

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

Table 1. res-delete-db element attributes 
Element attribute Description Mandatory/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
driver The JDBC driver class name for the database. 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 set to true.

password The user password to log in to the database. If you set this attribute, do not use the credentialsfile attribute. Mandatory
ruleapp The RuleApp archive name to remove. Mandatory
url The JDBC URL for the database. Mandatory
userid The user ID to log in to the database. If you set this attribute, do not use the credentialsfile attribute. Mandatory
version The RuleApp archive version to remove.

Optional.

The default value is 1.0.

classpath subelement

This class path must contain the JDBC driver classes. Wherever you must specify path-like values, you can use a nested element in the following form:
<classpath>
   <pathelement path="${classpath}"/>
   <pathelement location="lib/"/>
</classpath>

RuleApp deletion from a database with no encryption

The following code sample shows how to use the element attributes:
<res-delete-db driver="com.ibm.db2.jcc.DB2Driver"
               url="jdbc:db2://localhost:50000/DB2_8RES" 
               userid="res" password="mypassword" 
               ruleapp="myruleapp" version="1.0">
   <classpath>
      <pathelement location="classes12.jar"/>
   </classpath>
</res-delete-db>

Encrypted RuleApp deletion from a database

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

The credentials file is a text file and contains 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={DES}oLHZROlruWw\=
password={DES}als58ekruWw\=

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