res-undeploy

The res-undeploy Ant task removes a RuleApp archive from a running Rule Execution Server instance.

This task removes the RuleApp from the model by using a remote call through Hypertext Transfer Protocol (HTTP) or an HTTP Over SSL (HTTPS).

res-undeploy element attributes

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

Table 1. res-undeploy element attributes
Element attribute Description Mandatory/optional
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
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

The default value is false.

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
version The version of the RuleApp in the server.

Optional.

The default value is 1.0.

webapp The context root of the Rule Execution Server console

Optional.

The default value is res.

Example: Removal with no encryption

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

Example: Encrypted removal

Here is an encrypted example, which uses the credentialsfile attribute:
<res-undeploy hostname="localhost" 
              portnumber="9080" 
              credentialsfile="mypasswordfile" 
              ruleapp="myruleapp" version="1.0"/>
The credentials file is a text file that sets the following values:
username=res
password=mypassword
The file must comply with the Java™ format for property files. See the Java documentation External link opens a new window or tab. After the first execution of the res-undeploy Ant task, the contents are encrypted. For example:
username={AES}6ee3l4NrmD3p8QTViSszow\=\=
password={AES}6ee3l4NrmD3p8QTViSszow\=\==

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