Sending Messages - Adobe 38043740 - ColdFusion Standard - Mac Development Manual

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
#
# Data Management event gateway configuration
#
# This is the destination where messages are sent.
destination=myDestination
# Host name or IP address of the LiveCycle Data Services ES Server
host=127.0.0.1
If you create a configuration file, save it in the cf_root/gateway/config/ directory, with the extension .cfg.
Note: A single instance of the Data Management event gateway can send messages to any destination that is registered
with the ColdFusion Data Service Adapter. However, if the destination is configured in the Data Management event
gateway configuration file, the destination in the message is ignored.

Sending messages

Your ColdFusion application sends a message to a Flex application by calling the ColdFusion SendGatewayMessage
function. In messages sent from CFML, the following structure members are translated to the Flex message:
Name
Contents
Destination of the message. This entry is required if it is not specified in the configuration file.
destination
action
Required. The notification action that is being performed:
update
Required when
item
identity
Required when
record that was deleted.
Optional. An array that contains the fills parameters that specify which fill operations to refresh.
fillparameters
newversion
Required when
previousversion
Optional. The previous record, before the update. This entry is used for conflict resolution.
changes
Optional when
the record. If you omit this entry, ColdFusion assumes that all properties changed. When you change a large
number of records, you specifying the property names can improve performance.
Required when
changes and send them in a single notification. The changes can be of different types, for example five updates,
one delete, and two creates. Each event structure must contain an action.
Example
The following example creates a structure for each event type. It then creates a structure that contains the message. The
message structure contains an array of event structures to send to Flex. The destination is the destination ID specified
in the flex-services.xml file for the instance of the Data Management event gateway to send the message to. The body
is the body of the message. The
.
or
action="create"
action="delete".
action="deleteID"
. A structure that contains the identity properties (primary key) of the
action="update"
. The record that was updated.
action="update"
. A comma-delimited list or array of property names that were updated in
. An array of structures that contain the changes. You can batch multiple
action="batch"
CFML function sends the message to the instance of the gateway.
sendGatewyMessage
Last updated 1/20/2012
create
,
delete
,
deleteID
,
refreshfill
The record that was added or deleted.
1318
, or

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents