WebSphere Message Brokers
File: ak01015_
Writer: John Prowse

Concept topic

This build: July 31, 2007 21:31:05

User-defined properties in ESQL

A user-defined property (UDP) is a variable that is defined in your ESQL program by specifying the EXTERNAL keyword on a DECLARE statement. For example, the ESQL statement DECLARE today EXTERNAL CHARACTER 'monday' defines a user-defined property called today with an initial value 'monday'.

Before you can use a user-defined property, you must also define the property when you construct a message flow that uses it. Use the Message Flow editor to do this.

When you define a UDP using the Message Flow editor, a value and property type is also defined. The value might be a default value, which varies according to the UDP's type. The value assigned to the UDP in the Message Flow editor takes precedence over any value that you have assigned to the UDP in your ESQL program.

Before you deploy the message flow that uses the UDP, you can change the value of the UDP by using the Broker Archive editor. A deployment failure occurs if you try to deploy a message flow that contains a UDP that has had no value assigned to it.

See Configuring a message flow at deployment time using UDPs for more information.

Using UDPs, configuration data can be set easily and used just like normal constants. Because no external calls to user-written plug-ins or parsing of environment trees are involved, the ESQL code is easier to write and maintain, and performs better. Also, the parsing costs of reading data out of trees are removed. The value of the UDP is stamped into the variable at deployment time, which makes it quick to access.

You can declare UDPs only in modules or schemas.

UDPs can be accessed by any built-in node that uses ESQL:

See Accessing user-defined properties from a JavaCompute node for a description of how to access a UDP from a JavaCompute node.

Related concepts
Message flows overview
User-defined properties
ESQL variables
Related tasks
Developing message flows
Configuring a message flow at deployment time using UDPs
Accessing user-defined properties from a JavaCompute node
Related reference
ESQL variables
DECLARE statement
Message Flow editor
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:31:06

ak01015_ This topic's URL is: