Using eMail BC Normalized Message Properties in a Business Process
You can define normalized message properties in a BPEL process in order to
dynamically assign values to the runtime properties for the eMail Binding Component. The
normalized message properties for each JBI component are accessed from the BPEL Designer
Mapper view. When you expand a variable's Properties folder it exposes the variable's predefined
NM properties, as well as the standard BPEL-specific WSDL properties used in correlation
sets, assigns, and expressions . If the specific NM property you need is
not currently listed, additional NM properties can be added.
Normalized message properties provide the following capabilities:
-
Getting and setting transport context properties.
-
Getting and setting request parameters.
-
Dynamically configuring eMail properties.
Using Predefined Normalized Message Properties
Predefined normalized message properties are automatically available from the BPEL Designer's Mapper view.
You can use additional properties by adding them directly to the source code.
You can either define these properties using the BPEL Designer Mapper, or by
entering the code directly into the source view.
You can perform additional tasks when working with normalized message properties, such as
creating additional properties, deleting properties, creating property shortcuts, and so on. For more
information, see Using Normalized Message Properties in Oracle Java CAPS BPEL Designer and Service Engine User’s Guide.
To Define Normalized Message Properties in Mapper View
- Open the BPEL process you want to edit in the BPEL Designer.
- In Design view, select the activity to add the normalized message property to.
- In the BPEL Designer toolbar, click Mapper.
- In the Output pane, expand the variable you want to edit, expand Properties,
and then expand Email BC.
- Expand Outbound or Inbound, depending on the message type.
A list of available normalized message properties appears.
- Select the normalized message property you want to use, and use the mapper
operands to build an expression or assign a value.
For a complete list of normalized message properties for the eMail Binding Component,
see Normalized Message Properties for the eMail Binding Component.
To Define Normalized Message Properties in Source View
- Open the BPEL process you want to edit in the BPEL Designer.
- In the BPEL Designer toolbar, click Source.
The BPEL source code for the process is now visible.
- Declare the sxnmp namespace near the beginning of the process element; for example:
xmlns:sxnmp="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/NMProperty"
- Define the property using the property names listed and described in Normalized Message Properties for the eMail Binding Component.
For example,
<copy>
<from>'true'</from>
<to variable="SendEmailIn"
sxnmp:nmProperty="org.glassfish.openesb.email.inbound.usessl"/>
</copy>
Normalized Message Properties for the eMail Binding Component
Normalized message properties are either specific to the binding component being used or
generally available to all participating JBI components. The following topics describe both types
of normalized message properties.
General Normalized Message Properties
The following table lists and described the general properties that are available to
all JBI components. All property values are of the type java.lang.String.
Table 13 General Normalized Message Properties
|
|
|
org.glassfish.openesb.messaging.groupid |
Group ID |
Uniquely identifies a message with the
group to which a message belongs. This property is optional. |
org.glassfish.openesb.messaging.messageid |
Message ID |
Uniquely identifies a
message. For batch processing this might be a record number (for example, a
particular record in a file) or a GUID. This property is mandatory. |
org.glassfish.openesb.messaging.lastrecord |
Last Record |
The value
is a string representation of boolean ("true" or "false"). This property can be
used to signal the last record in a group or the last record
in a file. This property is mandatory. |
org.glassfish.openesb.exchange.endpointname |
Endpoint Name |
The value a string representation of
the endpoint name set on the exchange. This represents the endpoint name of
the "owner" of the message, and could be made available by JBI runtime. |
|
eMail Binding Component Normalized Message Properties
The following properties are specific to the eMail Binding Component. Available properties are
different for request messages than for response messages. All property values are of
the type java.lang.String, except the Number of Attachments, which is an integer.
Table 14 eMail Binding Component NM Properties (Inbound)
|
|
|
org.glassfish.openesb.email.inbound.emailserver |
Email Server |
The name of the computer that hosts the email
server used for sending or receiving email messages. |
org.glassfish.openesb.email.inbound.port |
Port |
The port number for the email
server. |
org.glassfish.openesb.email.inbound.username |
User Name |
The user name to use for authentication on the email server. |
org.glassfish.openesb.email.inbound.password |
Password |
The
password to use for authentication on the email server. |
org.glassfish.openesb.email.inbound.usessl |
Use SSL |
An indicator of
whether to use SSL for secure connections. Specify either true or false. |
org.glassfish.openesb.email.inbound.maxmessagecount |
Maximum Message
Count |
The maximum number of message to retrieve for each polling interval. |
org.glassfish.openesb.email.inbound.ackmode |
Message Ack
Mode |
The message acknowledgement mode for the response. Specify either automatic or manual.
For automatic acknowledgements, you need to specify an operation as well. |
org.glassfish.openesb.email.inbound.ackoperation |
Message Ack Mode |
The
operation to perform when a message is acknowledged (if the Ack Mode is
automatic). Specify either markAsRead or delete.
Note - This is the second Message Ack Node
property in the list that appears on the BPEL Mapper.
|
org.glassfish.openesb.email.inbound.pollinginterval |
Polling Interval |
The time period
(in milliseconds) the eMail BC will wait between polling for new incoming email
messages. |
org.glassfish.openesb.email.inbound.saveattachmentstodir |
Save Attachments to Dir |
A local directory where you want to store any
attachments from the incoming email messages being processed. The file name is derived from
the attachment name. |
org.glassfish.openesb.email.inbound.mailfolder |
Mail Folder |
The name of the email folder from which to
read messages. |
org.glassfish.openesb.email.inbound.attachments |
Attachments File Paths |
The path to the attachment files. |
org.glassfish.openesb.email.inbound.attachments.count |
Number of Attachments |
The number
of attachments. |
|
Table 15 eMail Binding Component NM Properties (Outbound)
|
|
|
org.glassfish.openesb.email.outbound.emailserver |
Email Server |
The name of the
computer that hosts the email server to which you want to send email
messages. |
org.glassfish.openesb.email.outbound.port |
Port |
The port number of the email server. |
org.glassfish.openesb.email.outbound.username |
User Name |
The user name to use
for authentication on the email server. |
org.glassfish.openesb.email.outbound.password |
Password |
The password to use for authentication on
the email server. |
org.glassfish.openesb.email.outbound.usessl |
Use SSL |
An indicator of whether to use SSL for secure
connections. Specify either true or false. |
org.glassfish.openesb.email.outbound.location |
Location |
The recipients of email messages sent from the
eMail Binding Component. This property uses the standard mailto URL scheme (RFC 2368). Special
characters must be encoded (see RFC 2368 and RFC 1378). The corresponding message
parts (if any) take precedence over location headers. |
org.glassfish.openesb.email.outbound.sendoption |
Send Option |
The format of the email
content. Specify one of the following options:
Text Only
HTML Only
XML Only
Both Text and HTML
Both Text and XML
If no value is specified, the default
is Text Only. |
org.glassfish.openesb.email.outbound.embedimagesinhtml |
Embed Images in HTML |
An indicator of whether images are resolved
and embedded in an HTML document (with the tag <img src="absolute_URL_to_image">. The URL must
be the absolute URL in order to be embedded. Only use this property when
the Send Option is HTML Only or Both Text and HTML. |
org.glassfish.openesb.email.outbound.usesslattachmentFilePaths |
Attachment File Paths |
A
local directory where you want to store any attachments from the incoming email
messages being processed. The file name is derived from the attachment name. |
|