Rules Guide
CHAPTER 7
This chapter describes the actions installed with your exteNd Director project. It has these sections:
For background information, see Rule and Macro Editors.
Condition and action class files, sources, and supporting files are contained in JAR files that are added to your project when you create it. The default location for the JARs in your project is ResourceSet/Web-INF/lib. These are the JARs that are added, depending on the subsystem(s) you select in the wizard:
Subsystem(s) selected |
JAR file added |
---|---|
Rule |
RuleCA.jar |
Rule and Portal |
PortalCA.jar |
Rule and Workflow |
WorkflowRE.jar |
Rule, Portal, and Content Management |
CQA.jar |
Some of the condition and action properties support the !valueOf template. Properties that support this feature have the ^ character.
You can either enter the actual value you want to use or specify a whiteboard key that holds the value you want. Use this format:
!valueOf.keyname
You can also specify a key that holds the name of another key. To get a value from another key, specify !valueOf.
anotherkey
.
For more information about the !valueOf construct, see Using whiteboard values.
The ^ template fields also support the substitution syntax for scoped paths. You can specify a scoped path using this format:
${spath}
For more information, see the section on working with scoped paths in Developing exteNd Director Applications.
Some of the conditions and actions have properties for accessing a database. These properties include JDBC Driver and Database Name. These values vary with the database and server vendors. For details, see your database and application server documentation.
Here is a list of database drivers and URL patterns for some of the databases supported in exteNd Director:
Description
Performs addition. The value you specify is added to a value stored in a whiteboard key. The whiteboard key then contains the new, incremented value. No response status or response phrase is set.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Description
Specifies that a whiteboard key will be removed at some future time: either after a number of seconds or after a number of times accessed.
Properties
Usage
To use the activation counter, set seconds to zero. To use seconds, set the activation counter to zero.
Description
Calculates the difference in years between a date on the whiteboard and the current date and stores the difference in another whiteboard key. The value is saved as an integer.
Properties
Usage
Code in the application must add a key to the whiteboard using the name you specified in Date Key, or you could use the Save To Whiteboard action. The data type of its value must be Date.
Description
Removes a key and its value from the whiteboard. If the key doesn't exist, nothing happens.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates
Property |
Description |
---|---|
Detail Key ^ |
The name of the whiteboard key to be removed. |
.
Usage
If you use a template for Detail Key, you need to add the key to the whiteboard either in your application or through another action (see the Save To Whiteboard action).
Description
Creates a Vector of objects from a specified database column and makes the Vector available from the whiteboard through a specified detail key.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Property |
Description |
---|---|
Key Column ^ |
The name of the column for the SQL WHERE clause. |
User ID ^ |
The user ID expected by the database. |
Detail Key ^ |
The name of the key that holds the object Vector name. |
Password ^ |
The password expected by the database. |
Object Name ^ |
The name of the object or objects to retrieve for the SQL WHERE clause. |
SQL String ^ |
The SQL statement you want to execute. NOTE: If you are using a template key for this value, place the expression in quotesfor example: "!valueOf.mySQL" |
JDBC Driver ^ |
The Java class name for the JDBC driver.
|
Database Name ^ |
The URL for the database. The format for the URL depends on the DBMS.
|
Description
Does nothing. Use this action when you want nothing to happen if the conditions are met.
Usage
You can use the Default action as a placeholder as you work on a rule.
To set a success status code, you can use the Set Response Status action instead of the Default action. Portal code that uses the rule can check the status code to confirm that the rule ran correctly.
See also
Set Response Status action
Description
Deletes a cookie from the user's Web browser or other client. If the cookie exists, this action sets the cookie's age to zero, and that signals the browser to delete it. No status code is set. If the cookie does not exist, nothing happens.
Properties
Property |
Description |
---|---|
Cookie Name |
The name of the cookie you want to delete. |
Description
Sets the response status and response phrase. Application code can check the response status and act accordingly. The response status is set to 403 and the response phrase is set to the specified message. (Neither the console nor the log displays the response status.)
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Property |
Description |
---|---|
Message ^ |
The text to store in the response phrase. |
Usage
Application code can display this text to the user to explain what this action is doing.
Description
Displays the contents of a component.
Properties
Property |
Description |
---|---|
CID |
The component ID |
Description
Displays the cookies and their values in the Rule subsystem log. By default, the log output displays on the server console.
Usage
Use this action when debugging a rule.
See also
For information on configuring logs, see the chapter on logging information in Developing exteNd Director Applications.
Description
Displays the parameters in the request header and their values in the Rule subsystem log. By default, the log output displays on the server console.
Usage
Use this action when debugging a rule.
See also
For information on configuring logs, see the chapter on error handling in Developing exteNd Director Applications.
Description
Displays the whiteboard keys and their values in the Rule subsystem log. By default, the log output displays on the server console.
Usage
Use this action when debugging a rule.
See also
For information on configuring logs, see the chapter on logging information in Developing exteNd Director Applications.
Description
Performs division. The value you specify is divided into a value stored in a whiteboard key. The whiteboard key then contains the quotient of the division. If the divisor value is zero, the whiteboard key's value is set to the text Infinity. No response status or response phrase is set.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates
.
Description
Drops a cookie named userID into the browser with a value of the portal user's ID. No response status or response phrase is set. If the user has disabled cookies, nothing happens. Success or failure is reported in the log; the default log output is displayed on the server console.
Properties
Property |
Description |
---|---|
Maximum Number of Days |
The number of days before the cookie expires. |
Description
Executes a rule.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Property |
Description |
---|---|
Rule ID ^ |
The ID of the rule you want to fire. Specify the ID (it is displayed in the Rule Editor). |
Description
Tells the system to empty the caches that hold rules.
Description
Gets a whiteboard Timestamp value stored in a specified Date key, formats it for the current locale, and saves the result to the whiteboard in the specified Detail key. If the value for Date Key is not a valid Timestamp object, the Detail Key is set to an empty string.
Properties
See also
Set Date On Whiteboard action
Description
Gets the value of the specified cookie. Sets the response phrase to the cookie value.
Properties
Description
Gets the value of a user attribute for the current portal context. The attribute must be set on the whiteboard in the specified key.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Property |
Description |
---|---|
Key ^ |
The name of the attribute. |
See also
Set User Property action
Check User Property condition
Description
Resets the user to Anonymous and removes all key/value pairs from the whiteboard. No response status or response phrase is set.
Description
Performs multiplication. The value you specify is multiplied by a value stored in a whiteboard key. The whiteboard key then contains the result of the multiplication. No response status or response phrase is set.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Description
Returns the result of a query to the Content Management subsystem as an XML string.
Usage
This action is used by the Content Query sample application.
See also
Section on using the Content Query action in the Content Management Guide.
Description
Removes a value and its key from the whiteboard. No response status or response phrase is set.
Properties
Property |
Description |
---|---|
Whiteboard Key |
The name of the key you want to remove. |
Description
Formats a decimal value as text using the specified formatting. The formatted number is stored as text in the key specified by Detail Key. The response type is set to TEXT and the response status is set to 302.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Usage
You can add special characters such as currency and percent signs. This action does not support formatting as phone numbers and other nonarithmetic formats.
Description
Returns the opening of an HTML BODY tag with a color attribute. This action:
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Property |
Description |
---|---|
Background Color ^ |
A color value specified as text that would be recognized by a browser. You can specify a hexadecimal value (such as #FFFFFF) or a browser-supported color name. |
Description
Returns the specified text enclosed in HTML bold tags (sets the response phrase to <b>value</b>). No response status or response type is set.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Property |
Description |
---|---|
Value ^ |
The text you want to format with bold tags. |
Description
Returns the specified text preceded or followed by HTML break tags, setting the response phrase to one of the following:
This action does not set the response status or response type.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Property |
Description |
---|---|
Value ^ |
The text to which you want to add break tags. |
After |
When selected, a break tag is added after the text. |
Before |
When selected, a break tag is added before the text. |
Description
Returns HTML for a check box. Sets the response phrase to HTML that looks something like this:
<INPUT TYPE="CHECKBOX" VALUE="important" NAME="cb1" CHECKED>
This action sets the response type to TEXT and the response status to 302. If Stop Processing is checked, rule processing ends.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Description
Returns HTML for a file upload field. Sets the response phrase to HTML that looks something like this:
<INPUT TYPE="FILE" VALUE="Select a file" NAME="fileupload" ACCEPT="image/*, text/html">
This action sets the response type to TEXT and the response status to 302. If Stop Processing is checked, rule processing ends.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Description
Returns HTML for a hidden field. Sets the response phrase to HTML that looks something like this:
<INPUT TYPE="HIDDEN" VALUE="important" NAME="hfld1">
This action sets the response type to TEXT and the response status to 302. If Stop Processing is checked, rule processing ends.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Description
Returns the JavaScript code you specify enclosed in HTML SCRIPT tags. Sets the response phrase to HTML that looks something like this:
<SCRIPT LANGUAGE=JavaScript> [your code here] </SCRIPT>
This action sets the response type to TEXT and the response status to 302.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Property |
Description |
---|---|
JavaScript ^ |
The JavaScript code to be returned. |
Description
Performs a SQL query and creates an HTML SELECT element from the result set. Sets the response phrase to HTML that looks something like this:
<SELECT id=opt1 name=opt1 size=1 width= 100"> <OPTION value="portalcorpid">Official <OPTION value="anonymous">Anonymous <OPTION value="administrator">User0 <OPTION value="contentadmin">User1 <OPTION value="default">null <OPTION value="sample">Sample <OPTION value="testID">Smith </SELECT>
This action sets the response type to TEXT and the response status to 302. The result set and SQL statement are stored on the whiteboard (see the Detail Key property in the table below). If you specify a Detail Key, the rule ends after this action.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Property |
Description |
---|---|
HTML Tag |
The name of the SELECT element. The value is used for the NAME attribute. |
User ID ^ |
The user ID expected by the database. This is not usually the same as the portal user ID. |
SQL String ^ |
A SQL statement whose result set contains the values for the list. NOTE: If you are using a template key for this value, place the expression in quotesfor example: "!valueOf.mySQL" |
Key Column |
The column whose values will be used for the VALUE attribute of each OPTION element. |
Size ^ |
The value for the SIZE attribute, which specifies the number of items to display in the list. Specify 1 for a dropdown list. |
Database Name ^ |
The URL for the database. The format for the URL depends on the DBMS.
|
JDBC Driver ^ |
The Java class name for the JDBC driver.
|
Password ^ |
The password expected by the database. This is not usually the same as the portal user's password. |
Detail Key |
A name used to create whiteboard keys for the result set and SQL statement. The name is used for the result set, and name.sql is used for the SQL statement. |
Children Column |
The column containing related information. Generally this is left blank; it requires the database to be organized with parent/child relationships. |
Width (%) ^ |
The value for the WIDTH attribute, which specifies the width of the list. This attribute is ignored by some browsers. |
Description Column |
The column whose values will be used as the text of each OPTION element. |
Description
Returns HTML for a password input field. Sets the response phrase to HTML that looks something like this:
<INPUT TYPE="PASSWORD" VALUE="PASSWORD" NAME="default" SIZE="25" MAXLENGTH="50" READONLY>
This action sets the response type to TEXT and the response status to 302. If Stop Processing is checked, rule processing ends.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Description
Returns HTML for a radio button. Sets the response phrase to HTML that looks something like this:
<INPUT TYPE="RADIO" VALUE="One" NAME="radio1" CLASS="INPUT">
This action sets the response type to TEXT and the response status to 302. If Stop Processing is checked, rule processing ends.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Description
Returns HTML for a reset button. Sets the response phrase to HTML that looks something like this:
<INPUT TYPE="RESET" VALUE="Reset">
This action sets the response type to TEXT and the response status to 302. If Stop Processing is checked, rule processing ends.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Description
Returns HTML for a reset button. Sets the response phrase to HTML that looks something like this:
<INPUT TYPE="BUTTON" VALUE="Cancel" onclick="JavaScript code here">
This action sets the response type to TEXT and the response status to 302. If Stop Processing is checked, rule processing ends.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Description
Returns HTML for a submit button. Sets the response phrase to HTML that looks something like this:
<INPUT TYPE="SUBMIT" VALUE="Submit">
This action sets the response type to TEXT and the response status to 302. If Stop Processing is checked, rule processing ends.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Description
Constructs an HTML table tag, using the result set from the SQL query specified to create associated HTML table row and table data tags, and sets the result in the specified detail key.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Property |
Description |
---|---|
HTML Tag |
Appends a NAME or ID attribute to the TABLE tag element. |
User ID ^ |
The user ID expected by the database. |
SQL String ^ |
The SQL statement you want to execute. |
Border ^ |
The value for the HTML table BORDER attribute. |
Database Name ^ |
The URL for the database. The format for the URL depends on the DBMS.
|
JDBC Driver ^ |
The Java class name for the JDBC driver.
|
Query String ^ |
The value for the HTML hyperlink query string. |
Cell Spacing ^ |
The value for the HTML table CELLSPACING attribute. |
Display Headings |
When selected, appends the HTML table row for the table headings to the output buffer. |
Password ^ |
The password expected by the database. This is not necessarily the same as the application user's password. |
Cell Padding ^ |
The value for the HTML table CELLPADDING attribute. |
Detail Key |
A name used to create a whiteboard key for the result set and SQL statement. The name is used for the result set, and name.sql is used for the SQL statement. |
Width ^ |
The value for the HTML table WIDTH attribute. |
Description Column |
The value for the column name in the result set whose data is used for the HTML OPTION tag DESCRIPTION. |
Description
Returns HTML for a multiline text field. Sets the response phrase to HTML that looks something like this:
<TEXTAREA NAME="txt1" ROWS="25" COLS="50">This is where to enter text</TEXTAREA>
This action sets the response type to TEXT and the response status to 302. If Stop Processing is checked, rule processing ends.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Description
Returns HTML for a single-line text field. Sets the response phrase to HTML that looks something like this:
<INPUT TYPE="TEXT" VALUE="TEXT" NAME="default" SIZE="25" MAXLENGTH="50" READONLY>
This action sets the response type to TEXT and the response status to 302. If Stop Processing is checked, rule processing ends.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Description
Submits a SQL query and formats the result set as XML. The root element is table, and its subelements are columns and tuples:
Sets the response phrase to XML that looks something like this:
<table description="test user list" key="test" sqlString="select * from FWUSERS"> <columns count="3"> <column value="USERID"/> <column value="FIRSTNAME"/> <column value="LASTNAME"/> </columns> <tuples count="2"> <tuple number="1"> <tuple value="portalcorpid"/> <tuple value="Portal Corporate Administrator"/> <tuple value="unknown"/> </tuple> <tuple number="2"> <tuple value="anonymous"/> <tuple value="Portal Anonymous User"/> <tuple value="unknown"/> </tuple> </tuples> </table>
This action sets the response type to TEXT and the response status to 302. The result set and SQL statement are stored on the whiteboard (see the Detail Key property in the table below). If you specify a Detail Key, the rule ends after this action.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Property |
Description |
---|---|
User ID ^ |
The user ID expected by the database. This is not usually the same as the portal user ID. |
Detail Key |
A name used to create whiteboard keys for the result set and the SQL statement. The name is used for the result set, and name.sql is used for the SQL statement. |
Password ^ |
The password expected by the database. This is not usually the same as the portal user's password. |
Description |
Text that will be the value of a description attribute assigned to the root element, which is called table. |
SQL String ^ |
A SQL statement whose result set contains the data to be formatted as XML elements. NOTE: If you are using a template key for this value, place the expression in quotesfor example: "!valueOf.mySQL" |
JDBC Driver ^ |
The Java class name for the JDBC driver.
|
Database Name ^ |
The URL for the database. The format for the URL depends on the DBMS.
|
Description
Sets the context response status to 401, forcing the browser to ask for authentication.
Description
Sets the response status to 412, which signifies the boolean value false.
Description
Sets the response phrase to the specified text. You can use !valueOf templates to build a text value from phrases stored on the whiteboard. Sets the response type to TEXT and the response status to 302. If Stop Processing is checked, rule processing ends.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Description
Returns text associated with a whiteboard key or uses a default message. Sets the response phrase to the message, stores the message on the whiteboard, sets the response type to TEXT, sets the response status to 302, and stops rule processing.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Description
Sets the response status to 200, which signifies the boolean value true.
Description
Puts the cookies the browser has sent onto the whiteboard. The whiteboard keys are created using the cookie name as the keyname and the cookie's value as the value for the key.
See also
Save Cookies To Whiteboard condition
Description
Puts the query string from the browser on the whiteboard using the specified key.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Property |
Description |
---|---|
Whiteboard Key ^ |
The name of the whiteboard key. |
See also
Save Form Get Data To Whiteboard condition
Description
Puts the parameters in the request header on the whiteboard. The names of the request parameters are used as the whiteboard keys, and the values of the request parameters are their values.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
See also
Save Request Data To Whiteboard condition
Description
Saves a value on the whiteboard using the specified keyname. The value is set on the whiteboard. No response phrase or status is set.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Description
Sends an e-mail message to a specified e-mail address. No response phrase or status is set.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Usage
Use this action to send alerts or logging information to an administrator.
Description
Sets the value of a component parameter for the current portal context. The component parameter must already exist.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Property |
Description |
---|---|
Key ^ |
The name of the parameter. |
Value ^ |
The value for the parameter. |
Description
Creates a cookie or changes its value and expiration date. No response phrase or status is set.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Description
Sets the current date on the whiteboard with a specified key and format. The default format is a timestamp, and the default time is the runtime value. You can specify other formats and time values.
Properties
Description
Sets the context response headers in the browser to be expired. No response phrase or status is set.
Description
Sets the destination link in a workflow process.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Usage
This action is for use with a Rule link in the Workflow Editor.
Description
Sets the active pipeline's canProcessRequests flag to On/Off for this action.
NOTE: The active status is changed for this action only.
Properties
Property |
Description |
---|---|
On |
When selected, the pipeline is active for this action. |
Description
Sets a named parameter value in the HTTP response header (EbiResponse) using the keyname and value you specify. No response phrase or status is set.
Properties
Property |
Description |
---|---|
Key |
The name of the parameter being added to the response header. |
Value |
The text value associated with the parameter name. |
Description
Sets the response status to the value you specify. If your rule performs several actions, the response status will be the last status set.
Properties
Property |
Description |
---|---|
Status |
A status value. You must use one of the numeric values identified in EbiResponse.
|
Usage
To control the status value, make the Set Response Status action the last one in the rule.
Description
Sets the value of a user attribute for the current portal context. The user attribute must exist.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Property |
Description |
---|---|
Key ^ |
The name of the user attribute. |
Value ^ |
The value for the user attribute. |
Description
Sets the specified value as an Integer associated with the current workitem.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Property |
Description |
---|---|
Priority ^ |
A string value. |
Usage
This action is for use with a Rule activity or a Rule link in a workflow process.
If you use this action with a Rule link, be sure the action section also sets the next destination. See Set Next Activity action.
Description
Sets the property value for the document associated with a workitem in a workflow process. The document and property must exist and already have been added to the workitem. This action handles locking and unlocking of the document to set the property.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Property |
Description |
---|---|
Document Property ID ^ |
The ID for the property |
Document ID ^ |
The document ID |
Property Value ^ |
The property value to set |
Usage
This action is for use with a Rule activity or a Rule link in a workflow process.
If you use this action with a Rule link, be sure the action section also sets the next destination. See Set Next Activity action.
Description
Does the same as the SQL String action (next). There is no corresponding condition.
Description
Executes a SQL statement and stores the result on the whiteboard. If more than one row is returned, only the last row in the result set is saved to the whiteboard.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Property |
Description |
---|---|
User ID ^ |
The user ID expected by the database. |
Password ^ |
The password expected by the database. This is not necessarily the same as the portal user's password. |
SQL String ^ |
The SQL statement you want to execute. NOTE: If you are using a template key for this value, place the expression in quotesfor example: "!valueOf.mySQL" |
JDBC Driver ^ |
The Java class name for the JDBC driver.
|
Database Name ^ |
The URL for the database. The format for the URL depends on the DBMS.
|
See also
SQL String condition
Description
Ends processing of the current rule by throwing EboActionException. If the rule has been invoked as part of a rules pipeline, it ends the pipeline too.
Description
Performs subtraction. The value you specify is subtracted from a value stored in a whiteboard key. The whiteboard key then contains the result of the subtraction. No response status or response phrase is set.
Properties
Any property with the ^ character supports the !valueOf template construct. For more information, see Properties that support string templates.
Copyright © 2004 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved. more ...