Message Classes

This chapter provides an overview of the message classes and discusses the following topics:

See Also

Understanding PeopleSoft Integration Broker

Click to jump to parent topicUnderstanding Message Classes

You can create the following types of messages using PeopleSoft Pure Internet Architecture::

Use the PeopleCode message classes to instantiate message objects based on existing message definitions, as well as to populate the objects with data and manipulate the data. You can also use PeopleCode to publish a message.

Rowset-based messages are built on top of the rowset, row, record, and field classes, so the PeopleCode written to populate or access those types of messages looks similar to PeopleCode written to populate or access the component buffer.

Nonrowset-based messages contain XML data, and can be accessed using the XmlDoc class methods and properties.

Container messages contain parts. Each part is a separate message. A container message can contain either all rowset-based messages, or all nonrowset-based messages.

See Also

Adding Message Definitions

Accessing the Data Buffer

Click to jump to top of pageClick to jump to parent topicMessages, Service Operations and Handlers

Message definitions only define the shape of the data contained in a message. A message definition doesn't contain any other type of information, such as if the message is being used synchronously or if it's a response message.

After you create a message definition, you can use it in or more service operations. The service operation contains all the information about how the message is to be used, the routing, the queue if appropriate, and so on.

At least one handler is defined with every service operation. Handlers define additional programming to be used with processing the message associated with the service operation. The handlers can be thought of as corresponding to pre PeopleSoft 8.48 message events.

The PeopleCode for the various handlers is contained in the Integration Broker application classes.

Click to jump to top of pageClick to jump to parent topicIntegration Broker Application Classes

The Integration Broker application classes house the processing logic for asynchronous and synchronous messages. By implementing the Integration Broker application classes, you can reuse code more easily and access the other benefits of using application classes.

The following application classes are defined for Integration Broker. To access these application classes, in PeopleTools Application Designer, open the PS_PT application package, then open the Integration subpackage.

All of the Integration Broker application classes are defined as interfaces. This means that there is no native implementation of them: you must import them to your program and implement them if you want to use them.

Application Class

Methods Contained in Application Class

Comments

INotificationHandler

OnNotify

OnError

This interface is the equivalent of the Subscription event in releases prior to PeopleTools 8.48.

IPrePostNotification

OnPreNotify

OnPostNotify

OnError

This interface provides pre-processing and post-processing of segmented messages.

IReceiver

OnAckReceive

OnError

This interface is the equivalent of the OnAckReceive Message event in releases prior to PeopleTools 8.48.

IRequestHandler

OnRequest

OnError

This interface is the equivalent of the OnRequest Message event in releases prior to PeopleTools 8.48.

IRouter

OnRouteSend

OnRouteReceive

OnError

This interface is the equivalent of the OnRouteSend and OnRouteReceive Message events in releases prior to PeopleTools 8.48.

ISend

OnRequestSend

OnError

This interface is the equivalent of the OnSend Message event in releases prior to PeopleTools 8.48.

Click to jump to parent topicData Types of Message Objects

Every message class is its own data type, that is, messages are declared as data type Message, IntBroker objects are declared as type IntBroker, and so on.

The following are the data types of the message classes:

Click to jump to parent topicScope of Message Objects

The message objects can only be instantiated from PeopleCode. These objects can be used anywhere you have PeopleCode, that is, in Component Interface PeopleCode, notification PeopleCode, record field PeopleCode, application engine PeopleCode, and so on.

Click to jump to parent topicMessage Object Population

After you’ve declared and instantiated your message object, you want to populate it with data. If your data is coming from the component buffers, populating your message is easy.

A message definition can contain a hierarchy of records. A component buffer contains a hierarchy of records. If you want to copy data from a component buffer rowset to a message, the structure of the message and the component must be the same. That is, if you have a record at level two in your message and you want that data, you must have the same level zero and level one records in your message as in your component.

For example, suppose your component had the following structure (that is, that PO_INFO and PO_LINE are at the same level, and PO_DETAIL is the child of PO_INFO):

PO_HEADER PO_LINE PO_INFO PO_DETAIL

To include the information in the PO_DETAIL record, you must have at least the following record structure in your message:

PO_HEADER PO_INFO PO_DETAIL

Any records that are in the page that aren’t in the message (and vice-versa) are ignored.

After you get your message object, you can create a rowset from it. This rowset has the same structure as the message. If the message is empty, the rowset has no data. If the message has data, the rowset is automatically populated.

The following example is the simplest way of populating a message with data. This assumes that the structure of the message is the same as the structure of the page.

/* this gets all the data in the Component buffer */ &RS = GetLevel0(); ​/* this instantiates a message object */ &MSG = CreateMessage(OPERATION.MY_MESSAGE); ​/* creates a rowset with the same structure as the message */ &MSG_RS = &MSG.GetRowset(); ​/* this copies all the data from the page to the message */ &RS.CopyTo(&MSG_RS); ​/* this publishes the message */ %IntBroker.Publish(&MSG_RS);

A message rowset is the same as a Component buffer rowset, or any other rowset. It is composed of rows, records, and fields. Suppose you didn’t want to get all the data from the Component buffer, but instead wanted to populate just a particular record in your message.

To access a record in a message rowset is the same as accessing a record in a component buffer rowset. You must instantiate the rowset, then specify the row before you can access the record.

The following selects values into a record, then uses the record method CopyFieldTo to copy from the Component buffer record to the message record.

Local SQL &LN_SQL; Local Message &MSG; Local Rowset &HDR_RS, &LN_RS; Local Record &LN_REC, &ln_rec_msg; &MSG = CreateMessage(OPERATION.STOCK_REQUEST); &HDR_RS = &MSG.GetRowset(); &LN_REC = CreateRecord(Record.DEMAND_INF_INV); &LN_SQL = CreateSQL("Select * from PS_DEMAND_INF_INV where BUSINESS_UNIT= :1 and⇒ ORDER_NO = :2", &BUSINESS_UNIT, &ORDER_NO); &J = 1; While &LN_SQL.Fetch(&LN_REC) /* copy data into the Level 1 of &MSG object */ &LN_RS = &HDR_RS(&I).GetRowset(1); If &J > 1 Then &LN_RS.InsertRow(&J - 1); End-If; &ln_rec_msg = &LN_RS.GetRow(&J).GetRecord(Record.DEMAND_INF_INV); &LN_REC.CopyFieldsTo(&ln_rec_msg); &J = &J + 1; End-While;

This section also discusses items to keep in mind when:

Click to jump to top of pageClick to jump to parent topicConsiderations When Populating a Rowset From a Message

Suppose your message had two rowsets, one at level zero, a second at level one. In the message, only the level zero rowset contains any data. When you use GetRowset to create a rowset for the entire message, the rowset at level one will contain an empty row, even if there isn’t any data in it. (This is standard behavior for all rowsets.) However, you can use the IsChanged property on the record object to determine the status of the data.

The following notification PeopleCode example traverse the rowset. (Notice the use of ChildCount, ActiveRowCount, and IsChanged properties).

‘. . .’ is where application specific code would go.

&MSG_ROWSET = &MSG.GetRowset(); For &A0 = 1 To &MSG_ROWSET.ActiveRowCount /***************************/ /* Process Level 1 Records */ /*-------------------------*/ If &MSG_ROWSET(&A0).ChildCount > 0 Then For &B1 = 1 To &MSG_ROWSET(&A0).ChildCount &LEVEL1_ROWSET = &MSG_ROWSET(&A0).GetRowset(&B1); For &A1 = 1 To &LEVEL1_ROWSET.ActiveRowCount If &LEVEL1_ROWSET(&A1).GetRecord(1).IsChanged Then . . . /***************************/ /* Process Level 2 Records */ /*-------------------------*/ If &LEVEL1_ROWSET(&A1).ChildCount > 0 Then For &B2 = 1 To &LEVEL1_ROWSET(&A1).ChildCount &LEVEL2_ROWSET = &LEVEL1_ROWSET(&A1).GetRowset(&B2); For &A2 = 1 To &LEVEL2_ROWSET.ActiveRowCount If &LEVEL2_ROWSET(&A2).GetRecord(1).IsChanged Then . . . /***************************/ /* Process Level 3 Records */ /*-------------------------*/ If &LEVEL2_ROWSET(&A2).ChildCount > 0 Then For &B3 = 1 To &LEVEL1_ROWSET(&A2).ChildCount &LEVEL3_ROWSET = &LEVEL2_ROWSET(&A2).GetRowset(&B3); For &A3 = 1 To &LEVEL3_ROWSET.ActiveRowCount If &LEVEL3_ROWSET(&A3).GetRecord(1).IsChanged Then . . . End-If; /* A3 - IsChanged */ End-For; /* A3 - Loop */ End-For; /* B3 - Loop */ End-If; /* A2 - ChildCount > 0 */ /*--------------------------------*/ /* End of Process Level 3 Records */ /**********************************/ End-If; /* A2 - IsChanged */ End-For; /* A2 - Loop */ End-For; /* B2 - Loop */ End-If; /* A1 - ChildCount > 0 */ /*--------------------------------*/ /* End of Process Level 2 Records */ /**********************************/ End-If; /* A1 - IsChanged */ End-For; /* A1 - Loop */ End-For; /* B1 - Loop */ End-If; /* A0 - ChildCount > 0 */ /*--------------------------------*/ /* End of Process Level 1 Records */ /**********************************/ End-For; /* A0 - Loop */

Click to jump to top of pageClick to jump to parent topicConsiderations for Publishing and Subscribing to Partial Records

If you've selected to not publish all the fields in the message, you must be careful when inserting that data into a record.

Deselecting the Include check box in the message definition means that the field is excluded from the message definition.

When you insert the data from the message into the database, you must set the values for the fields that aren't in the message. You can use the SetDefault record class method to do this. You could also use a Component Interface based on the component the message was created from to leverage the component defaults.

See Also

SetDefault

Creating Component Interface-Based Services

Click to jump to top of pageClick to jump to parent topicConsiderations When Subscribing to Character Fields

If a message definition has character fields that are defined as uppercase, when the message is subscribed to, character data for those fields is automatically converted to uppercase.

Click to jump to parent topicMessage Segments

To make processing more efficient, you can divide a large message into pieces using message segments. Generally, you only divide asynchronous messages into segments.

Message nodes can be specified as “segment aware”. If a node is not segment aware and you send an asynchronous message that is segmented to it, you received an error message when viewing the error message log in message details on the message monitor. No publication contracts are created. If you send a synchronous message that is segmented to a node that is not segment aware, you receive an error.

There are several methods for creating, updating, and deleting segments. There are also two properties that you need to take into consideration when working with segments.

If you specify the SegmentsByDatabase property as false, you can only have the configured number defined in PSADMIN (Message Segment From DB). If you specify this property as true, you can have as many segments as you need.

The SegmentsByDatabase property also specifies whether the segments are kept in memory or written to the database when they are received. If you specify true, the segments are automatically written to the database. If you specify false, the segments are held in memory. If you specify true, then cancel out of the program processing the segments, the changes are not committed to the database.

The SegmentUnOrder property is only applicable for asynchronous messages. If you specify the SegmentUnOrder property as true, the receiving node processes the segments in parallel.

Note. You should use DeleteSegment and UpdateSegment only when writing to memory, or when SegmentsByDatabase is set to False. These methods do not work when writing to the database, or when SegmentsByDatabase is set to True.

The following is an example of how to use the segment properties and methods to send a segmented message. Note that there are only two CreateNextSegment calls. By default the first segment is automatically created. The first time you use CreateNextSegment, the message is split into two segments. The next time, you add a third segment. You don't need to call CreateNextSegment to access the third segment, it's automatically generated.

Local Message &MSG; Local Rowset &FLIGHT_PROFILE, &RS; Local boolean &Bo, &Stuff; Local string &lip; &nodes = CreateArray(""); &nodes[1] = "QE_YO"; &nodes[2] = "QE_STUFF"; QE_FLIGHTDATA.QE_ACNUMBER.Value = QE_FLIGHTDATA.QE_ACNUMBER + 1; &FLIGHT_PROFILE = GetLevel0(); &MSG = CreateMessage(OPERATION.QE_FLIGHTPLAN); /* the next lines copy the rowset into the first segment */ &MSG.CopyRowset(&FLIGHT_PROFILE); &MSG.CreateNextSegment(); /* This copies the next portion of the rowset into the next segment */ &MSG.CopyRowset(&FLIGHT_PROFILE); &MSG.CreateNextSegment(); /* This copies the last portion of the rowset into the third segment */ &MSG.CopyRowset(&FLIGHT_PROFILE); /* This specifies that the message segments can be processed separately */ &MSG.IBInfo.SegmentsUnOrder = True; %IntBroker.publish(&MSG);

The following is an example of receiving a segmented message. This would be found in a notification PeopleCode program:

Local Message &MSG; Local Rowset &rs, &rs1; Local Record &FLIGHTDATA, &REC; Local string &acnumber_value, &msi_sensor_value, &ofp_value, &actype_value,⇒ &callsign_value, &squadron_value, &comm1_value, &comm2_value, &ecm_value; Local XmlDoc &xmldoc; Local string &yo; Local boolean &bo; &CRLF = Char(13) | Char(10); &MSG = %IntBroker.GetMessage(); /* It is very important to set the rowset to null for every iteration */ /* Also, you may want to verify if the segment count is greater than 10, and if it is, set the SegmentsByDatabase property to True */ For &i = 1 To &MSG.SegmentCount &rs = Null; &MSG.GetSegment(&i); &rs = &MSG.GetRowset(); &REC = &rs(1).QE_FLIGHTDATA; &FLIGHTDATA = CreateRecord(Record.QE_FLIGHTDATA); &REC.CopyFieldsTo(&FLIGHTDATA); /* Parse out Message Data */ &acnumber_value = &FLIGHTDATA.QE_ACNUMBER.Value; &msi_sensor_value = &FLIGHTDATA.QE_MSI_SENSOR.Value; &ofp_value = &FLIGHTDATA.QE_OFP.Value; &actype_value = &FLIGHTDATA.QE_ACTYPE.Value; &callsign_value = &FLIGHTDATA.QE_CALLSIGN.Value; &squadron_value = &FLIGHTDATA.QE_SQUADRON.Value; &comm1_value = &FLIGHTDATA.QE_COMM1.Value; &comm2_value = &FLIGHTDATA.QE_COMM2.Value; &ecm_value = &FLIGHTDATA.QE_ECM.Value; &outstring = "Send Async FLight test"; /* Construct Output String */ &outstring = &outstring | &acnumber_value | &CRLF | &msi_sensor_value | &CRLF |⇒ &ofp_value | &CRLF | &actype_value | &CRLF | &callsign_value | &CRLF | &squadron_⇒ value | &CRLF | &comm1_value | &CRLF | &comm2_value | &CRLF | &ecm_value; /* Log Output String into page record */ &FLIGHTDATA.GetField(Field.DESCRLONG).Value = &outstring; SQLExec("DELETE FROM PS_QE_FLIGHTDATA"); &FLIGHTDATA.Insert(); End-For;

See Also

CreateNextSegment

SegmentsByDatabase

SegmentsUnOrder

Adding and Configuring Nodes

Click to jump to parent topicContent-Based Routing

With PeopleSoft Integration Broker, you typically define the routing information separately from the message itself. This allows you to apply multiple routings to a message and change the routings independent of the message definition.

With content-based routing, attributes of the message are used to make routing decisions. The attributes are set before the message is published. Then, within your implementation of the IRouter.OnRouteSend method, these attributes can be examined and evaluated—for example, to send the message to a defined list of nodes instead of to all nodes. Because the attributes are separate from the message data, the Message object itself does not have to be parsed and loaded into a rowset and then searched to get the routing information. This separation of routing attributes from the message data provides a performance improvement over having those routing attributes within the message content.

In the following example, the routing attributes are set with calls to the AddAttribute method of the IBInfo class:

Local Message &MSG; Local Rowset &FLIGHT_PROFILE; Local string &AC_Type, &Pilot; Local boolean &bRet; &FLIGHT_PROFILE = GetLevel0(); &MSG = CreateMessage(Operation.QE_FLIGHTPLAN); &AC_Type = GetLevel0().GetRow(1).GetRecord(Record.QE_FLIGHTDATA).AC_TYPE.Value; &Pilot = GetLevel0().GetRow(1).GetRecord(Record.QE_FLIGHTDATA).PILOT.Value; &bRet = &MSG.IBInfo.AddAttribute("ACType", &AC_Type); &bRet = &MSG.IBInfo.AddAttribute("Pilot", &Pilot); &MSG.CopyRowset(&FLIGHT_PROFILE); %IntBroker.Publish(&MSG);

Then, in the implementation-specific IRouter.OnRouteSend method, the message attributes are evaluated to make routing decisions. The OnRouteSend method does not load and examine the Message object itself, only the attributes:

import PS_PT:Integration:IRouter; class RoutingHandler implements PS_PT:Integration:IRouter; method RoutingHandler(); property array of any destinationNodes; method OnRouteSend(&MSG As Message) Returns integer; method GetDestinationList(&AC_Type As string, &Pilot As string) Returns any; end-class; /* constructor */ method RoutingHandler end-method; method OnRouteSend /+ &MSG as Message +/ /+ Returns Integer +/ /+ Extends/implements PS_PT:Integration:IRouter.OnRouteSend +/ /* Variable Declaration */ Local string &AC_Type; Local string &Pilot; Local any &aNodeList; Local integer &i; If &MSG.IBInfo.GetNumberOfAttributes() = 0 Then Return (%IntBroker_ROUTE_NONE); End-If; For &i = 1 To &MSG.IBInfo.GetNumberOfAttributes() If &MSG.IBInfo.GetAttributeName(&i) = "ACType" Then &AC_Type = &MSG.IBInfo.GetAttributeValue(&i); End-If; If &MSG.IBInfo.GetAttributeName(&i) = "Pilot" Then &Pilot = &MSG.IBInfo.GetAttributeValue(&i); End-If; End-For; /* method evaluates these strings and return NodeList */ &aNodeList = %This.GetDestinationList(&AC_Type, &Pilot); Evaluate &aNodeList When "True" Return (%IntBroker_ROUTE_ALL); Break; When "False" Return (%IntBroker_ROUTE_NONE); Break; When-Other &destinationNodes = &aNodeList.Clone(); Break; End-Evaluate; end-method; method GetDestinationList /+ &AC_Type as String, +/ /+ &Pilot as String +/ /+ Returns Any +/ /* determine node list based on input data */ Return Null; end-method;

See Also

AddAttribute

GetAttributeName

GetAttributeValue

GetNumberOfAttributes

Click to jump to parent topicError Handling

In your notification PeopleCode, you may want to validate the information received in the message. If you find that the data isn’t valid, use Exit(1) to end your PeopleCode program. This sets the status of the message to ERROR, logs any error messages to the Application Message Queues, and automatically rolls back any database changes you may have made.

There are many ways to validate the data and capture the error messages:

Write your own validation PeopleCode in the notification program:

The following example validates the Business Unit of a message against an array of valid BU's:

For &I = 1 To &ROWSET.RowCount; &POSITION = &BUArray.Find(&ROWSET(&I).GetRecord(1).BUSINESS_UNIT.Value); If &POSITION = 0 Then &Status = "ERROR: BU not Found or not Active"; &ROWSET(&I).BCT_ADJS_MSG_VW.BUSINESS_UNIT.IsEditError = True; &ROWSET(&I).BCT_ADJS_MSG_VW.BUSINESS_UNIT.MessageSetNumber = 11100; &ROWSET(&I).BCT_ADJS_MSG_VW.BUSINESS_UNIT.MessageNumber = 1230; /* The error message 11100-1230 reads: This Business Unit is */ /* not a valid, open, Inventory Business Unit */ End-If; End-For;

In the calling PeopleCode, the program calls Exit(1) based on the value of &Status.

Note. All errors for notification PeopleCode get logged to the application message error table, not to the PSMessages collection (on the session object.)

See Also

ExecuteEdits

ExecuteEdits

Processing Inbound Errors

Click to jump to parent topicMessage Classes Reference

This reference section documents the following message classes and functions:

Click to jump to parent topicMessage Class Built-In Functions

AddSystemPauseTimes

CreateMessage

DeleteSystemPauseTimes

PingNode

ReValidateNRXmlDoc

Click to jump to parent topicMessage Class Methods

In this section, we discuss the Message class methods. The methods are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicClone

Syntax

Clone()

Description

The Clone method creates an identical copy of the message, copying the data tree of the message executing the method. The Clone function sets the following properties for the resulting message object, based on the values set for the message definition created in Pure PeopleSoft Internet Architecture:

Other properties are set when the message is published or subscribed to (TransactionID, PubNodeName, and so on), or are dynamically generated at other times (Size, IsEditError, and so on.)

Clone creates a unique version of the message. If the original message changes, it is not reflected in the cloned object.

Parameters

None.

Returns

A message object.

Example

Clone could be used in a Hub and Spoke messaging environment. The Hub node uses this method during notification processing to publish a copy of the messages it receives from the Spokes.

&Msg = %IntBroker.GetMessage(); &Rowset = &Msg.GetRowset(); &Clone = &Msg.Clone(); %IntBroker.Publish(&Clone);

The hub's publication routing rules are then used to determine which spokes receive the message.

See Also

CopyRowset.

CreateMessage

Assigning Objects

Click to jump to top of pageClick to jump to parent topicCopyPartRowset

Syntax

CopyPartRowset(PartIndex, &Rowset)

Description

Use the CopyPartRowset to copy the rowset specified by &Rowset to the part of the message specified by PartIndex.

Note. This method only works with rowset-based container messages.

The primary record of the level zero rowset for both the specified message part and the specified rowset must be the same.

Parameters

PartIndex

Specify the number of the part you want to copy the rowset data to.

&Rowset

Specify an already instantiated rowset object that contains the data that you want to copy to the message part.

Returns

None.

See Also

GetPartRowset, GetPartXMLDoc.

Click to jump to top of pageClick to jump to parent topicCopyRowset

Syntax

CopyRowset(source_rowset [, record_list]);

Where record_list is a list of record names in the form:

RECORD.source_recname1, RECORD.target_recname1

[, RECORD.source_recname2, RECORD.target_recname2]. . .

Description

The CopyRowset method copies data from the source rowset to the like-named fields in the message object executing the method. This is an easy way to populate a message with data from a component.

Note. CopyRowset does not copy effective dated fields.

Note. CopyRowset copies the data, including rows that haven’t been modified. If you want to copy only data that has changed in some way, use the CopyRowsetDelta method.

See CopyRowsetDelta.

When the record names in the message and component do not match exactly, use the optional record_list to specify the records to be copied from the component into the message.

When you use the CopyRowset method to copy the contents from the source rowset to the message object, you are creating a unique copy of the object. If you change the original rowset, the message object is not changed.

Note. You can execute CopyRowset against a message only once. After a message is populated, any other CopyRowsets are ignored. If you have to populate different levels of a message rowset separately, you can use the CreateRowset method to create a rowset that has the same structure as your message, populate the created rowset, then use CopyRowset to populate your message. You can also use the Rowset CopyTo method to populate a message rowset, then populate the PSCAMA record by hand.

Parameters

source_rowset

Specifies the name of the rowset to be copied into the message object.

record_list

Specifies specific source and target records to be copied into the message object.

Returns

None.

Example

The following example copies an entire component into a message object.

&Msg = %IntBroker.GetMessage(); &Rowset = &Msg.GetRowset() &Component_Rowset = GetLevel0(); &Msg.CopyRowset(&Component_Rowset);

The following example copies a header/line page rowset into a header/line message object, using the record_list because the record names don't match:

&Msg = %IntBroker.GetMessage(); &Rowset= &Msg.GetRowset(); &Component_Rowset = GetLevel0(); &Msg.CopyRowset(&Component_Rowset, RECORD.PO_HDR_VW, RECORD.PO_HDR, ⇒ RECORD.PO_LINE_VW, RECORD.PO_LINE);

See Also

CopyRowsetDelta.

GetRowset

Rowset Class

Fill

Click to jump to top of pageClick to jump to parent topicCopyRowsetDelta

Syntax

CopyRowsetDelta(source_rowset [, record_list]);

Where record_list is a list of record names in the form:

[RECORD.source_recname1, RECORD.target_recname1

[, RECORD.source_recname2, RECORD.target_recname2]]. . .

Description

The CopyRowsetDelta method copies rows of data that have changed from the source rowset to the like-named records and like-named fields in the message object executing the method.

Note. CopyRowsetDelta copies all the like-named fields from the changed rowinto the message. It is not copying just the changed like-named fields.

When the record names in the message and component do not match exactly, use the optional record_list to specify the records to be copied from the component into the message. The specified target records must be records in your message, while the specified source records must be records in a rowset that exists in the data buffer and is populated.

This is an easy way to populate a message when the records in the message match the records in the component that the message is published from.

In addition, the CopyRowsetDelta method sets the AUDIT_ACTN field in the PSCAMA table for every row in the message. The notification process can then use PSCAMA.AUDIT_ACTN to determine how to process every row that was published.

The set values match those used in audit trail processing, that is:

Note. If a child row is inserted (or changed or deleted) CopyRowsetDelta also copies the parent row (and the parent row of that row, and so on, up to the top row) so the subscriber has a full picture of the transaction. A blank value is set in the AUDIT_ACTN field for these rows to let the subscriber know they don’t have to take action; the parent rows are there for reference only.

The Audit_Action values "A", "C", "D" are set when a record is added, changed, or deleted, respectively. In some cases such as effective-dated records, the user may change a key field value, such as Effective Date. In response to such an user action, two records are created, one with an Audit_Action value of "N", and the other with Audit_Action value "K". The "N" record has all the new values, while the "K" record retains the old values.

When you use the CopyRowsetDelta method to copy the contents from the source rowset to the message object, you are creating a unique copy of the object. If you change the original rowset, the message object is not be changed.

Note. You can execute CopyRowsetDelta against a message only once. After a message is populated, any other CopyRowsetDeltas are ignored. If you have to populate different levels of a message rowset separately, you can use the CreateRowset method to create a rowset that has the same structure as your message, populate the created rowset, then use CopyRowsetDelta to populate your message. You can also use the Rowset CopyTo method to populate a message rowset, then populate the PSCAMA record by hand.

Parameters

source_rowset

Specifies the name of the rowset to be copied into the message object.

record_list

Specifies source and target records to be copied into the message object. The target records must be records in your message, while the source records must be records in a rowset that exists in the data buffer and is populated.

Returns

None.

Example

The following example copies all the changed rows of data from a component into a message object.

&Component_Rowset = GetLevel0(); &Msg.CopyRowsetDelta(&Component_Rowset);

See Also

CopyRowset

PSCAMA

Assigning Objects

Rowset Class

GetRowset

Click to jump to top of pageClick to jump to parent topicCopyRowsetDeltaOriginal

Syntax

CopyRowsetDeltaOriginal(source_rowset [, record_list]);

Where record_list is a list of record names in the form:

[RECORD.source_recname1, RECORD.target_recname1

[, RECORD.source_recname2, RECORD.target_recname2]]. . .

Description

The CopyRowsetDeltaOriginal method copies rows of data that have changed from the source rowset to the like-named records and like-named fields in the message. It also copies the original value of the changed rows.

Note. CopyRowsetDeltaOriginal copies all the like-named fields from the changed and original rows into the message. It is not copying just the changed like-named fields.

When the record names in the message and component do not match exactly, use the optional record_list to specify the records to be copied from the component into the message. The specified target records must be records in your message, while the specified source records must be records in a rowset that exists in the data buffer and is populated.

The CopyRowsetDeltaOriginal method sets the AUDIT_ACTN field in the PSCAMA table for every row in the message. The notification process can then use PSCAMA.AUDIT_ACTN to determine how to process every row that was published.

The set values match those used in audit trail processing, that is:

Note. If a child row is inserted (or changed or deleted) CopyRowsetDeltaOriginal also copies the parent row (and the parent row of that row, and so on, up to the top row) so the subscriber has a full picture of the transaction. A blank value is set in the AUDIT_ACTN field for these rows to let the subscriber know they don’t have to take action; the parent rows are there for reference only.

The Audit_Action values "A", "C", "D" are set when a record is added, changed or deleted, respectively. When a row is changed, two records are created, one with an Audit_Action of "C", the other with Audit_Action value of "O". The "C" record has all the new values, while the "O" record retains the original values. In some cases such as effective-dated records, a user may change a key field value, such as Effective Date. In response to such an user action, two records are created, one with an Audit_Action value of "N", and the other with Audit_Action value "K". The "N" record has all the new values, while the "K" record retains the original values. The "N"/"K" combination is also created if both a key change and a non-key change is made on the same row of data.

The following table details the output from CopyRowsetDeltaOriginal:

User Action

CopyRowsetDeltaOriginal Output

Comments

Change a key.

"N" and "K" rows created.

The "K" row contains the original Key value, the "N" row, the new.

Change a Key + change a Non-Key.

"N" and "K" rows created only (that is: no "C"/"O" rows in that case).

The Key and Non-Key Original Values are both contained in the "K" row.

Change a Non-Key.

"C" and "O" rows created.

Original Value stored in "O" row.

Add non-effective dated row.

"A" row created.

No additional rows created.

Add effective-dated row and only 1 original effective-dated row exists.

"A" and "O" rows created.

"O" row contains the original effective dated row.

Add effective-dated row and more than 1 original effected dated rows exist.

"A" and "O" rows created.

"O" row contains data from row that cursor was on when the new row was added.

For example: If a rowset contains two rows (01/01/1980 and 02/02/2000), the current row is the 01/01/1980 row and the user adds a new row with today's date. The original values contain the data from the 01/01/1980.

Likewise, if a rowset contains two rows (01/01/1980 and 02/02/2000), the current row is the 02/02/2000 row and the user adds a new row with today's date. Then the original values contain the data from the 02/02/2000.

Delete a row

"D" row created.

No additional rows created.

When you use the CopyRowsetDeltaOriginal method to copy the contents from the source rowset to the message object, you are creating a unique copy of the object. If you change the original rowset, the message object is not changed.

Note. You can execute CopyRowsetDeltaOriginal against a message only once. After a message is populated, any other CopyRowsetDeltaOriginal PeopleCode statements are ignored. If you have to populate different levels of a message rowset separately, you can use the CreateRowset method to create a rowset that has the same structure as your message, populate the created rowset, then use CopyRowsetDeltaOriginal to populate your message. You can also use the Rowset CopyTo method to populate a message rowset, then populate the PSCAMA record manually.

Parameters

source_rowset

Specifies the name of the rowset to be copied into the message object.

record_list

Specifies source and target records to be copied into the message object. The target records must be records in your message, while the source records must be records in a rowset that exists in the data buffer and is populated.

Returns

None.

Example

Function Update_Dir(&MSGName As string) &MSGName = "OPERATION." | &MSGName; &MSG = CreateMessage(@(&MSGName)); &PnlRowset = GetLevel0(); &MSG.CopyRowsetDeltaOriginal(&PnlRowset); %IntBroker.Publish(&MSG); End-Function;

See Also

CopyRowset, CopyRowsetDelta.

PSCAMA

Assigning Objects

Rowset Class

Click to jump to top of pageClick to jump to parent topicCreateNextSegment

Syntax

CreateNextSegment()

Description

Use the CreateNextSegment method to divide a message into segments. You generally only divide asynchronous messages that contain a large amount of data. This method is used only when creating a message for publication, not after a message has been published.

Parameters

None.

Returns

None.

Example

See Message Segments.

See Also

CreateNextSegment, DeleteSegment, SegmentRestart, UpdateSegment, CurrentSegment, SegmentCount.

Click to jump to top of pageClick to jump to parent topicDeleteSegment

Syntax

DeleteSegment(SegmentNumber)

Description

Use the DeleteSegment method to delete the specified segment. This method is used only when creating a message for publication, not after a message has been published.

Note. You should use DeleteSegment and UpdateSegment only when writing to memory, or when SegmentsByDatabase is set to False. These methods do not work when writing to the database, or when SegmentsByDatabase is set to True.

Parameters

SegmentNumber

Specify a number indicating which segment you want to delete from the unpublished message.

Returns

None.

See Also

CreateNextSegment, GetSegment, UpdateSegment, CurrentSegment, SegmentCount.

Click to jump to top of pageClick to jump to parent topicExecuteEdits

Syntax

ExecuteEdits([editlevels]);

where editlevels is a list of values in the form:

editlevel1 [+ editlevel2] . . .]);

and where editleveln is one of the following system constants:

%Edit_DateRange

%Edit_OneZero

%Edit_PromptTable

%Edit_Required

%Edit_TranslateTable

%Edit_YesNo

Description

The ExecuteEdits method executes the standard system edits on every field for every record in the message executing the method. All edits are based on the record edits defined for the record that the message is based on. The types of edits performed depends on the editlevel. If no editlevel is specified, all system edits defined for the record definition are executed, that is:

Note. ExecuteEdits does not perform any validation on DateTime fields.

If any of the edits fail, the status of the property IsEditError is set to True for the Message Object executing the method, and any Rowset, Row, Record, or Field Objects that could be instantiated from the same data as the Message Object. In addition, the Field class properties MessageNumber and MessageSetNumber are set to the number of the returned message and message set number of the returned message, for the field generating the error.

If you want to check the field values only for a particular record, you can use the ExecuteEdits method with a record object.

In addition, if you want to dynamically set the prompt tables used for a field (with the %EditTable function) you must use the SetEditTable method.

Considerations for ExecuteEdits and SetEditTable

If an effective date is a key on the prompt table, and the record being edited doesn’t contain an effective-dated field, the current date/time is used as the key value.

If a setID is a key on the prompt table, and the record being edited doesn’t contain a setID field, the system looks for the setID on the other records in the current row first, then search parent rows.

Considerations for ExecuteEdits and Numeric Fields

A zero (0) might or might not be a valid value for a numeric field. ExecuteEdits processes numeric fields in different ways, depending on whether the field is required:

Parameters

editlevel

Specifies the standard system edits to be performed against every field on every record. If editlevel isn’t specified, all system edits are performed. editlevel can be any of the following system constants:

  • %Edit_DateRange

  • %Edit_OneZero

  • %Edit_PromptTable

  • %Edit_Required

  • %Edit_TranslateTable

  • %Edit_YesNo

Returns

None.

Example

The following is an example of a call to execute Required Field and Prompt Table edits:

&MSG.ExecuteEdits(%Edit_Required + %Edit_PromptTable);

The following is an example showing how ExecuteEdits() could be used:

&MSG.ExecuteEdits(); If &MSG.IsEditError Then Exit(1); End-If;

See Also

SetEditTable

EditError

MessageNumber

MessageSetNumber

IsEditError

ExecuteEdits

Processing Inbound Errors

Click to jump to top of pageClick to jump to parent topicFirstCorrelation

Syntax

FirstCorrelation()

Description

Use this method within an Integration Broker OnPreNotify event on the subscribing node to determine if this is the first message with this correlation ID.

Parameters

None.

Returns

A Boolean value: True if this is the first message with this correlation ID, False if a previous message with the same correlation ID has already run the OnPreNotify event.

Example

To improve the performance of correlated messages with multiple segments, use the FirstCorrelation method to run the OnPreNotify event for the first correlated message only. On the first message to be published, set the InitializeConversationId property to True. After the message is published, retrieve the transaction ID from the message. This transaction ID should be used to set the conversation ID (that is, the correlation ID) for all subsequent messages to be published.

/* On the first message to be published */ &MSG.InitializeConversationId = True; %IntBroker.Publish(&MSG); &strCorrelationID = &MSG.TransactionId; /* For all subsequent correlated messages */ &MSG.IBInfo.ConversationID = &strCorrelationID; %IntBroker.Publish(&MSG);

Then, on the susbscribing node, use the FirstCorrelation method to run the OnPreNotify event one time only:

If &MSG.FirstCorrelation() = True Then /* process the OnPreNotify event logic */ End-If;

See Also

InitializeConversationId, TransactionId.

ConversationID

Using the OnPreNotify and OnPostNotify PeopleCode Events

Click to jump to top of pageClick to jump to parent topicGenXMLPartString

Syntax

GenXMLPartString(PartIndex)

Description

Use the GenXMLPartString to create an XML string based on the message part specified by PartIndex.

Note. This method only works with rowset-based container messages.

Parameters

PartIndex

Specify the number of the part that you want to generate an XML string for.

Returns

An XML string.

See Also

GenXMLString, GetPartRowset, LoadXMLPartString.

Click to jump to top of pageClick to jump to parent topicGenXMLString

Syntax

GenXMLString()

Description

The GenXMLString method creates an XML string based on the message after it's loaded from the message buffer.

Note. This method does not support nonrowset-based messages.

Parameters

None.

Returns

An XML string.

Example

In the following example, the first thee lines of code creates the message object and copies the data from a Component buffer into the message object. The last line creates an XML string based on that message object.

&MSG = CreateMessage(OPERATION.PO_INSERT); &RS = GetLevel0(); &MSG.CopyRowset(&RS); &XML_STRING = &MSG.GenXMLString();

See Also

LoadXMLString.

Click to jump to top of pageClick to jump to parent topicGetContentString

Syntax

GetContentString([SegmentIndex])

Description

Use the GetContentString to return a string populated with the content from the specified message segment. If you don't specify a segment, the data from the first segment is used.

Parameters

SegmentIndex

Specify the message segment that you want to access.

Returns

A string populated with the content of the specified segment if successful, null otherwise.

See Also

CreateNextSegment, SetContentString.

Click to jump to top of pageClick to jump to parent topicGetDocument

Syntax

GetDocument([segmented_messsage])

Description

Use these method to get a Document object associated with this message.

Note. If a fault occurs, continue to use GetContentString to read the fault message, and not GetDocument.

Parameters

segmented_messsage

Specify a Boolean value indicating whether the message is segmented.

Returns

A Document object.

Example

Local Message &Msg; Local Document &Doc; &Msg = CreateMessage(Operation.QEFLIGHTPLAN_DOC); &Doc = &Msg.GetDocument( True); /* populate the document */ ... &Msg.CreateNextSegment(); &Doc = Null; &Doc = &Msg.GetDocument( True); /* populate the document */ ...

See Also

GetContentString.

Document Class

Click to jump to top of pageClick to jump to parent topicGetPartAliasName

Syntax

GetPartAliasName(PartIndex)

Description

Use the GetPartAliasName to access the alias of the specified message part.

Note. This method works only with container messages.

Parameters

PartIndex

Specify the message part that you want to access the alias.

Returns

A string containing the message part alias.

See Also

AliasName

Specifying Record Aliases

Click to jump to top of pageClick to jump to parent topicGetPartName

Syntax

GetPartName(PartIndex)

Description

Use the GetPartName method to return the message name of the message specified by PartIndex.

Note. This method works only with container messages.

Parameters

PartIndex

Specify the number of the message part that you want to get the name for.

Returns

A string.

See Also

CopyPartRowset, GenXMLPartString.

Click to jump to top of pageClick to jump to parent topicGetPartRowset

Syntax

GetPartRowset(PartIndex)

Description

Use the GetPartRowset to instantiate and populate a rowset object based on the specified message part in a container message.

Note. This method only works with rowset-based container messages.

Parameters

PartIndex

Specify the number of the message part that you want to instantiate and populate a rowset from.

Returns

A reference to a rowset object if successful, Null otherwise.

See Also

CopyPartRowset, GenXMLPartString.

Click to jump to top of pageClick to jump to parent topicGetPartVersion

Syntax

GetPartVersion(PartIndex)

Description

Use the GetPartVersion method to return the version number of the message part specified by PartIndex.

Note. This method only works with container messages.

Parameters

PartIndex

Specify the number of the message part that you want to access the version of.

Returns

A string containing the version number.

See Also

PartCount

Click to jump to top of pageClick to jump to parent topicGetPartXMLDoc

Syntax

GetPartXMLDoc(PartIndex)

Description

Use the GetPartXMLDoc to retrieve the message part data as an XmlDoc object.

Note. This method can only be used for a nonrowset-based message parts.

Parameters

PartIndex

Specify the message part that you want to access the data for as an XmlDoc object.

Returns

An XmlDoc object populated with the message part data.

See Also

GetXmlDoc, GetPartRowset.

Click to jump to top of pageClick to jump to parent topicGetQueryString

Syntax

GetQueryString(Parameter_Name)

Description

Use the GetQueryString method to obtain the parameter values of a query string.

Note. This method has been deprecated and remains for backward compatibility only. Use the IBConnectorInfo collection GetQueryStringArg method instead.

See Also

GetQueryStringArgName

Parameters

Parameter_Name

Specify the parameter name you want to obtain.

Returns

A string containing the value of the parameter.

Example

Local Message &request; Local Rowset &Rowset; Local String &emplid; &request = %IntBroker.GetMessage(); &Rowset = &request.GetRowset(); &emplid = &request.GetQueryString("EMPLID");

See Also

GetQueryStringArgName, GetQueryStringArgValue, SetQueryString.

Click to jump to top of pageClick to jump to parent topicGetRowset

Syntax

GetRowset([version])

Description

The GetRowset method returns a standard PeopleCode level zero rowset object for the specified message version. It creates an empty rowset for the specified message version if it doesn’t already exist. If no message version is specified, the default message version is used.

When you use the GetRowset method, you are not creating a unique copy of the object. You are making only a copy of the reference. If you change the rowset, the original message is changed.

Parameters

version

An optional parameter, specifying an existing message version as a string. If version isn’t specified, the default message version is used.

Returns

A Rowset object if successful.

Example

The following gets all the SET_CNTRL_REC rows related to the row on the page, then updates the field SETID with the value from the page. GetRowset is used to create a rowset based on the message structure, that is, an unpopulated rowset. Because the rowset is unpopulated, you can use the Fill method to populate with data from the page.

Local Message &MSG; Local Rowset &MSG_ROWSET; If FieldChanged(SETID) Then &MSG = CreateMessage(OPERATION.SET_CNTRL_REC); &MSG_ROWSET = &MSG.GetRowset(); &MSG_ROWSET.Fill("where SETCNTRLVALUE =:1 and REC_GROUP_ID =:2", SETCNTRLVALUE,⇒ REC_GROUP_ID); For &I = 1 To &MSG_ROWSET.ActiveRowCount &MSG_ROWSET.GetRow(&I).SET_CNTRL_REC.SETID.Value = SETID; &MSG_ROWSET.GetRow(&I).PSCAMA.AUDIT_ACTN.Value = "C"; End-For; %IntBroker.Publish(&MSG); End-If;

See Also

Clone

CreateMessage

Rowset Class

Assigning Objects

Click to jump to top of pageClick to jump to parent topicGetSegment

Syntax

GetSegment(SegmentNumber)

Description

Use the GetSegment method to return the specified segment. This method doesn't actually return anything, but populates the current message object with the specified segment's data.

Parameters

SegmentNumber

Specify the number of the segment you want to access.

Returns

None.

See Also

CreateNextSegment, DeleteSegment, UpdateSegment, SegmentCount.

Click to jump to top of pageClick to jump to parent topicGetURIDocument

Syntax

GetURIDocument()

Description

Use this method to retrieve the document template as defined on the service operation.

Parameters

None.

Returns

A Document object.

Example

&MSG = CreateMessage(Message.WEATHERSTATION_GET); &DOC = &MSG.GetURIDocument(); &COM = &DOC.DocumentElement; &COM.GetPropertyByName("state").Value = "Washington"; &COM.GetPropertyByName("city").Value = "Redmond"; &COM.GetPropertyByName("day").Value = "today"; &COM.GetPropertyByName("week").Value = "first"; &COM.GetPropertyByName("year").Value = "2010"; &COM.GetPropertyByName("country").Value = "USA"; &MSG.URIResourceIndex = 1; &bRet = &MSG.IBInfo.LoadRESTHeaders(); &return_message = %IntBroker.SyncRequest(&MSG);

See Also

REST Resource Definitions

Click to jump to top of pageClick to jump to parent topicGetURIResource

Syntax

GetURIResource([index])

Description

Use this method to retrieve the URI for the representational state transfer (REST) resource based on the specified index.

Parameters

index

Corresponds to the row number in the URI grid of the REST Resource Definition section of the service operation definition.

Returns

A string.

Example

&MSG = CreateMessage(Message.WEATHERSTATION_GET); &DOC = &MSG.GetURIDocument(); &STR = &MSG.GetURIResource(2);

See Also

ConversationID

REST Resource Definitions

Click to jump to top of pageClick to jump to parent topicGetXmlDoc

Syntax

GetXmlDoc()

Description

Use the GetXmlDoc method to retrieve the message data as an XmlDoc object.

Note. This method can only be used for a nonrowset-based message. If you use this method with a rowset-based message an error message is returned.

Parameters

None.

Returns

A XmlDoc object.

See Also

SetXmlDoc

XmlDoc Classes

Click to jump to top of pageClick to jump to parent topicInBoundPublish

Syntax

InBoundPublish(PubNodeName)

Description

Use the InBoundPublish method to send an asynchronous message based on a message rowset to simulate an inbound asyncronous request from an external node.

Note. This method has been deprecated and remains for backward compatibility only. Use the IntBroker class InBoundPublish method instead.

Though you are sending a message to yourself, it goes through all the inbound message processing on PubNodeName.

See Also

InBoundPublish

Parameters

PubNodeName

Specify the name of the node for which you want to test inbound message publishing.

Returns

None.

See Also

InboundPublishXmlDoc

Applying Filtering, Transformation and Translation

Click to jump to top of pageClick to jump to parent topicLoadXMLPartString

Syntax

LoadXMLPartString(PartIndex, XmlString)

Description

Use the LoadXMLPartString method to populate the part of the container message specified by PartIndex with the XML string XmlString.

Note. This method works only with container messages.

Parameters

PartIndex

Specify the number of the part of the container message that you want to populate with XML data.

XmlString

Specify the XML string to be loaded into the message part.

Returns

None.

See Also

GenXMLPartString, GenXMLString.

Click to jump to top of pageClick to jump to parent topicLoadXMLString

Syntax

LoadXMLString(XMLstring)

Description

The LoadXMLString method loads the message object executing the method with the XML string XMLstring.

Parameters

XMLString

Specify the XML string to be loaded into the message object.

Returns

None.

Example

&MSG = CreateMessage(OPERATION.PO_HEADER); &MSG.LoadXMLString(&XML_STRING);

See Also

GenXMLString.

Click to jump to top of pageClick to jump to parent topicOverrideURIResource

Syntax

OverrideURIResource(string)

Description

Use this method on the subscribing node (the consumer) to override the generated URL for a REST-based transaction.

Parameters

string

Specifies the full URL to the REST-based resource.

Returns

None.

Example

&MSG = CreateMessage(Operation.QE_WEATHERSTATION_CONSUME_GET); &MSG.OverrideURIResource("http://10.111.141.248/PSIGW/RESTListeningConnector/AKTT/⇒ WeatherStation.v1/weather/Washington");

Click to jump to top of pageClick to jump to parent topicPublish

Syntax

Publish([NodeName] [, Deferred_Mode] )

Description

The Publish method publishes a message to the application message queue for the default message version.

Note. This method has been deprecated and remains for backward compatibility only. Use the IntBroker class Publish method instead.

This method does not publish the message if the IsActive property is False.

This method publishes a message asynchronously, that is, a reply message is not automatically generated. To publish a message synchronously, use the SyncRequest method.

Note. This method supports nonrowset-based messages only if the data is populated using the SetXmlDoc method.

If the Publish method is called and the message isn't populated (either using SetXmlDoc or one of the rowset methods,) an empty message is published.

The Publish method can be called from any PeopleCode event, but is generally called from an Application Engine PeopleCode step or from a component.

When publishing from a component, you should publish messages only from the SavePostChange event, either from record field or component PeopleCode. This way, if there’s an error in your publish code, the data isn’t committed to the database. Also, since SavePostChange is the last Save event fired, you avoid locking the database while the other save processing is happening.

However, until the message is published, the tables involved with the component are locked and are not saved. To avoid problems with this, specify the Deferred_Mode property as true, so the message is published after the table data has been committed to the database.

Generally, if the message is successfully published, the PubID, and PubNodeName properties are set to the publication ID and publishing system node name, respectively. The only exception is when the Publish is performed as part of your notification PeopleCode. The notification process is always executed in deferred mode, due to performance considerations, and so the PubID is not populated.

Note. If you’re publishing a message from within an Application Engine program, the message won’t actually be published until the calling program performs a Commit.

See Also

Publish

Parameters

NodeName

Specify the node to which the message should be published.

Deferred_Mode

Specify whether the message should be published immediately or at the end of the transaction. This parameter takes a Boolean value: False, publish the message immediately, or True, defer the publication. The default value is False.

Returns

None.

Example

The following copies all the data from a page into a message and publishes it.

Local Message &MSG; Local Rowset &ROWSET; &MSG = CreateMessage(OPERATION.MESSAGE_PO): &ROWSET = GetLevel0(); &MSG.CopyRowset(&ROWSET); &MSG.Publish;

The following is an example of putting the Incremental Publish PeopleCode on a Record at Level 1 (or 2, 3). If you just do the normal publishing PeopleCode, you get as many messages as there are records at that level (because the code fires for each record).

To make sure the code fires only once, use the following code.

/*NAMES.EMPLID.WORKFLOW */ Local Message &MSG; Local Rowset &RS; &LEVEL = CurrentLevelNumber(); &CURRENT_ROW = CurrentRowNumber(&LEVEL); &TOT_ROW = ActiveRowCount(EMPLID); /* Only Publish the message once for all records on */ /* this level */ If &CURRENT_ROW = &TOT_ROW Then &MSG = CreateMessage(OPERATION.NAMES); &RS = GetRowset(); &MSG.CopyRowsetDelta(&RS); &MSG.Publish(); End-If;

See Also

IsActive, InBoundPublish.

Adding Message Definitions

InboundPublishXmlDoc

Click to jump to top of pageClick to jump to parent topicSegmentRestart

Syntax

SegmentRestart(TransactionID, Segment_index, segmentByDB)

Description

Use the SegmentRestart method to restart a message segment. This is used only in a Application Engine program, and only if check point logic is used.

Parameters

Transaction_ID

Specify the transaction ID of the message you want to restart.

Segment_Index

Specify the number of the segment that you want to restart.

SegmentByDB

Specify the segments by database.

Returns

None.

See Also

DeleteOrphanedSegments

Understanding Message Segments

Click to jump to top of pageClick to jump to parent topicSetContentString

Syntax

SetContentString(string)

Description

Use this method to set the content for the message segment for a non-rowset-based message only.

Note. An error will occur if SetContentString is used with other message types, such as rowset-based messages, document-based messages, and so on.

Parameters

string

Specifies the content of the message segment.

Returns

A Boolean value: True if the message segment was updated, False otherwise.

Example

Local Message &MSG; Local Document &DOC; Local Compound &COM, &COM1; &MSG = CreateMessage(Message.QE_WEATHERSTATION_POST); &DOC = &MSG.GetURIDocument(); &COM = &DOC.DocumentElement; &COM.GetPropertyByName("state").Value = "Washington"; &COM.GetPropertyByName("city").Value = "Redmond"; &COM.GetPropertyByName("day").Value = "today"; &COM.GetPropertyByName("week").Value = "first"; &COM.GetPropertyByName("year").Value = "2010"; &COM.GetPropertyByName("country").Value = "USA"; &MSG.URIResourceIndex = QE_FLIGHTDATA.QE_ACNUMBER; &DOC = CreateDocument("Weather", "WeatherData", "v1"); &COM1 = &DOC.DocumentElement; &COM1.GetPropertyByName("city").Value = "Troutlake"; &STR1 = %IntBroker.GetURL("WEATHERSTATION_DATA", 2, &DOC); &strHTML = GetHTMLText(HTML.WEATHER_CITIES, &STR1); &bRet = &MSG.SetContentString(&strHTML);

See Also

GetContentString

Click to jump to top of pageClick to jump to parent topicSetEditTable

Syntax

SetEditTable(%PromptField, RECORD.recordname)

Description

The SetEditTable method works with the ExecuteEdits method. It is used to set the value of a field on a record that has its prompt table defined as %PromptField value. %PromptField values are used to dynamically change the prompt record for a field.

There are several steps to setting up a field so that you can dynamically change its prompt table.

To set up a field with a dynamic prompt table:

  1. Define a field in the DERIVED record called fieldname.

  2. In the record definition for the field that you want to have a dynamic prompt table, define the prompt table for the field as %PromptField, where PromptField is the name of the field that you created in the DERIVED record.

  3. Use SetEditTable to dynamically set the prompt table.

%PromptField is the name of the field on the DERIVED work record. RECORD.recordname is the name of the record to be used as the prompt table.

&MSG.SetEditTable("%EDITTABLE1", Record.DEPARTMENT); &MSG.SetEditTable("%EDITTABLE2", Record.JOB_ID); &MSG.SetEditTable("%EDITTABLE3", Record.EMPL_DATA); &MSG.ExecuteEdits();

Every field on a record that has the prompt table field %EDITTABLE1 will have the same prompt table, such as, DEPARTMENT.

Parameters

%PromptField

Specifies the name of the field in the DERIVED record that has been defined as the prompt table for a field in a record definition.

RECORD.recordname

Specifies the name of the record definition that contains the correct standard system edits to be performed for that field in the message.

Returns

None.

See Also

ExecuteEdits

EditError

MessageNumber

MessageSetNumber

IsEditError

SetEditTable

Creating New Record Definitions

Click to jump to top of pageClick to jump to parent topicSetQueryString

Syntax

SetQueryString(Parameter_Name, Value)

Description

Use the SetQueryString method to add a parameter value to the query string.

Note. This method has been deprecated and remains for backward compatibility only. Use the IBConnectorInfo class AddQueryStringArg method instead.

See Also

AddQueryStringArg

Parameters

Parameter_Name

Specify the name of the parameter that you want to add to the query string, as a string.

Value

Specify the value of the parameter you are adding to the query string.

Returns

None.

Example

Local Message &request; &request = CreateMessage(OPERATION.QE_SALES_ORDER); . . . . . . &request.SetQueryString("BUYER", "12345");

See Also

AddQueryStringArg, GetQueryString.

Click to jump to top of pageClick to jump to parent topicSetStatus

Syntax

SetStatus(Status)

Description

Use the SetStatus method to set the status of a publication or subscription contract, much the same way you do in the message monitor.

Note. This method has been deprecated and remains for backward compatibility only. Use the IntBroker class SetStatus method instead.

You may want to use this method after an end-user has finished fixing any errors in the message data.

You can set the status of a contract to one of the following statuses:

The method is available only when the message instance has one of the following statuses:

See Also

SetStatus

Parameters

Status

Specify the status that you want to set the message to. Value are:

  • %Message_Error

  • %Message_New

  • %Message_Done

  • %Message_Started

  • %Message_Working

  • %Message_Retry

  • %Message_Timeout

  • %Message_Edited

  • %Message_Canceled

Returns

None.

See Also

Adding Message Definitions.

Click to jump to top of pageClick to jump to parent topicSetXmlDoc

Syntax

SetXmlDoc(&XmlDoc)

Description

Use the SetXmlDoc method to load a nonrowset-based message with data from an XmlDoc object.

Note. This method can only be used for nonrowset-based message. If you use this method with a rowset-based message an error message is returned.

Considerations Using SetXmlDoc

In order to wrap non-XML data in cdata wraps as part of a message that would be automatically removed when posted to the gateway, the following cdata wraps are supported:

Parameters

&XmlDoc

Specify an already instantiated, populated XmlDoc object.

Returns

None.

See Also

GetXmlDoc

XmlDoc Classes

Click to jump to top of pageClick to jump to parent topicSyncRequest

Syntax

SyncRequest([NodeName])

Description

Use the SyncRequest method to send a synchronous message for the default message version.

Note. This method has been deprecated and remains for backward compatibility only. Use the IntBroker class SyncRequest method instead.

Use the IsActive property to determine if a message is active or not before using this method.

This method sends a single message synchronously, that is a reply message is returned as a result of this method.

If you want to publish a message asynchronously, use the Publish method.

If you want to publish more than one message at a time synchronously, use the IntBroker SyncRequest method.

Note. This method supports nonrowset-based messages only if the SetXmlDoc method is used to populate the message prior to using the SyncRequest method.

The SyncRequest method can be called from any PeopleCode event, but is generally called from an Application Engine PeopleCode step or from a component.

When sending a synchronous request from a component, you should send messages only from the SavePostChange event, either from record field or component PeopleCode. This way, if there’s an error in your SyncRequest code, the data isn’t committed to the database. Also, since SavePostChange is the last Save event fired, you avoid locking the database while the other save processing is happening.

If the message is successfully sent, a response message is returned. In addition, the GUID property is updated with a unique identifier.

See Also

SyncRequest

Parameters

NodeName

Specify the name of the node that you want to send this message to.

Returns

A response message.

Example

Local Message &request, &response; Local Rowset &sales_order; &sales_order = GetLevel0(); &request = CreateMessage(OPERATION.QE_SALES_ORDER); &request.CopyRowsetDelta(&sales_order); &response = &request.SyncRequest(); If (&response.ResponseStatus = 0) Then /* do processing */ End-If;

See Also

Publish.

SyncRequest

Click to jump to top of pageClick to jump to parent topicUpdate

Syntax

Update([versionlist])

where versionlist is an arbitrary list of message versions in the following format:

version1 [, version2] . . .

Description

The Update method updates a message in the message queue with the specified message versions.

Note. This method has been deprecated and remains for backward compatibility only. Use the IntBroker class Update method instead.

If versionlist isn’t specified, the default message version is used. This method is commonly used in the OnRouteSend and OnRouteReceive PeopleCode events.

Note. This method does not support nonrowset-based messages. The Update method can't be called from notification PeopleCode.

See Also

Update

Parameters

versionlist

Specify an optional comma-separated list of message versions. If versionlist isn’t specified, the default message version is used.

Returns

None.

See Also

GetRowset

Adding Message Definitions

Click to jump to top of pageClick to jump to parent topicUpdateSegment

Syntax

UpdateSegment()

Description

Use the UpdateSegment method to update the current segment with data from the message. This method is used only when creating a message for publication, not after a message has been published.

Note. You should use DeleteSegment and UpdateSegment only when writing to memory, or when SegmentsByDatabase is set to False. These methods do not work when writing to the database, or when SegmentsByDatabase is set to True.

Parameters

None.

Returns

None.

See Also

CreateNextSegment, DeleteSegment, CurrentSegment, SegmentCount.

Click to jump to parent topicMessage Class Properties

In this section, we discuss the Message class properties. The properties are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicActionName

Description

This property returns the name of the action associated with the message, as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicAliasName

Description

This property returns the name of the alias associated with the message part executing the property.

This property is read-only.

See Also

GetPartAliasName

Specifying Record Aliases

Click to jump to top of pageClick to jump to parent topicChannelName

Description

This property references the name of the channel associated with the message definition.

Note. This property has been deprecated and remains for backward compatibility only. Use the Message class QueueName property instead.

See QueueName.

This property is set when the message is created. The message instance keys are a subset of the publication and subscription contract keys. This property is one of the message instance keys: the others are PubID and PubNodeName for asynchronous messages, GUID and PubNodeName for synchronous messages.

This property is valid for both synchronous and asynchronous messages.

This property is read-only.

Example

&CHANNEL = &MSG.ChannelName

See Also

Adding Message Definitions.

Click to jump to top of pageClick to jump to parent topicCookies

Description

This property returns or sets the cookies associated with a message.

Note. This property has been deprecated and remains for backward compatibility only. Use the IBInfo class Cookies property instead.

See Cookies.

You can accept a synchronous response message containing cookies, save those cookies in a global variable, and later return them to the target node in an outbound synchronous or asynchronous request message.

You can access this property only in an inbound synchronous response message or an outbound request message.

This property is read-write.

Example

The following is an example of receiving cookies:

Local Message &SalesRequest, &SalesResponse; Local Rowset &SALES_ORDER; Global string &SalesCookies; &SALES_ORDER = GetLevel0(); &SalesRequest = CreateMessage(OPERATION.SALES_ORDER_SYNC); &SalesRequest.CopyRowsetDelta(&SALES_ORDER); /* send the synchronous request; the return value is */ /* the response message object */ &SalesResponse = &SalesRequest.SyncRequest(); /* Retrieve cookies from the response message */ &SalesCookies = &SalesResponse.Cookies;

The following is an example of returning cookies:

Local Message &SalesRequest, &SalesResponse; Local Rowset &SALES_ORDER; Global string &SalesCookies; &SALES_ORDER = GetLevel0(); &SalesRequest = CreateMessage(OPERATION.SALES_ORDER_SYNC); &SalesRequest.CopyRowsetDelta(&SALES_ORDER); /* Insert the cookies in the request message */ &SalesRequest.Cookies = &SalesCookies; /* Send the asynchronous request */ &SalesRequest.Publish();

Click to jump to top of pageClick to jump to parent topicCurrentSegment

Description

This property returns a number, indicating which segment is the current segment.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicDefaultMessageVersion

Description

This property returns the default version of the message as a string.

Note. This property has been deprecated and remains for backward compatibility only. Use the Message class OperationVersion property instead.

See OperationVersion.

This is the message version from the pub/sub contract, not the default message version of the message defined in the current system.

This property is valid for both synchronous and asynchronous messages.

This property is read-only.

Example

Local Message &MSG; Local String &VER; &MSG = %IntBroker.GetMessage(); &VER = &MSG.DefaultMessageVersion;

Click to jump to top of pageClick to jump to parent topicDoNotPubToNodeName

Description

Use this property to set the node name of a node that you do not want to publish this message to. For example, a single node may publish and subscribe to the same message. You can use this property to prevent the system from subscribing to the same message it publishes. This can help prevent circular processing where the original publisher eventually receives the same message.

This property is only valid for asynchronous messages.

This property is read-write.

Example

&MSG.DoNotPubToNodeName = &MSG.PubNodeName; &MSG.Publish();

Click to jump to top of pageClick to jump to parent topicGUID

Description

This property returns a string representing a global unique identifier generated when the message was sent.

Note. This property has been deprecated and remains for backward compatibility only. Use the Message class TransactionId property instead.

See TransactionId.

This property returns the unique identifier used with the message.

This property is valid only for synchronous messages.

This property is read-only.

Example

Local Message &request; Local String &guid; &request = %IntBroker.GetMessage(); &guid = &request.GUID;

Click to jump to top of pageClick to jump to parent topicHTTPMethod

Description

Use this property to return an integer constant representing the HTTP request method that was specified by the subscribing node (the consumer) in REST-based service operations. The request method determines the proper response message to send.

Value

Description

%IntBroker_HTTP_GET

HTTP GET method – Requests a representation of a resource.

%IntBroker_HTTP_POST

HTTP POST method – Submits data to be processed to the specified resource. This might result in the creation of a new resource or updates to an existing resource or both.

%IntBroker_HTTP_DELETE

HTTP DELETE method – Deletes the specified resource.

%IntBroker_HTTP_PUT

HTTP PUT method – Uploads a representation of the specified resource. This might result in the creation of a new resource or updates to an existing resource or both.

%IntBroker_HTTP_HEAD

HTTP HEAD method – Requests a representation of a resource without without the response body that would be returned in a GET request.

This property is read-only.

Example

If &MSG.HTTPMethod = %IntBroker_HTTP_POST Then /* populate the POST response data */ End-If; If &MSG.HTTPMethod = %IntBroker_HTTP_GET Then /* populate the GET response data */ End-If;

Click to jump to top of pageClick to jump to parent topicHTTPResponseCode

Description

Use this property to return the HTTP response code for the transaction as an integer.

This property is read-only.

Example

&return_msg = %IntBroker.SyncRequest(&MSG); If &return_msg.ResponseStatus = %IB_Status_Success Then &nRET = &return_msg.HTTPResponseCode; End-If;

See Also

http://www.w3.org/Protocols/HTTP/HTRESP.html

Click to jump to top of pageClick to jump to parent topicIBException

Description

Use the IBException property to return a reference to an exception object. The object is populated with information about the integration broker error.

This property is read-only.

See Also

Exception Class

Click to jump to top of pageClick to jump to parent topicIBInfo

Description

Use this property to return a reference to an IBInfo object.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicInitializeConversationId

Description

Use this property to set or return a Boolean value indicating whether this is the first of a set of correlated messages. On the first message to be published, set the InitializeConversationId property to True. After the message is published, retrieve the transaction ID from the message. This transaction ID should be used to set the conversation ID (that is, the correlation ID) for all subsequent messages to be published.

This property is read-write.

See Also

FirstCorrelation, TransactionId.

ConversationID

Using the OnPreNotify and OnPostNotify PeopleCode Events

Click to jump to top of pageClick to jump to parent topicIsActive

Description

Indicates whether the message definition has been set to inactive.

Note. This property has been deprecated and remains for backward compatibility only. Use the Message class IsOperationActive property instead.

See IsOperationActive.

This property is True if the message definition is active, False if it’s been inactivated. If you have a lot of PeopleCode associated with publishing a message, you might use this property to check if the message is active before you publish it.

This property is valid for both asynchronous and synchronous messages.

This property is read-only.

Example

&MSG = CreateMessage(OPERATION.MY_MESSAGE) If &MSG.IsActive Then /* do PeopleCode processing */ &MSG.Publish(); Else /* do other processing */ End-if;

See Also

Adding Message Definitions

IsMessageActive

Click to jump to top of pageClick to jump to parent topicIsBulkLoadTruncation

Description

Use this property to return a Boolean value indicating whether the table truncation option has been selected on the bulk loader handler.

This property is read-only.

Example

If &MSG.IsBulkLoadTruncation = False Then /* then any truncation of tables would have to be performed here */ End-If;

See Also

Implementing Handlers Using Bulk Load Processing

Click to jump to top of pageClick to jump to parent topicIsDelta

Description

This property indicates if any fields in a message populated from page data have been changed since they were first loaded into the component buffer.

This is generally used in the following scenario:

You want to publish a message only if the end-user has changed a value on a page. The problem is that if the end-user makes a change to a field in the level three rowset, the IsChanged property for the top level row remains False. If the rowset is large, and you don't want to iterate through it to find a single IsChanged, you can use this property to quickly determine if something has changed at a lower level and the message should be published.

Note. This property should be used only when the message and the component do not have the same structure (that is, the same records at the same levels). If the message and the component have the same structure use the CopyRowsetDelta method instead.

This property takes a Boolean value: True if there are changed fields in the message, False otherwise.

This property is valid for both asynchronous and synchronous messages.

This property is read-only.

Example

&Msg = CreateMessage(OPERATION.MY_MESSAGE); &Msg_Rowset = &Msg.GetRowset(); /* get first level in Msg RS */ &Msg_Detail = &Msg_Rowset(1).GetRowset(); /* get detail in Msg */ &Page_Rowset = GetRowset(); /* get page */ For &I = &Page_Rowset.Rowcount &Page_Detail = &Page_Rowset.GetRow(&I).GetRowset(); &Msg_Detail.CopyRowset(&Page_Detail); End-For; /* Find if any data changed and should publish message */ If ​&Msg.IsDelta ​Then &Msg.Publish(); Else /* don't publish message and do other processing */ End-If;

See Also

CopyRowsetDelta.

Click to jump to top of pageClick to jump to parent topicIsEditError

Description

This property is True if an error has been found on any field in any record of the current message after executing the ExecuteEdits method on either a message object or a record object. This property can be used with the Field Class properties MessageSetNumber and MessageNumber to find the error message set number and error message number.

You can use this property in notification PeopleCode with the Exit function with a value of 1. This automatically rolls back any changes that were made to the database, saves the message errors to the message queue, and marks the message status as ERROR.

This property is valid for both asynchronous and synchronous messages.

This property is read-only.

Example

&MSG = %IntBroker.GetMessage(); &Rowset = &MSG.GetRowset(); &MSG.ExecuteEdits(); If &MSG.IsEditError Then Exit(1); End-If;

See Also

ExecuteEdits

MessageNumber

MessageSetNumber

Exit

Processing Inbound Errors

Click to jump to top of pageClick to jump to parent topicIsEmpty

Description

This property indicates whether the transaction occurred without error, but returned an empty XML document. An empty response object contains only the data tags:

<data></data>

This property returns a Boolean value: True, the response message is empty, False, the response message is not empty.

This property is valid only for the returned response message from a synchronous request message.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicIsLocal

Description

This property is True if the message object that was just instantiated was published locally. This property takes a Boolean value.

This property is valid for both asynchronous and synchronous messages.

This property is read-only.

Example

&MSG = %IntBroker.GetMessage(); If &MSG.IsLocal Then /* LOCAL NODE */ /* do processing specific to local node */ Else /* do processing specific to remote nodes */ End-If;

Click to jump to top of pageClick to jump to parent topicIsOperationActive

Description

Use the IsOperationActive property to determine if an operation is active or not.

This property returns a Boolean value: true if the operation is still active, false otherwise.

This property is read-only.

See Also

Adding Message Definitions

Click to jump to top of pageClick to jump to parent topicIsParts

Description

Use the IsParts property to determine if the message is a container message, that is, composed of parts.

This property only determines if a message is a container message. If you'd like to know if the message is a rowset-based message with parts, use the IsPartsStructured property instead.

This property returns a Boolean value: true if the message executing the property is a container message, false otherwise.

This property is read-only.

See Also

IsPartsStructured

Click to jump to top of pageClick to jump to parent topicIsPartsStructured

Description

Use the IsPartsStructured property to determine if the message is a container message, that is, composed of parts, as well as a rowset-based message.

This property determines if a message is a container message as well as rowset-based. If you only want to know if the message is a container message, use the IsParts property instead.

This property returns a Boolean value: true if the message executing the property is a container message that is rowset-based, false otherwise.

This property is read-only.

See Also

IsParts

Click to jump to top of pageClick to jump to parent topicIsRequest

Description

Use the IsRequest property to determine whether a message is a request message (as opposed to a response message.)

This property returns a Boolean value: true if the message object executing the property is a request message, false otherwise.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicIsSourceNodeExternal

Description

Use the IsSourceNodeExternal property to determine whether the message came from an internal system or a third-party system.

This property returns a Boolean value: true if the message originated from a third-party system, false otherwise.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicIsStructure

Description

This property indicates whether the message is rowset-based, that is, based on a rowset, or nonrowset-based that is, based on an XmlDoc. This property returns a Boolean value, true if the message is rowset-based, false otherwise.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicMessageDetail

Description

This property specifies the message detail, as a string. The message detail can be used to further identify a message.

Note. This property has been deprecated. It is no longer supported.

Click to jump to top of pageClick to jump to parent topicName

Description

This property returns the name of the message as a string.

This property is valid with both asynchronous and synchronous messages.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicNRId

Description

This property returns the non-repudiation ID as a string. This property is populated with a unique string when the message is published.

This property is only valid with messages that use non-repudiation.

This property is read-only.

See Also

Implementing Nonrepudiation.

Click to jump to top of pageClick to jump to parent topicOperationName

Description

Use the OperationName property to return the name of the operation associated with the message object executing the property, as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicOperationVersion

Description

Use the OperationVersion property to determine version for the operation associated with the message object executing the property, as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicParentTransactionId

Description

Use the ParentTransactionId property to return the parent transaction ID, that is, the ID that is generated with the original request message from a third-party system.

This property is read-only.

See Also

TransactionId

Click to jump to top of pageClick to jump to parent topicPartCount

Syntax

Use the PartCount property to determine the number of parts in a container message. This property is only valid with container messages. You will receive an error if you try to use it on a message that isn't a container message.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicPubID

Description

This property refers to the publication identifier, which is a number.

Note. This property has been deprecated and remains for backward compatibility only. Use the Message class QueueSeqId property instead.

See QueueSeqId.

It’s generated for asynchronous messages when the message is published, and is sequential, based on the number of messages published for that channel. The message instance keys are a subset of the publication and subscription contract keys. This property is one of the message instance keys: the others are ChannelName and PubNodeName.

Note. The PubID property is not populated when the message is published from a notification.

This property is valid only with asynchronous messages.

This property is read-only.

Example

&MSG.Publish(); &PUBID = &MSG.PubID;

Click to jump to top of pageClick to jump to parent topicPubNodeName

Description

This property refers to a string that contains the name of the publishing node. It is generated by the system when the message is published. The message instance keys are a subset of the publication and subscription contract keys.

This property is valid for both asynchronous and synchronous messages.

For a synchronous message, this property returns the name of the requesting node.

This property is read-only.

Example

&MSG = %IntBroker.GetMessage(); &PUBNODE = &MSG.PubNodeName;

Click to jump to top of pageClick to jump to parent topicQueueName

Description

Use the QueueName property to return the name of the queue associated with the message.

This property is read-only.

See Also

Managing Service Operation Queues

Click to jump to top of pageClick to jump to parent topicQueueSeqId

Description

Use the QueueSeqId property to return the sequence number of the message in the message queue.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicResponseStatus

Description

This property is valid only for the returned response message from a synchronous request message.

This property indicates whether a response was successful or not.

Note. This is not the same as SetStatus, which is used only with the message monitor.

This property returns a numeric value: 0, the response was successful, any other number indicates an error.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicSegmentContentTransfer

Description

Use this property to set or return a string constant indicating whether the message segment is binary or text data:

Value

Description

%ContentTransfer_Binary

Transfer this segment as binary data.

Note. Any binary data must be encoded as text, which increases its size by up to 33%.

%ContentTransfer_Default

Transfer this segment as text data.

The HTTP target connector has a property called MTOM. When this property is set to Y, the transaction uses the Message Transmission Optimization Mechanism (MTOM) protocol for message transmission, which is more efficient for binary attachments.

This property is read-write.

Example

Local Message &MSG; &MSG = CreateMessage(Message.FLIGHTDATA); &MSG.SetXmlDoc(&xmldoc); &MSG.CreateNextSegment(); &bRet = &MSG.SetContentString("your encoded image data here"); &MSG.SegmentContentType = "image/gif"; &MSG.SegmentContentTransfer = %ContentTransfer_Binary; &MSG.CreateNextSegment(); &bRet = &MSG.SetContentString("your encoded video here"); &MSG.SegmentContentType = "video/mp4"; &MSG.SegmentContentTransfer = %ContentTransfer_Binary; %IntBroker.Publish(&MSG);

See Also

SetContentString, SegmentContentType.

Sending and Receiving Binary Data

Click to jump to top of pageClick to jump to parent topicSegmentContentType

Description

Use this property to set or return a string representing the content (or MIME) type for the message segment—for example, application/pdf. This property is read-write.

Example

&MSG.SegmentContentType = "video/mp4";

See Also

SetContentString, SegmentContentTransfer.

Sending and Receiving Binary Data

Click to jump to top of pageClick to jump to parent topicSegmentCount

Description

This property returns the total number of segments for the message.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicSegmentsByDatabase

Description

Use this property to specify whether segments are stored in memory while being processed.

If you specify SegmentsByDatabase as false, you can only have the number of segments as specified in PSADMIN (Message Segment From DB). If you specify this property as true, you can have as many segments as you need.

The SegmentsByDatabase property also specifies whether the segments are kept in memory or written to the database when they are received. If you specify true, the segments are automatically written to the database. If you specify false, the segments are held in memory. If you specify true, then cancel out of the program processing the segments, the changes are not committed to the database.

This property is automatically set to true for message segments being processed using a Application Engine program.

This property is read-write.

See Also

Message Segments

SegmentsUnOrder

Click to jump to top of pageClick to jump to parent topicSize

Description

The Size property is the approximate size of the uncompressed XML data generated when the message is published. The availability and meaning of the Size property depends on the message type as follows:

The size is approximate for the following reasons:

This property can be used with the system property %MaxMessageSize in a batch Application Engine program to prevent the application from publishing a message that is too large.

This property is valid for both asynchronous and synchronous messages.

This property is read-only.

Example

If &MSG.Size > %MaxMessageSize Then &MSG.Publish(); Else /*Move more data into the message object */ End-If;

See Also

%MaxMessageSize

Sending and Receiving Messages

Click to jump to top of pageClick to jump to parent topicSubName

Description

This property refers to a string that contains the name of the notification process currently processing the message.

Note. This property has been deprecated and remains for backward compatibility only. Use the Message class ActionName property instead.

See ActionName.

It is available only when GetMessage is used in a notification PeopleCode program.

This property is only valid for asynchronous messages.

This property is read-only.

Example

&MSG = %IntBroker.GetMessage(); &SUBNAME = &MSG.SubName

Click to jump to top of pageClick to jump to parent topicSubQueueName

Description

Use the SubQueueName to return or specify the name of the sub-queue associated with the message, as a string.

This property is read-write.

See Also

Managing Service Operation Queues

Click to jump to top of pageClick to jump to parent topicSubscriptionProcessId

Description

This property returns a string containing the subscription process identifier. This is a unique sequential number.

Note. This property has been deprecated and remains for backward compatibility only. Use the Message class TransactionId property instead.

See TransactionId.

This property is populated only if the “Generate Subscription Process Instance” option is turned on in the Subscription Process definition.

The subscription process identifier corresponds to the subscription process instance, not the message instance. If there are multiple subscription processes for the same message each subscription process will have a different, unique ID.

If the subscription process terminated abnormally, its process instance is lost, and a new one is generated on the next retry (that is, there will be a gap in the sequence.)

This property is valid only for asynchronous messages.

This property is read-only.

Considerations for Using SubscriptionProcessId

Consider the following when using SubscriptionProcessId:

See Also

Sending and Receiving Messages.

Click to jump to top of pageClick to jump to parent topicTransactionId

Description

Use the TransactionId property to return the transaction ID for an already published message, as a string. This is a unique transaction identifier for the message.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicURIResourceIndex

Description

Use this property to set or return the index for the URI as an integer. This index corresponds to the row number in the URI grid of the REST Resource Definition section of the service operation definition.

This property is read-write.

Example

&MSG = CreateMessage(Message.WEATHERSTATION_GET); &DOC = &MSG.GetURIDocument(); &COM = &DOC.DocumentElement; &COM.GetPropertyByName("state").Value = "Washington"; &COM.GetPropertyByName("city").Value = "Redmond"; &COM.GetPropertyByName("day").Value = "today"; &COM.GetPropertyByName("week").Value = "first"; &COM.GetPropertyByName("year").Value = "2010"; &COM.GetPropertyByName("country").Value = "USA"; &MSG.URIResourceIndex = 1;

See Also

SegmentContentType

REST Resource Definitions

Click to jump to top of pageClick to jump to parent topicVersion

Description

Use the Version property to determine the version of the message executing the property, as a string.

This property is read-only.

Click to jump to parent topicIntBroker Class

An IntBroker object is returned from the system variable %IntBroker.

Click to jump to parent topicIntBroker Class Methods

In the following section, we discuss the IntBroker class methods. The methods are described in alphabetical order.

Click to jump to top of pageClick to jump to parent topicCancel

Syntax

Cancel(TransactionId, QueueName, DataType, SegmentIndex | TransactionIdArray, QueueNameArray, DataTypeArray, SegmentIndexArray)

Description

Use the Cancel method to programmatically cancel either a message, or a list of messages, from the message queue, much the same as you can do in the message monitor.

This method is only available when the message has one of the following statuses:

If you are specifying an array of messages to be canceled, and any message in the array fails for any reason (for example, you specify a message that doesn't have the correct status) no messages are canceled and the method return value is false.

Parameters

TransactionId | TransactionIdArray

Specify either a single transaction ID as a string, or specify an array of string containing the transaction Ids of the messages you want to cancel.

QueueName | QueueNameArray

Specify either a single queue name as a string, or specify an array of string containing the queue names that contain the messages you want to cancel.

DataType | DataTypeArray

Specify either a single data type, or an array of string containing the data types. See below for valid data types.

SegmentIndex | SegmentIndexArray

Specify either a specific segment, or an array of integer containing the segment numbers you want to cancel.

For the DataType or DataTypeArray parameters, the valid data types are:

Constant Value

Description

%IntBroker_BRK

Cancel the message for the web services gateway.

%IntBroker_PUB

Cancel the message for the publication contract.

%IntBroker_SUB

Cancel the message for the subscription contract.

Returns

A Boolean value: true if the message or messages are canceled successfully, false otherwise.

See Also

Resubmit

Click to jump to top of pageClick to jump to parent topicConnectorRequest

Syntax

ConnectorRequest(&Message)

Description

Use the ConnectorRequest method to return a response message from the connector, based on the message passed in.

You would only use this method after you had set the connector information.

Parameters

&Message

Specify an already instantiated message object to return a response message from the connector.

Returns

A reference to a message object.

Example

Local string &nonXmlData = "<?xml version=""1.0""?><data psnonxml=""yes""><!⇒ [CDATA[" | &encoded | "]]></data>"; &soapMsg = CreateXmlDoc(&nonXmlData); &reqMsg.SetXmlDoc(&soapMsg); Local Message &respMsg; %This.SetConnectorProperties(&reqMsg, &url); &respMsg = %IntBroker.ConnectorRequest(&reqMsg); If &respMsg = Null Then /* Throw exception */ %This.HandleNullSoapResponse(&soapMsg, &url); End-If;

See Also

ConnectorRequestUrl

Click to jump to top of pageClick to jump to parent topicConnectorRequestUrl

Syntax

ConnectorRequestUrl(URL)

Description

Use the ConnectorRequestUrl method to return the URL for a connector.

You must have already set the connector parameters before executing this command.

Parameters

URL

Specify an absolute URL as a string.

Returns

A string.

Example

/** * Get XML Doc from URL * * @param String - Location * @return XmlDoc - retrieved XmlDoc **/ method getXmlDocumentFromURL /+ &location as String +/ /+ Returns XmlDoc +/ Local XmlDoc &xmldoc; Local string &xmlstr; If Substring(LTrim(RTrim(Upper(&location))), 1, 4) = "HTTP" Then &xmlstr = %IntBroker.ConnectorRequestUrl(&location); Else &xmlstr = %This.getXmlContentFromFile(&location); End-If; &xmldoc = CreateXmlDoc(""); If &xmldoc.ParseXmlString(&xmlstr) Then Return &xmldoc; End-If; end-method;

See Also

ConnectorRequest

Click to jump to top of pageClick to jump to parent topicDeleteOrphanedSegments

Syntax

DeleteOrphanedSegments(TransactionId)

Description

Use the DeleteOrphanedSegments method to delete segments that might have been orphaned if you were processing message segments using a Application Engine program that had to be restarted. Since each segment is committed to the database, if the application engine program is aborted, these segments need to be deleted from the database.

Parameters

TransactionId

Specify the transaction ID that identifies the message which contains the segments you want to delete.

Returns

A Boolean value: true if the method completes successfully, false otherwise.

See Also

SegmentRestart

Understanding Message Segments

Click to jump to top of pageClick to jump to parent topicGetArchData

Syntax

GetArchData(TransactionId, SegmentIndex)

Description

Use the GetArchData method to retrieve an archived message from the message queue.

Note. This method shouldn't be used in standard message processing. It should only be used when accessing archived messages.

Parameters

TransactionId

Specify the transaction ID of the archived message you want to retrieve.

SegmentIndex

Specify the number of the segment of the archived message that you want to retrieve.

Returns

An XML string containing the archived data.

See Also

GetArchIBInfoData

Click to jump to top of pageClick to jump to parent topicGetArchIBInfoData

Syntax

GetArchIBInfoData(TransactionId, ParentTransactionId)

Description

Use the GetArchIBInfoData method to retrieve return archived IBInfo data.

Note. This method shouldn't be used in standard message processing. It should only be used when accessing archived messages.

Parameters

TransactionId

Specify the transaction ID of the archived message you want to retrieve.

ParentTransactionId

Specify the parent transaction ID, for the message.

Returns

An XML string containing the archived data.

See Also

GetArchData

Click to jump to top of pageClick to jump to parent topicGetIBInfoData

Syntax

GetIBInfoData(TransactionId, DataType)

Description

Use the GetIBInfoData to return the specified IBInfo data.

Parameters

TransactionID

Specify the transaction ID of the message that you want to access.

DataType

Specify the data type of the message you want to access. The valid values are:

 

Constant Value

Description

%IntBroker_BRK

Get the message for the web services gateway.

%IntBroker_PUB

Get the message for the publication contract.

%IntBroker_SUB

Get the message for the subscription contract.

Returns

An XML string containing the message data.

See Also

GetArchIBInfoData

Click to jump to top of pageClick to jump to parent topicGetIBTransactionIDforAE

Syntax

GetIBTransactionIDforAE(OperID, RunCtlID)

Description

Use this method to get the Integration Broker transaction ID from within an Application Engine program. You can use this transaction ID to instantiate a message object and thereby retrieve the message content data.

Parameters

OperID

Specifies the operator ID for the Application Engine program as a string.

RunCtlID

Specifies the run control ID for the Application Engine program as a string.

Returns

A string representing the transaction ID.

Example

&TransID = %IntBroker.GetIBTransactionIDforAE(&opid, &runid); &Msg = %IntBroker.GetMessage(&TransID, %IntBroker_SUB);

Click to jump to top of pageClick to jump to parent topicGetMessage

Syntax

GetMessage([TransactionId, DataType])

Description

Use the GetMessage method to return a message object.

If you specify a transaction ID and data type, the GetMessage method populates the message object with the data from that message.

If you do not specify any parameters, the GetMessage method doesn't populate the message with data. Instead, it creates a new instance of a message object. In this case, you must use another method, such as GetRowset, to populate the message object. You must always populate the message object with data before running any methods on it.

Parameters

TransactionId

Specify the transaction ID for the message that you want returned.

DataType

Specify the type of message that you want returned. The valid values are:

 

Constant Value

Description

%IntBroker_BRK

Get the message for the web services gateway.

%IntBroker_PUB

Get the message for the publication contract.

%IntBroker_SUB

Get the message for the subscription contract.

Returns

A reference to a message object if successful, Null if not successful.

Example

The following example returns a populated message object:

Local Message &MSG; Local string &TransactionId; &TransactionId = "0f3617dl-c6f4-11d9-a4bd-c12cbalbc2f9" &MSG = %IntBroker.GetMessage(&TransactionId, %IntBroker_BRK);

See Also

GetRowset

TransactionId

Click to jump to top of pageClick to jump to parent topicGetMessageErrors

Syntax

GetMessageErrors(TransactionId)

Description

Use the GetMessageErrors method to return an array that contains the errors that an application has set for the message, and have been written to the error queue. This method is generally only used with asynchronous messages.

Parameters

TransactionId

Specify the transaction ID for the message, as a string.

Returns

An array of string. If there are no error messages, the Len property of the array is 0.

Example

The following is an example of using the method for returning web services gateway error messages:

&MyErrors = %IntBroker.GetMessageErrors(&TransactionId);

See Also

SetMessageError

Processing Inbound Errors

Click to jump to top of pageClick to jump to parent topicGetMsgSchema

Syntax

GetMsgSchema(MsgName, MsgVersion)

Description

Use the GetMsgSchema method to access the saved schema for the specified message.

If you specify a message that does not have a saved schema, you receive a null value.

Parameters

MsgName

Specify the name of the message for which you want to access a schema. You can either specify the name of the message as a string, or preface the message name with the keyword Message.

MsgVersion

Specify the message version.

Returns

A string containing the message schema. If you try to get a schema for a message that does not have a saved schema, returns null.

See Also

MsgSchemaExists

Building Message Schemas

Click to jump to top of pageClick to jump to parent topicGetSyncIBInfoData

Syntax

GetSyncIBInfoData(TransactionId, %LogType [, Archive])

Description

Use the GetSyncIBInfoData method to return a log containing information about synchronous transactions.

Parameters

TransactionId

Specify the transaction ID of the published message.

LogType

Specify the type of log you want returned, based on the type of message. See below for the valid values.

Archive

Specify whether to retrieve any archived logs as well. This parameter takes a Boolean value: true to return archived logs, false otherwise. The default value is false.

For the LogType parameter, the valid values are:

Constant Value

Description

%Sync_RequestOrig

Gets the log for a sync request original data message.

%Sync_RequestTrans

Gets the log for a sync request transformed data message.

%Sync_ResponseOrig

Gets the log for a sync response original data message.

%Sync_ResponseTrans

Gets the log for a sync response transformed data message.

Returns

An XML string containing the log data.

See Also

Understanding the Integration Broker Service Operations Monitor

Click to jump to top of pageClick to jump to parent topicGetSyncLogData

Syntax

GetSyncLogData(TransactionId, %LogType [, Archive])

Description

Use the GetSyncLogData method to return a log containing information about the specified synchronous message.

You can use this information for debugging. Using this method, you can obtain the request and response data in a synchronous request, both pre- and post-transformation.

This function is used in the PeopleCode for the Message Monitor.

Parameters

TransactionId

Specify the transaction ID of the published message.

LogType

Specify the type of log you want returned, based on the type of message. See below for the valid values.

Archive

Specify whether to retrieve any archived logs as well. This parameter takes a Boolean value: true to return archived logs, false otherwise. The default value is false.

For the LogType parameter, the valid values are:

Constant Value

Description

%Sync_RequestOrig

Gets the log for a sync request original data message.

%Sync_RequestTrans

Gets the log for a sync request transformed data message.

%Sync_ResponseOrig

Gets the log for a sync response original data message.

%Sync_ResponseTrans

Gets the log for a sync response transformed data message.

Returns

An XML string containing the log data.

See Also

Understanding the Integration Broker Service Operations Monitor

Click to jump to top of pageClick to jump to parent topicGetURL

Syntax

GetURL(service_op_name, service_op_index, &doc_object, [secure_target], [encode_unsafe])

Description

Use this method to generate a fully qualified URL for any REST-based service operation resource.

Parameters

service_op_name

Specifies the Integration Broker service operation as a string.

service_op_index

Specifies the the index for the URI as an integer. This index corresponds to the row number in the URI grid of the REST Resource Definition section of the service operation definition.

&doc_object

Specifies the document template for the service operation as a Document object.

secure_target

Specifies whether the REST location is a secure target location. The default value is the non-secure target location.

encode_unsafe

Specifies whether to encode unsafe characters as a Boolean value. The default is False (no encoding).

Returns

A string populated with the fully qualified URL.

Example

HTML is generated within the OnRequest event of a REST-based provider service using links defined from other REST-based service operations. Note that the REST-based service operation resources on either the publishing node (the provider) or the subscribing node (the consumer) can be used to generate the fully qualified links.

import PS_PT:Integration:IRequestHandler; class RESThandler implements PS_PT:Integration:IRequestHandler method OnRequest(&message As Message) Returns Message; method OnError(&request As Message) Returns string; end-class; method OnRequest /+ &message as Message +/ /+ Returns Message +/ /+ Extends/implements PS_PT:Integration:IRequestHandler.OnRequest +/ Local Document &Doc_Tmpl, &DOC; Local Compound &COM_Tmpl, &COM; Local Message &response; Local string &STR, &STR1, &STR2, &STR3, &STR4, &strHTML; Local boolean &bRet; &response = CreateMessage(Operation.WEATHERSTATION_GET, %IntBroker_Response); /* read URI Document to get parms out from the request*/ &Doc_Tmpl = &message.GetURIDocument(); &COM_Tmpl = &Doc_Tmpl.DocumentElement; /* Instantiate a Document object based on the REST-based service operations ⇒ document template that you want to create a link for */ &DOC = CreateDocument("Weather", "WeatherTemplate", "v1"); &COM = &DOC.DocumentElement; /* based off the data from the request populate the Document object */ If &COM_Tmpl.GetPropertyByName("state").Value = "Washington" Then &COM.GetPropertyByName("state").Value = "Washington"; /* call new method to create fully qualified URL(s) */ &COM.GetPropertyByName("city").Value = "WhiteSalmon"; &STR = %IntBroker.GetURL("WEATHERSTATION_GET", 2, &DOC, true, true); &COM.GetPropertyByName("city").Value = "Troutlake"; &STR1 = %IntBroker.GetURL("WEATHERSTATION_GET", 2, &DOC); &COM.GetPropertyByName("city").Value = "Yakima"; &STR2 = %IntBroker.GetURL("WEATHERSTATION_GET", 2, &DOC); &COM.GetPropertyByName("city").Value = "Lyle"; &STR3 = %IntBroker.GetURL("WEATHERSTATION_GET", 2, &DOC); /* use these URLs as bind variables for the HTML definition */ &strHTML = GetHTMLText(HTML.WEATHER_CITIES, &STR, &STR1, &STR2, &STR3); /* set the data in the response message */ &bRet = &response.SetContentString(&strHTML); End-If; Return &response; end-method;

See Also

GetURIDocument

Click to jump to top of pageClick to jump to parent topicInBoundPublish

Syntax

InBoundPublish(&Message)

Description

Use the InBoundPublish method to send an asynchronous message based on the specified message to simulate an inbound asynchronous request from an external node. Although you are sending a message to yourself, it goes through all the inbound message processing that the specified message would.

Prior to call the InBoundPublish method, the Message object needs to populated with the requesting node and external operation name.

See Simulating Receiving Messages from External Nodes.

Parameters

&Message

Specify an already instantiated message object that you want to use for the message simulation.

Returns

A Boolean value, true if the message is published successfully, false otherwise.

See Also

Publish, SyncRequest.

Click to jump to top of pageClick to jump to parent topicIsOperationActive

Syntax

IsOperationActive(OperationName [,OperationVersion])

Description

Use the IsOperationActive method to determine if an operation is active or not.

Parameters

OperationName

Specify the name of the operation that you want to check the status of.

OperationVersion

Specify the version of the specified operation that you want to check the status of, as a string.

Returns

A Boolean value: true if the operation is active, false otherwise.

Click to jump to top of pageClick to jump to parent topicMsgSchemaExists

Syntax

MsgSchemaExists(MsgName, MsgVersion)

Description

Use the MsgSchemaExists method to determine if a schema has been created and saved for the specified message.

Parameters

MsgName

Specify the name of the message for which you want to access a schema. You can either specify the name of the message as a string, or preface the message name with the keyword Message.

MsgVersion

Specify the message version.

Returns

A Boolean value: true if the message schema exists, false otherwise.

See Also

GetMsgSchema

Building Message Schemas

Click to jump to top of pageClick to jump to parent topicPublish

Syntax

Publish(&Message [, &ArrayofNodeNames] [,IsEnqueued])

Description

The Publish method publishes a message to the message queue for the default message version.

This method does not publish the message if the IsOperationActive property for the message is False.

This method publishes a message asynchronously, that is, a reply message is not automatically generated. To publish a message synchronously, use the SyncRequest method.

Note. This method supports nonrowset-based messages only if the data is populated using the SetXmlDoc method.

If the Publish method is called and the message isn't populated (either using SetXmlDoc or one of the rowset methods,) an empty message is published.

The Publish method can be called from any PeopleCode event, but is generally called from an Application Engine PeopleCode step or from a component.

When publishing from a component, you should publish messages only from the SavePostChange event, either from record field or component PeopleCode. This way, if there’s an error in your publish code, the data isn’t committed to the database. Also, since SavePostChange is the last Save event fired, you avoid locking the database while the other save processing is happening.

However, until the message is published, the tables involved with the component are locked and are not saved. To avoid problems with this, specify the Deferred_Mode property as true, so the message is published after the table data has been committed to the database.

Note. If you’re publishing a message from within an Application Engine program, the message won’t actually be published until the calling program performs a Commit.

Parameters

&Message

Specify an already instantiated message object to be published.

&ArrayofNodeNames

Specify an already instantiated array of string containing the names of the nodes that you want to publish to.

IsEnqueued

Specify whether the message is to be enqueued or not. This parameter takes a Boolean value: true if the message is to be enqueued, false otherwise. The default value is false.

Returns

None.

Example

Local Message &Msg; Local Rowset &rs; Local IntBroker &Ib; &Flight_profile = GetLevel0(); &Msg = CreateMessage(Operation.ASYNC, %IntBroker_Request); &Msg.CopyRowset(&FlightProfile); &Ib = %IntBroker; &Ib.Publish(&Msg);

See Also

SyncRequest

Click to jump to top of pageClick to jump to parent topicResubmit

Syntax

Resubmit({TransactionId, QueueName, DataType, SegmentIndex} | {TransactionIdArray, QueueNameArray, DataTypeArray, SegmentIndexArray})

Description

Use the Resubmit method to programmatically resubmit either a message, or a list of messages, from the message queue, much the same as you can do in the message monitor.

You may want to use this method after an end-user has finished fixing any errors in the message data, and you want to resubmit the message, rerunning the PeopleCode.

This method is only available when the message has one of the following statuses:

If you are specifying an array of messages to be resubmitted, and any message in the array fails for any reason (for example, you specify a message that doesn't have the correct status) no messages are resubmitted and the method return value is false.

Parameters

TransactionId | TransactionIdArray

Specify either a single transaction ID as a string, or specify an array of string containing the transaction Ids of the messages you want to resubmit.

QueueName | QueueNameArray

Specify either a single queue name as a string, or specify an array of string containing the queue names that contain the messages you want to resubmit.

DataType | DataTypeArray

Specify either a single data type, or an array of string containing the data types. See below for the valid data type values.

SegmentIndex | SegmentIndexArray

Specify either a specific segment, or an array of integer containing the segment numbers you want to resubmit.

For the DataType or DataTypeArray parameters, the valid data types are:

Constant Value

Description

%IntBroker_BRK

Resubmit the message for the web services gateway.

%IntBroker_PUB

Resubmit the message for the publication contract.

%IntBroker_SUB

Resubmit the message for the subscription contract.

Returns

A Boolean value: true if the message or messages are resubmitted successfully, false otherwise.

See Also

Cancel

Click to jump to top of pageClick to jump to parent topicSetMessageError

Syntax

SetMessageError(TransactionID, MsgSet, MsgNumber, Error_Location, ParamListCounter, [Param] ...)

Description

Use the SetMessageError method to write messages to the error queue. This method is used with asynchronous messages only.

Parameters

TransactionID

Specify the transaction ID for the message as a string.

MsgSet

Specify the number of the message set that the message associated with the error is associated with.

MsgNumber

Specify the message number that you want to associate with this error.

Error_Location

Specify where the error occurred, or any additional information you want to give about the error. This is a string, and allows 254 characters.

ParamListCounter

An integer value from 0 to 4 specifying the number of Param substitution strings to be passed.

Param

Specify up to four Param values to be used as substitution strings in the message text. The first Param value is used in the first substitution (that is, for %1,) the second is used in the second (that is, for %2), and so on.

Returns

A Boolean value, true if the error message was associated correctly, false otherwise.

Example

The following is an example of setting an error message for the web services gateway:

&Rslt = %IntBroker.SetMessageError(&TransactionId, &msgset, &msgnum, "error ⇒ location", 4, &parm1, &parm2, &parm3, &parm4);

If you are passing just two parameters, then the call would be similar to this:

&Rslt = %IntBroker.SetMessageError(&TransactionId, &msgset, &msgnum, "error ⇒ location", 2, &parm1, &parm2);

See Also

Processing Inbound Errors

GetMessageErrors

Click to jump to top of pageClick to jump to parent topicSetStatus

Syntax

SetStatus(&Message, Status)

Description

Use the SetStatus method to set the status of a publication or subscription contract, much the same way you do it in the message monitor.

You may want to use this method after an end-user has finished fixing any errors in the message data.

You can set the status of a contract to one of the following statuses:

The method is available only when the message instance has one of the following statuses:

Parameters

&Message

Specify an already instantiated message object that you want to set the status for.

Status

Specify the status that you want to set the message to. Valid status are:

 

Constant Value

Description

%Operation_Canceled

Cancel the message.

%Operation_Done

Set the message to done.

%Operation_Error

Set the message to be in error.

%Operation_New

Specify the message as new.

Returns

None.

Click to jump to top of pageClick to jump to parent topicSwitchAsyncEventUserContext

Syntax

SwitchAsyncEventUserContext(UserID, LanguageCode)

Description

Use the SwitchAsyncEventUserContext method to switch the user context within an Integration Broker asynchronous event.

Parameters

UserID

Specify the user ID, as a string, to which you want to switch the context.

LanguageCode

Specify the language code, as a string, for the user ID.

Returns

A Boolean value: true if the switch user was successful, false otherwise.

Example

&returnValue = %IntBroker.SwitchAsyncEventUserContext("VP1", "ENG");

Click to jump to top of pageClick to jump to parent topicSyncRequest

Syntax

SyncRequest([&MsgArray, &NodeNames])

Description

Use the SyncRequest method to send multiple messages at the same time. You should only use this message with synchronous messages. You can also use this method to send a single synchronous message at a time, or you can use the SyncRequest Message class method.

If you want to publish messages asynchronously, use the Publish method.

Note. This method supports nonrowset-based messages only if the SetXmlDoc method is used to populate the message prior to using the SyncRequest method.

You must set the thread pool size of the application server on the receiving system to a value greater than 1 (the default) in order to process more than one message at a time.

How many threads you specify determines how many messages are worked on simultaneously. For example, if you have 10 messages in &MsgArray, and your thread pool size is 5, then only 5 messages are processed at a time.

The maximum number you can specify for your thread pool size is 10.

Parameters

&MsgArray

Specify an already instantiated array of messages that contains the messages you want to publish.

&NodeNames

Specify an already instantiated array of string containing the names of the nodes that you want to publish to. The first message in the array of messages is published to the first node, the second message is published to the second node, and so on.

Returns

An array of messages. These are the corresponding messages returned for the published messages. The first message in the returned array corresponds to the first message in the published array, the second message with the second, and so on.

Example

The following is an example of how creating and receiving a series of messages:

Local Rowset &FLIGHTPLAN, &FLIGHTPLAN_RETURN; Local Message &MSG; Local File &BI_FILE; Declare Function out_BI_results PeopleCode QE_FLIGHTDATA.QE_ACNUMBER FieldFormula; Local array of Message &messages; Local array of Message &return_mesages; &messages = CreateArrayRept(&MSG, 0); &return_mesages = CreateArrayRept(&MSG, 0); &FLIGHT_PROFILE = GetLevel0(); &messages [1] = CreateMessage(OPERATION.QE_FLIGHTPLAN_SYNC); &messages [1].CopyRowset(&FLIGHT_PROFILE); &messages [2] = CreateMessage(OPERATION.QE_FLIGHTPLAN_SYNC); &messages [2].CopyRowsetDelta(&FLIGHT_PROFILE); &return_mesages = %IntBroker.SyncRequest(&messages); &FLIGHTPLAN_RETURN = &return_mesages [1].GetRowset(); &temp = &return_mesages [1].GenXMLString(); out_BI_results(&temp); &FLIGHTPLAN_RETURN = &return_mesages [2].GetRowset(); &temp = &return_mesages [2].GenXMLString(); out_BI_results(&temp);

See Also

SyncRequest

Click to jump to top of pageClick to jump to parent topicUpdate

Syntax

Update(&Message)

Description

Use the Update method to update a message in the message queue with the specified message object.

Parameters

&Message

Specify an already instantiated and populated message object to be used to update an existing message in the message queue.

Returns

A Boolean value, true if the message is updated successfully, false otherwise.

See Also

UpdateXmlDoc

Click to jump to top of pageClick to jump to parent topicUpdateXmlDoc

Syntax

UpdateXmlDoc(&XmlDoc, TransactionId, DataType)

Description

Use the UpdateXmlDoc method to update a message in the message queue with the specified message data.

Note. This method shouldn't be used in a subscription program.

Parameters

&XmlDoc

Specify an already instantiated and populated XmlDoc object.

TransactionId

Specify the transaction ID of the message you want to update.

DataType

Specify the data type of the message that you want to update. Valid values are:

 

Constant Value

Description

%IntBroker_BRK

Update the message for the web services gateway.

%IntBroker_PUB

Update the message for the publication contract.

%IntBroker_SUB

Update the message for the subscription contract.

Returns

A Boolean value, true if the message was updated successfully, false otherwise.

See Also

Update

Click to jump to parent topicIBInfo Class

An IBInfo object is returned from the IBInfo message class property.

See Also

IBInfo

Click to jump to parent topicIBInfo Class Methods

In this section, we discuss the IBInfo class methods. The methods are discussed in alphabetical order.

All methods work with both asynchronous as well as synchronous messages unless specified

Click to jump to top of pageClick to jump to parent topicAddAEAttribute

Syntax

AddAEAttribute(Name, value)

Description

Use this method to add an attribute as a name-value pair to the Message object to be passed back to the response application class defined on the Application Engine handler.

Parameters

Name

Specifies the attribute name as a string.

value

Specifies the attribute value as a string.

Returns

A Boolean value: True if the attribute was added successfully, False otherwise.

Example

/* Add the name value pair data you want to pass to the response app class */ /* in the AE program */ &b = &MSG.IBInfo.AddAEAttribute("sail name", "NorthWave"); If &b <> True Then MessageBox(0, "", 0, 0, "error adding ae attribute"); End-If; &b = &MSG.IBInfo.AddAEAttribute("size", "4.2"); If &b <> True Then MessageBox(0, "", 0, 0, "error adding ae attribute"); End-If; &b = &MSG.IBInfo.AddAEAttribute("type", "Surflite"); If &b <> True Then MessageBox(0, "", 0, 0, "error adding ae attribute"); End-If; /* Need to call this method for the attributes to be saved and transferred */ /* correctly */ &b = &MSG.IBInfo.InsertAEResponseAttributes(); If &b <> True Then MessageBox(0, "", 0, 0, "error inserting AE response attributes"); End-If; /* *********************************************************************** */ /* In the response application class to retrieve the name-value pairs */ For &i = 1 To &MSG.IBInfo.GetNumberOfAEAttributes() &name = &MSG.IBInfo.GetAEAttributeName(&i); &value = &MSG.IBInfo.GetAEAttributeValue(&i); End-For;

See Also

ClearAEAttributes, DeleteAEAttribute, GetAEAttributeName, GetAEAttributeValue, GetNumberofAEAttributes, GetTransactionIDforAE, InsertAEResponseAttributes.

Click to jump to top of pageClick to jump to parent topicAddAttachment

Syntax

AddAttachment(Path)

Description

Use the AddAttachment method to add an attachment to a message.

Parameters

Path

Specify an absolute path, including the file name and type, as a string, of the file you want to attach to the message.

Returns

A string containing a content ID, which can be used for accessing the attachment with other methods, such as DeleteAttachment or SetAttachmentProperty.

Example

The following example shows sending an attachment with an asynchronous message:

Local Message &MSG; Local Rowset &FLIGHT_PROFILE; Local String &Attachment_Id; Local Boolean &Test; Local IntBroker &IntBroker; QE_FLIGHTDATA.QE_ACNUMBER.Value = QE_FLIGHTDATA.QE_ACNUMBER + 1; &FLIGHT_PROFILE = GetLevel0(); &MSG = CreateMessage(Operation.ASYNC_RR); &Attachment_Id = &MSG.IBInfo. AddAttachment("C:\\temp\\MyFile.txt"); &Test = &MSG.IBInfo.SetAttachmentProperty(&Attachment_Id, %Attachment_Encoding,⇒ "UTF-8"); &Test = &MSG.IBInfo.SetAttachmentProperty(&Attachment_Id, %Attachment_Base,⇒ "Standard"); &Test = &MSG.IBInfo.SetAttachmentProperty(&Attachment_Id, %Attachment_Disposition,⇒ "Pending"); &Test = &MSG.IBInfo.SetAttachmentProperty(&Attachment_Id, %Attachment_Language,⇒ "English"); &Test = &MSG.IBInfo.SetAttachmentProperty(&Attachment_Id, %Attachment_Description,⇒ "Parts data"); &MSG.CopyRowset(&FLIGHT_PROFILE); &IntBroker = %IntBroker &IntBroker.Publish(&MSG);

See Also

ClearAttachments, DeleteAttachment, SetAttachmentProperty.

Click to jump to top of pageClick to jump to parent topicAddAttribute

Syntax

AddAttribute(name, value)

Description

Use this method to add an attribute to an IBInfo object.

Note. This method can be used for content-based routing only, typically in your implementation of the IRouter.OnRouteSend or IRouter.OnRouteReceive methods.

The maximum length of the attribute name is 30 characters. The maximum length of the attribute value is 254 characters.

Parameters

name

Specifies the attribute name as a string.

value

Specifies the attribute value as a string.

Returns

A Boolean value: true if the addition of the attribute was successful, false otherwise.

Example

&bRet = &MSG.IBInfo.AddAttribute("employeeID", "123456");

See Also

Content-Based Routing

Click to jump to top of pageClick to jump to parent topicAddContainerAttribute

Syntax

AddContainerAttribute(Name, Value)

Description

Use this method to add a container attribute by specifying an attribute name-value pair.

You can add attributes to container messages that contain rowset-based message parts to provide integration partners with data and information, without adding the information to the message definition.

Parameters

Name

Specifies the container attribute name as a string.

Value

Specifies the container attribute value as a string.

Returns

A Boolean value: True if the container attribute was added successfully, False otherwise..

Example

Local Message &MSG; Local Rowset &RS; Local boolean &Bo; &RS = GetLevel0(); &MSG = CreateMessage(Operation.QE_CONT_ATTRB); &Bo = &MSG.IBInfo.AddContainerAttribute("Test1", "1"); &Bo = &MSG.IBInfo.AddContainerAttribute("Test2", "10"); &Bo = &MSG.IBInfo.AddContainerAttribute("Test3", "100"); &MSG.CopyPartRowset(1, &RS); %IntBroker.Publish(&MSG);

See Also

Managing Container Messages

ClearContainerAttributes, DeleteContainerAttribute, GetContainerAttributeName, GetContainerAttributeValue, GetNumberOfContainerAttributes.

Click to jump to top of pageClick to jump to parent topicClearAEAttributes

Syntax

ClearAEAttributes()

Description

Use this method to delete all Application Engine handler attributes from the Message object.

Parameters

None.

Returns

None.

See Also

AddAEAttribute, DeleteAEAttribute.

Click to jump to top of pageClick to jump to parent topicClearAttachments

Syntax

ClearAttachments()

Description

Use the ClearAttachments method to clear all attachments. If you want to delete a particular attachment, use DeleteAttachment instead.

Parameters

None.

Returns

None.

See Also

AddAttachment, DeleteAttachment.

Click to jump to top of pageClick to jump to parent topicClearAttributes

Syntax

ClearAttributes()

Description

Use this method to delete all attributes from an IBInfo object.

Note. This method can be used for content-based routing only, typically in your implementation of the IRouter.OnRouteSend or IRouter.OnRouteReceive methods.

Parameters

None.

Returns

None.

Example

&MSG.IBInfo.ClearAttributes();

See Also

Content-Based Routing

Click to jump to top of pageClick to jump to parent topicClearContainerAttributes

Syntax

ClearContainerAttributes()

Description

Use this method to delete all container attributes in the IBInfo object.

Parameters

None

Returns

None

Example

&MSG.IBInfo.ClearContainerAttributes();

See Also

AddContainerAttribute, DeleteContainerAttribute.

Click to jump to top of pageClick to jump to parent topicDeleteAEAttribute

Syntax

DeleteAEAttribute(Name)

Description

Use this method to delete the Application Engine handler attribute specified by attribute name from the Message object.

Parameters

Name

Specifies the name of the attribute as a string.

Returns

A Boolean value: True if the deletion was successful, False otherwise.

See Also

AddAEAttribute, ClearAEAttributes, GetAEAttributeName.

Click to jump to top of pageClick to jump to parent topicDeleteAttachment

Syntax

DeleteAttachment(Index | Content_ID)

Description

Use the DeleteAttachment method to remove the specified attachment from the message. You can either specify the number of the attachment, or the content ID associated with the attachment (generated when the attachment was added to the message with AddAttachment.)

If you want to clear all attachments, instead of a particular one, use the ClearAttachments methods instead.

Parameters

Index | Content_ID

Specify either the number of the attachment, or the content ID associated with the attachment, for the attachment you want to delete.

Returns

A Boolean value: true if the attachment was deleted successfully, false otherwise.

See Also

AddAttachment, ClearAttachments.

Click to jump to top of pageClick to jump to parent topicDeleteAttribute

Syntax

DeleteAttribute(name)

Description

Use this method to delete an attribute from an IBInfo object by specifying the attribute’s name as a string.

Note. This method can be used for content-based routing only, typically in your implementation of the IRouter.OnRouteSend or IRouter.OnRouteReceive methods.

Parameters

name

Specifies the attribute by name as a string.

Returns

A Boolean value: true if the deletion of the attribute was successful, false otherwise.

Example

&bRet = &MSG.IBInfo.DeleteAttribute("employeeID");

See Also

GetAttributeName.

Content-Based Routing

Click to jump to top of pageClick to jump to parent topicDeleteContainerAttribute

Syntax

DeleteContainerAttribute(Name)

Description

Use this method to delete a container attribute based on the attribute name.

Parameters

Name

Specifies the container attribute name as a string.

Returns

A Boolean value: True if the deletion was successful, False otherwise.

Example

&Ret = &MSG.IBInfo.DeleteContainerAttribute("MyAttribute");

See Also

AddContainerAttribute, ClearContainerAttributes, GetContainerAttributeName.

Click to jump to top of pageClick to jump to parent topicGetAEAttributeName

Syntax

GetAEAttributeName(nIndex)

Description

Use this method to return the name of the nth Application Engine handler attribute from the Message object. For example, the response application class can use this method to retrieve the attribute name.

Parameters

nIndex

An integer specifying which attribute in the Message object.

Returns

A string populated with the attribute name.

See Also

AddAEAttribute, GetAEAttributeValue, GetNumberofAEAttributes.

Click to jump to top of pageClick to jump to parent topicGetAEAttributeValue

Syntax

GetAEAttributeValue(nIndex)

Description

Use this method to return the value of the nth Application Engine handler attribute from the Message object. For example, the response application class can use this method to retrieve the attribute value.

Parameters

nIndex

An integer specifying which attribute in the Message object.

Returns

A string populated with the attribute value.

See Also

AddAEAttribute, GetAEAttributeName, GetNumberofAEAttributes.

Click to jump to top of pageClick to jump to parent topicGetAttachmentContentID

Syntax

GetAttachmentContentID(Index)

Description

Use the GetAttachmentContentID to return the content ID for the specified attachment. The content ID is associated with an attachment when it is added to a message using AddAttachment.

You can use the content ID with other methods, such as AddAttachmentProperty and DeleteAttachment.

Parameters

Index

Specify the number of the attachment that you want to access the content ID for.

Returns

A string containing the content ID.

See Also

AddAttachment, GetAttachmentProperty.

Click to jump to top of pageClick to jump to parent topicGetAttachmentProperty

Syntax

GetAttachmentProperty(Content_ID, Property_Type)

Description

Use the GetAttachmentProperty method to return the value of an attachment property.

Parameters

Content_ID

Specify the content ID of the attachment that you want to access, as a string.

Property_Type

Specify the type of property that you want to access. Valid values are:

 

Constant Value

Description

%Attachment_Base

Specifies the base name of the attachment, that is, if the actual document name you want is different, such as if it is zipped or otherwise compressed as part of other documents.

%Attachment_Description

Specifies the description of the attachment.

%Attachment_Disposition

Specifies the disposition of the attachment, whether it's displayed inline or as an attachment.

%Attachment_Encoding

Specify the encoding of the attachment. For example, Content-type: text/plain or charset=Big5.

%Attachment_Language

Specify the language used in the attachment, as a string.

%Attachment_Location

Specify an additional location for the attachment.

%Attachment_Type

Specify the attachment type.

%Attachment_URL

Specifies the URL for the attachment. The URL must be an absolute URL.

Returns

A string containing the value of the specified property.

Example

The following example processes an attachment from a notification PeopleCode program:

Import PS_PT:Integration:INotificationHandler; Class FLIGHTPROFILE implements PS_PT:Integration:INotificationHandler method FLIGHTPROFILE(); method OnNotify(&MSG As Message); end-class; /* Constructor */ method FLIGHTPROFILE %Super = create PS_PT:Integration:INotificationHandler(); end-method; method OnNotify /+ &MSG as Message +/ /+ Extends/implements PS_PT:Integration:INotificationHandler.OnNotify +/ Local rowset &RS; Local integer &Count; Local string &Attachment_Id; Local array of array of string &Result; &RS = &MSG.GetRowset(); &Count = &MSG.IBInfo.NumberOfAttachments; If &Count > 0 Then For &I = 1 to &Count &Attachment_ID = &MSG.IBInfo.GetAttachmentContentID(&I); &Result[&I][1] = &MSG.IBInfo.GetAttachmentProperty(&Attachment_Id,⇒ %Attachment_Encoding); &Result[&I][2] = &MSG.IBInfo.GetAttachmentProperty(&Attachment_Id,⇒ %Attachment_Type); &Result[&I][3] = &MSG.IBInfo.GetAttachmentProperty(&Attachment_Id,⇒ %Attachment_URL); &Result[&I][4] = &MSG.IBInfo.GetAttachmentProperty(&Attachment_Id,⇒ %Attachment_Base); &Result[&I][5] = &MSG.IBInfo.GetAttachmentProperty(&Attachment_Id,⇒ %Attachment_Location); &Result[&I][6] = &MSG.IBInfo.GetAttachmentProperty(&Attachment_Id,⇒ %Attachment_Disposition); &Result[&I][7] = &MSG.IBInfo.GetAttachmentProperty(&Attachment_Id,⇒ %Attachment_Description); End-For; End-if; /* process data from message */ end-method;

See Also

SetAttachmentProperty

Click to jump to top of pageClick to jump to parent topicGetAttributeName

Syntax

GetAttributeName(nIndex)

Description

Use this method to return the attribute name for the nth attribute of the IBInfo object as a string.

Note. This method can be used for content-based routing only, typically in your implementation of the IRouter.OnRouteSend or IRouter.OnRouteReceive methods.

Parameters

nIndex

An integer specifying which attribute in the IBInfo object.

Returns

A string populated with the attribute name.

Example

&AttrName = &MSG.IBInfo.GetAttributeName(&i);

See Also

GetAttributeValue, GetNumberOfAttributes.

Content-Based Routing

Click to jump to top of pageClick to jump to parent topicGetAttributeValue

Syntax

GetAttributeValue(nIndex)

Description

Use this method to return the attribute value for the nth attribute of the IBInfo object as a string.

Note. This method can be used for content-based routing only, typically in your implementation of the IRouter.OnRouteSend or IRouter.OnRouteReceive methods.

Parameters

nIndex

An integer specifying which attribute in the IBInfo object.

Returns

A string populated with the attribute value.

Example

&AttrValue = &MSG.IBInfo.GetAttributeValue(&i);

See Also

GetAttributeName, GetNumberOfAttributes.

Content-Based Routing

Click to jump to top of pageClick to jump to parent topicGetContainerAttributeName

Syntax

GetContainerAttributeName(nIndex)

Description

Use this method to return the attribute name for the nth container attribute of the IBInfo object as a string.

Parameters

nIndex

An integer specifying which container attribute in the IBInfo object.

Returns

A string populated with the container attribute name.

See Also

AddContainerAttribute, GetContainerAttributeValue, GetNumberOfContainerAttributes.

Click to jump to top of pageClick to jump to parent topicGetContainerAttributeValue

Syntax

GetContainerAttributeValue(nIndex)

Description

Use this method to return the attribute value for the nth container attribute of the IBInfo object as a string.

Parameters

nIndex

An integer specifying which container attribute in the IBInfo object.

Returns

A string populated with the container attribute value.

See Also

AddContainerAttribute, GetContainerAttributeName, GetNumberOfContainerAttributes.

Click to jump to top of pageClick to jump to parent topicGetNumberofAEAttributes

Syntax

GetNumberofAEAttributes()

Description

Use this method to return the number of Application Engine handler attributes in the Message object. For example, the response application class can use this method to retrieve the number of attributes before retrieving the attribute name-value pairs.

Parameters

None.

Returns

An integer representing the number of Application Engine handler attributes.

See Also

AddAEAttribute, GetAEAttributeName, GetAEAttributeValue.

Click to jump to top of pageClick to jump to parent topicGetNumberOfAttributes

Syntax

GetNumberOfAttributes()

Description

Use this method to get the number of attributes for the IBInfo object as an integer.

Note. This method can be used for content-based routing only, typically in your implementation of the IRouter.OnRouteSend or IRouter.OnRouteReceive methods.

Parameters

None.

Returns

An integer representing the number of attributes for the IBInfo object.

Example

For &i = 1 To &MSG.IBInfo.GetNumberOfAttributes() &AttrName = &MSG.IBInfo.GetAttributeName(&i); &AttrValue = &MSG.IBInfo.GetAttributeValue(&i); End-For;

See Also

GetAttributeName, GetAttributeValue.

Content-Based Routing

Click to jump to top of pageClick to jump to parent topicGetNumberOfContainerAttributes

Syntax

GetNumberOfContainerAttributes()

Description

Use this method to return the number of container attributes in the IBInfo object.

Parameters

None

Returns

An integer representing the number of container attributes.

Example

&MSG = CreateMessage(Operation.FLIGHTPLAN); &ret = &MSG.IBInfo.AddContainerAttribute("MESSAGE_STATUS", "good"); &ret = &MSG.IBInfo.AddContainerAttribute("MyAttribute", "abcd"); /* When attempting to read these attributes within an IB event (OnNotify, */ /* OnRequest etc.) one must first get a part rowset, this will load up the */ /* attributes into the message object from the xml. Here is an example of */ /* how to read the attributes from a message. */ &RS = &MSG.GetPartRowset(1); &index = &MSG.Ibinfo.GetNumberOfContainerAttributes(); For &i = 1 To &index &attrName = &MSG.Ibinfo.GetContainerAttributeName(&i); &attrValue = &MSG.Ibinfo.GetContainerAttributeValue(&i); End-For;

See Also

AddContainerAttribute, GetContainerAttributeName, GetContainerAttributeValue.

Click to jump to top of pageClick to jump to parent topicGetTransactionIDforAE

Syntax

GetTransactionIDforAE()

Description

Use this method to get the transaction ID from within Application Engine program.

Parameters

None.

Returns

A number representing the transaction ID from within Application Engine program.

See Also

AddAEAttribute

Click to jump to top of pageClick to jump to parent topicInsertAEResponseAttributes

Syntax

InsertAEResponseAttributes()

Description

Use this method to save and transfer the Application Engine handler attributes to be read by the response application class.

Parameters

None.

Returns

A Boolean value: True if the save and insertion were successful, False otherwise.

See Also

AddAEAttribute

Click to jump to top of pageClick to jump to parent topicLoadConnectorProp

Syntax

LoadConnectorProp(ConnectorName)

Description

Use the LoadConnectorProp method to load connector properties to the specified connector. The properties are contained in the message executing the method.

Note. Use this method in the message OnSend event.

Parameters

ConnectorName

Specify the name of the connector that you want to load properties for from the message.

Returns

A Boolean value: true if properties are loaded successfully, false otherwise.

Example

LOCAL MESSAGE &MSG; &MSG = %IntBroker.GetMessage(); &Rowset = &MSG.GetRowset(); &MSG.IBInfo.LoadConnectorProp("HTTP TargetConnector"); /* add connector properties */ &MSG.IBInfo.ConnectorOverride= true; ReturnToServer(&MSG);

See Also

ConnectorOverride

ReturnToServer

Click to jump to top of pageClick to jump to parent topicLoadConnectorPropFromNode

Syntax

LoadConnectorPropFromNode(NodeName)

Description

Use the LoadConnectorPropFromNode method to load connector properties into the message executing the method. Then you can use the LoadConnectorProp method to load the specified connector with the properties.

Note. Use this method in the message OnSend event.

Parameters

NodeName

Specify the node that contains the connector properties you want to use. You can either specify the node name as a string, or prefix the node name with the reserved word Node.

Returns

A Boolean value: true if the properties are loaded successfully, false otherwise.

See Also

ConnectorOverride

ReturnToServer

Click to jump to top of pageClick to jump to parent topicLoadConnectorPropFromRouting

Syntax

LoadConnectorPropFromRouting(RoutingDefnName)

Description

Use the LoadConnectorPropFromRouting method to load connector properties into the message executing the method. Then you can use the LoadConnectorProp method to load the specified connector with the properties.

Parameters

RoutingDefnName

Specify the routing definition name that contains the connector properties you want to use, as a string.

Returns

A Boolean value: true if the method completes successfully, false otherwise.

See Also

LoadConnectorProp, LoadConnectorPropFromNode.

Click to jump to top of pageClick to jump to parent topicLoadConnectorPropFromTrx

Syntax

LoadConnectorPropFromTrx(NodeName, TransactionType, MsgName, MsgVersion)

Description

Note. This method is no longer supported.

Click to jump to top of pageClick to jump to parent topicLoadRESTHeaders

Syntax

LoadRESTHeaders()

Description

Use this method to load the headers defined on the appropriate routing for a REST-based service operation. Once loaded, the headers can be modified without specifying the connector override property.

Parameters

None.

Returns

A Boolean value: True if the method executed successfully, False otherwise.

Note. The connector override property does not need to be set when using LoadRESTHeaders.

Example

The following example demonstrates how you can modify HTTP headers through PeopleCode. In this example, the request on the subscribing node (the consumer) is modified.

Note. No HTTP properties are currently applicable for REST and will be removed by Integration Broker.

&request = CreateMessage(Operation.MAPS_GET); &bRet = &request.IBInfo.LoadRESTHeaders(); /* Add any additional headers not defined on the routing */ &bRet = &request.IBInfo.IBConnectorInfo.AddConnectorProperties("Content-⇒ Language", "eng", %HttpHeader);

The following example demonstrates how you can add HTTP headers to a REST-based service operation response within an OnRequest event:

&response = CreateMessage(Operation.WEATHERSTATION_GET, %IntBroker_Response); &bRet = &response.IBInfo.LoadRESTHeaders(); /* Add or modify additional headers not defined on the routing */ &bRet = &response.IBInfo.IBConnectorInfo.AddConnectorProperties("Content-⇒ Language", "eng", %HttpHeader); Return &response;

See Also

ConnectorOverride

Click to jump to top of pageClick to jump to parent topicSetAttachmentProperty

Syntax

SetAttachmentProperty(Content_ID, Property_Type, Value)

Description

Use the SetAttachmentProperty to specify the value and type of a property associated with an attachment.

Parameters

Content_ID

Specify the content ID associated with the attachment.

Property_Type

Specify the type of property. See below for the valid values.

Value

Specify the value associated with this property.

For the Property_Type parameter, the valid values are:

Constant Value

Description

%Attachment_Encoding

Specify the encoding type.

%Attachment_Type

Specify the attachment type.

%Attachment_URL

Specifies the URL for the attachment. The URL must be an absolute URL.

%Attachment_Base

Specify the attachment base.

%Attachment_Location

Specify an additional location for the attachment.

%Attachment_Disposition

Specifies the disposition of the attachment, whether it's displayed inline or as an attachment.

%Attachment_Description

Specifies the description of the attachment.

Returns

A Boolean value: true if the property is set successfully, false otherwise.

Example

The following example shows sending an attachment with an asynchronous message:

Local Message &MSG; Local Rowset &FLIGHT_PROFILE; Local String &Attachment_Id; Local Boolean &Test; Local IntBroker &IntBroker; QE_FLIGHTDATA.QE_ACNUMBER.Value = QE_FLIGHTDATA.QE_ACNUMBER + 1; &FLIGHT_PROFILE = GetLevel0(); &MSG = CreateMessage(Operation.ASYNC_RR); &Attachment_Id = &MSG.IBInfo. AddAttachment("C:\\temp\\MyFile.txt"); &Test = &MSG.IBInfo.SetAttachmentProperty(&Attachment_Id, %Attachment_Encoding,⇒ "UTF-8"); &Test = &MSG.IBInfo.SetAttachmentProperty(&Attachment_Id, %Attachment_Base,⇒ "Standard"); &Test = &MSG.IBInfo.SetAttachmentProperty(&Attachment_Id, %Attachment_Disposition,⇒ "Pending"); &Test = &MSG.IBInfo.SetAttachmentProperty(&Attachment_Id, %Attachment_Language,⇒ "English"); &Test = &MSG.IBInfo.SetAttachmentProperty(&Attachment_Id, %Attachment_Description,⇒ "Parts data"); &MSG.CopyRowset(&FLIGHT_PROFILE); &IntBroker = %IntBroker &IntBroker.Publish(&MSG);

See Also

GetAttachmentProperty

Click to jump to parent topicIBInfo Class Properties

In this section, we discuss the IBInfo class properties. The properties are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAppServerDomain

Description

This property can be used to set the application server domain for the connector, as a string.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicCompressionOverride

Description

This property can be used to set a compression override for the transaction. This property takes three system constants to set the compression override:

Constant Value

Description

%IntBroker_Compress

Turns compression on for this transaction.

%IntBroker_UnCompress

Turns compression off for this transaction.

%IntBroker_Compress_Reset

Resets compression to use the threshold specified by PSADMIN.

The integration engine compresses and base64-encodes messages destined for the PeopleSoft listening connector on its local integration gateway.

Asynchronous messages are always compressed and base64 encoded when sent to the integration gateway.

For synchronous messages, in PSADMIN you can set a threshold message size above which messages are compressed. With the CompressionOverride property, you can override the message compression setting specified in PSADMIN at the transaction level.

Warning! Turning compression off can negatively impact system performance when transporting synchronous messages greater than 1 MB. As a result, you should turn off compression only during integration development and testing.

Note. This property does not affect the compression of messages that the integration gateway sends using its target connectors.

This property is read-write.

Example

&MSG.IBInfo.CompressionOverride = %IntBroker_UnCompress;

Click to jump to top of pageClick to jump to parent topicConnectorOverride

Description

This property specifies whether the connector override is specified for the transaction. This property takes a Boolean value: true, override the connector properties, false otherwise.

For REST-based service operations, the LoadRESTHeaders method can be used without the need to explicitly set this property.

This property is read-write.

See Also

LoadRESTHeaders

Click to jump to top of pageClick to jump to parent topicConversationID

Description

This property returns the conversation ID associated with the request/response message transaction.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicDeliveryMode

Description

This property sets or returns the delivery mode override for the connector as an integer. This property takes one of three system constants to set the delivery mode override:

Constant Value

Description

%IB_DM_BestEffort

Sets the delivery mode to best effort. If the delivery mode is set to best effort, then only one attempt is made to send the message to the destination; there is no attempt to retry the message.

%IB_DM_Guarantee

Sets the delivery mode to guaranteed. This mode automatically invokes retry logic to ensure that the message is successfully sent to a destination. This is the default delivery mode.

%IB_DM_Reset

Resets the delivery mode to the value defined outside the PeopleCode program.

This property is read-write.

Example

&int = &MSG.IBInfo.DeliveryMode = %IB_DM_BestEffort;

Click to jump to top of pageClick to jump to parent topicDestinationNode

Description

This property returns the name of the destination node that the request was sent to, as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicExternalMessageID

Description

This property returns the external ID of the message. This property is used in testing, and to resolve duplicate message issues from third-party systems.

This property is read-only.

Example

&str = &MSG.IBInfo.ExternalMessageID;

Click to jump to top of pageClick to jump to parent topicExternalOperationName

Description

This property returns the external operation name of the message. This property is used in testing, and to resolve duplicate message issues from third-party systems.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicExternalUserName

Description

This property returns the external user name associated with the message. This property is used in testing, and to resolve duplicate message issues from third-party systems.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicExternalUserPassword

Description

This property returns the external user password associated with the message. This property is used in testing, and to resolve duplicate message issues from third-party systems.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicFinalDestinationNode

Description

When the message is passed across several nodes, this property specifies the ultimate target of the message, as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFuturePublicationDateTime

Description

Use this property to specify when, as a DateTime value, an actual publish of the transaction is to occur.

This property is for use with asynchronous transactions. If a null value or an invalid future date and time is specified, the publish will occur immediately.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicHTTPSessionId

Description

Use the HTTPSessionId property to specify the HTTP session ID, as a string.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicIBConnectorInfo

Description

This property returns a reference to a IBConnectorInfo collection object.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicInReplyToID

Description

Use the InReplyToID property to specify the reply to ID contained in the message.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicMessageChannel

Description

This property references the name of the channel associated with the message definition, as a string.

Note. This property has been deprecated and remains for backward compatibility only. Use the IBInfo class MessageQueue property instead.

This property is set in when the message is created.

This property is read-only.

See Also

MessageQueue

See Also

ChannelName.

Click to jump to top of pageClick to jump to parent topicMessageName

Description

This property returns the name of the message, as a string.

This property is read-only.

See Also

Name.

Click to jump to top of pageClick to jump to parent topicMessageQueue

Description

This property returns the name of the queue associated with the message, as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicMessageType

Description

This property returns the type of the message, as a string.

Note. This property has been deprecated and remains for backward compatibility only. Use the IBInfo class OperationType property instead.

See OperationType.

Valid types are:

Value

Description

Sync

Indicates that the message is synchronous.

Async

Indicates that the message is asynchronous.

Ping

Indicates that the message is used to test the application server to make sure it is available and accepting requests.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicMessageVersion

Description

This property returns the message version as a number.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicNodeDN

Description

For incoming requests, this property gives the distinguished name (DN) extracted from the certificate authentication process, as a string.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicNonRepudiationID

Description

This property returns the non-repudiation ID as a string. This property is populated with a unique string when the message is published.

This property is only valid with messages that use non-repudiation.

This property is read-only.

See Also

Implementing Nonrepudiation.

Click to jump to top of pageClick to jump to parent topicNumberOfAttachments

Description

This property returns the number of attachments associated with a message.

This property is read-only.

See Also

AddAttachment

Click to jump to top of pageClick to jump to parent topicOperationType

Description

This property returns the type of the operation, as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicOperationVersion

Description

This property returns the version of the operation, as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicOrigNode

Description

For requests that cross multiple nodes, this property identifies the node that initiated the request as a string.

The OrigNode property returns the originating node of the message. If the message is not going across nodes, the OrigNode and SoureNode properties return the same value. However, if the message is going across nodes, the source node is the node that most recently published the message.

For example, if A publishes to B, then B publishes the message to C, from C's perspective, A is the original node and B is the source node.

This property is read-only.

See Also

SourceNode.

Click to jump to top of pageClick to jump to parent topicOrigProcess

Description

This property returns the name of the process where the publish originated, as a string. For example, a message published from the Inventory definitions page would have a process name of INVENTORY DEFIN.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicOrigTimeStamp

Description

This property returns the time stamp that corresponds to the time that the request was created, as a string. For requests that cross nodes, this is the time that the first request was created.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicOrigUser

Description

This property returns the user ID login where the message was initially generated, as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicPublicationID

Description

This property returns the unique identifier for the message, as a string.

Note. This property has been deprecated. It is no longer supported.

Click to jump to top of pageClick to jump to parent topicRequestingNodeName

Description

This property returns the name of the node making the request, as a string.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicRequestingNodeDescription

Description

This property returns the description of the node making the request, as a string.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicResponseAsAttachment

Description

Use the ResponseAsAttachment property to specify whether the response should be returned as an attachment or inline.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicSegmentsUnOrder

Description

The SegmentUnOrder property is only applicable for asynchronous messages. If you specify the SegmentUnOrder property as true, the receiving node processes the segments in parallel.

This property is read-write.

See Also

SegmentsByDatabase

Message Segments

Click to jump to top of pageClick to jump to parent topicSourceNode

Description

This property returns the name of the publishing node as a string.

The OrigNode property returns the originating node of the message. If the message is not going across nodes, the OrigNode and SoureNode properties return the same value. However, if the message is going across nodes, the source node is the node that most recently published the message.

For example, if A publishes to B, then B publishes the message to C, from C's perspective, A is the original node and B is the source node.

This property is read-only.

See Also

OrigNode.

Click to jump to top of pageClick to jump to parent topicSyncServiceTimeout

Description

This property takes a time (in seconds). This time overrides the default HTTP timeout that is used for all requests. If you set this property, you can use this to read back the time, that is, set the time before the SyncRequest is executed, then see when it is changed in an implementation of the OnSend method.

Note. This property is only for synchronous requests.

Generally, you use SyncServiceTimeout to dynamically set the timeout value for a specific transaction. The http header file is modified to take this new parameter. In addition this value is sent to the gateway to be used for the http timeout. Use this so that a long running transaction will not timeout. In addition, you don't have to wait through the default period for a specific transaction to timeout.

The following is a typical example of using this property:

&MSG.SetXmlDoc(&xmlReq); &MSG.IBInfo.LoadConnectorPropFromNode(Node.EAI) &MSG.IBInfo.SyncServiceTimeout = 360000; &MSG.IBInfo.ConnectorOverride = true; &MSG_Resp = SyncRequest(&MSG, Node.EAI); &xmlResponseDoc = &MSG.GetXmlDoc();

Setting the XML directly is not valid. You need to use the message object to set the value. In order for this to work you must override the connector properties, which means you must set up the connector properties for this transaction, using one of the load methods (such as LoadConnectorPropFromNode, LoadConnectorPropFromTrx, and so on.)

This property is read-write.

Click to jump to top of pageClick to jump to parent topicTransactionID

Description

This property returns the transaction ID as a string. This is used to uniquely identify a request.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicUserName

Description

This property returns the user name associated with the message, as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicVisitedNodes

Description

This property returns an array of string containing the names of all the nodes visited by the message. This is useful when a message is being propagated across multiple nodes.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicWSA_Action

Description

Use this property to specify the Web Services Addressing (WS-Addressing) action for the message. The WS-Addressing action is defined as a string.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicWSA_FaultTo

Description

Use this property to specify the WS-Addressing fault end point for the message. The WS-Addressing fault end point is defined as a string.

If this property is not null, a message ID (the WSA_MessageID property) must also be defined.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicWSA_MessageID

Description

Use this property to specify the WS-Addressing message ID for the message. The WS-Addressing message ID is defined as a string.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicWSA_ReplyTo

Description

Use this property to specify the WS-Addressing reply-to address for the message. The WS-Addressing reply-to address is defined as a string.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicWSA_To

Description

Use this property to specify the WS-Addressing destination for the message. The WS-Addressing destination is defined as a string.

This property is read-write.

Click to jump to parent topicIBConnectorInfo Collection

A IBConnectorInfo collection object is returned from the IBConnectorInfo IBInfo class property.

See Also

IBConnectorInfo

Click to jump to parent topicIBConnectorInfo Collection Methods

In this section, we discuss the IBConnectorInfo collection methods. The methods are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAddConnectorProperties

Syntax

AddConnectorProperties(Name, Value, Type)

Description

Use the AddConnectorProperties method to add a set of connector properties to a connector.

Parameters

Name

Specify the name of the property as a string.

Value

Specify the value of the property as a string.

Type

Specify the type of the property as a string. The valid values are:

 

Constant Value

Description

%Property

Add a property type property.

%Header

Add a header type property.

Returns

A Boolean value: true if the connector properties are added successfully, false otherwise.

Example

The following are examples of typical name/value pairs.

&b1 = &MSG.IBInfo.IBConnectorInfo.AddConnectorProperties("URL", "http:⇒ //finance.yahoo.com/d/quotes.txt/?symbols=PSFT&format=l1c1d1t1", %Property); &b2 = &MSG.IBInfo.IBConnectorInfo.AddConnectorProperties("sendUncompressed", ⇒ "Y", %Header); &b3 = &MSG.IBInfo.IBConnectorInfo.AddConnectorProperties("FilePath", ⇒ "C:\Temp", %Property);

The following example demonstrates setting a passive connection for the FTP target connector:

&b4 = &MSG.IBInfo.IBConnectorInfo.AddConnectorProperties ("FTPMODE", ⇒ "PASSIVE", %Property);

See Also

DeleteConnectorProperties, ClearConnectorProperties.

Click to jump to top of pageClick to jump to parent topicAddQueryStringArg

Syntax

AddQueryStringArg(Name, Value)

Description

Use the AddQueryStringArg method to add query string arguments to the outbound request. The query string arguments are used by the HTTP connector to step parameters in the URL.

Parameters

Name

Specify the name of the query string argument as a string.

Value

Specify the value for the query string argument as a string.

Returns

A Boolean value: true if the query string argument is added successfully, false otherwise.

See Also

ClearQueryStringArgs, DeleteQueryStringArg, GetNumberOfQueryStringArgs, GetQueryStringArgName, GetQueryStringArgValue.

Click to jump to top of pageClick to jump to parent topicClearConnectorProperties

Syntax

ClearConnectorProperties()

Description

Use the ClearConnectorProperties method to clear all the properties in a connector before setting them.

Parameters

None.

Returns

None.

See Also

AddConnectorProperties, DeleteConnectorProperties.

Click to jump to top of pageClick to jump to parent topicClearQueryStringArgs

Syntax

ClearQueryStringArgs()

Description

Use the ClearQueryStringArgs method to clear all of the existing query string arguments.

Use the DeleteQueryStringArg method if you want to remove a specific query string argument.

Parameters

None.

Returns

None.

See Also

DeleteQueryStringArg.

Click to jump to top of pageClick to jump to parent topicDeleteConnectorProperties

Syntax

DeleteConectorProperties(Name)

Description

Use the DeleteConnectorProperties to delete a specific connector property.

Use the ClearConnectorProperties method to remove all the properties.

Parameters

Name

Specify the name of the connector property you want to delete.

Returns

A Boolean value: true if the property is deleted successfully, false otherwise.

See Also

ClearConnectorProperties.

Click to jump to top of pageClick to jump to parent topicDeleteQueryStringArg

Syntax

DeleteQueryStringArg(Name)

Description

Use the DeleteQueryStringArg method to delete a specific query string argument.

Use the ClearQueryStringArg method to delete all of the query string arguments.

Parameters

Name

Specify the name of the query string argument that you want to delete.

Returns

A Boolean value: true if the query string argument is deleted successfully, false otherwise.

See Also

ClearQueryStringArgs.

Click to jump to top of pageClick to jump to parent topicGetConnectorPropertiesName

Syntax

GetConnectorPropertiesName(Index)

Description

Use the GetConnectorPropertiesName to return the name of the connector property in the numeric position specified by Index.

Parameters

Index

Specify the numeric position of the connector property name that you want to access.

Returns

A string containing the name of a connector property.

Example

For &I = 1 to &Msg.IBInfo.IBConnectorInfo.GetNumberOfConnectorProperties(); &PropName = &Msg.IBInfo.IBConnectorInfo.GetConnectorPropertiesName(&I) /* do processing */ End-For;

Click to jump to top of pageClick to jump to parent topicGetConnectorPropertiesType

Syntax

GetConnectorPropertiesType(Index)

Description

Use the GetConnectorPropertiesType method to return the type of the connector property specified by its numeric position by Index.

Parameters

Index

Specify the numeric position of the connector property type that you want to access.

Returns

A string containing the type of the specified connector.

Click to jump to top of pageClick to jump to parent topicGetConnectorPropertiesValue

Syntax

GetConnectorPropertiesValue(Index)

Description

Use the GetConnectorPropertiesValue method to return the value of the connector property specified by its numeric position by Index.

Parameters

Index

Specify the numeric position of the connector property type that you want to access.

Returns

A string containing the value of the specified connector.

Click to jump to top of pageClick to jump to parent topicGetNumberOfConnectorProperties

Syntax

GetNumberOfConnectorProperties()

Description

Use the GetNumberOfConnectorProperties method to determine the number of connector properties.

Parameters

None.

Returns

A number.

Click to jump to top of pageClick to jump to parent topicGetNumberOfQueryStringArgs

Syntax

GetNumberOfQueryStringArgs()

Description

Use the GetNumberOfQueryStringArgs method to determine the number of query string arguments.

Parameters

None.

Returns

A number.

Click to jump to top of pageClick to jump to parent topicGetQueryStringArgName

Syntax

GetQueryStringArgName(Index)

Description

Use the GetQueryStringArgName method to access the name of the query string argument by its numeric position as specified by Index.

Parameters

Index

Specify the numeric position of the query string argument name that you want to access.

Returns

A string containing the name of a query string argument.

Click to jump to top of pageClick to jump to parent topicGetQueryStringArgValue

Syntax

GetQueryStringArgValue(Index)

Description

Use the GetQueryStringArgValue method to access the value of the query string argument by its numeric posistion as specified by Index.

Parameters

Index

Specify the numeric position of the query string argument value that you want to access.

Returns

A string containing the value of a query string argument.

Click to jump to parent topicIBConnectorInfo Collection Properties

In this section, we discuss the IBConnectorInfo collection properties. The properties are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicConnectorClassName

Description

Use this property to identify the name of the target connector to invoke as a string.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicConnectorName

Description

Use this property to identify the target connector to invoke to send to the message, as a string.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicCookies

Description

Use this property to access the cookies associated with a message.

You can accept a synchronous response message containing cookies, save those cookies in a global variable, and later return them to the target node in an outbound synchronous or asynchronous request message.

You can access this property only in an inbound synchronous response message or an outbound request message.

This property is read-write.

Example

The following example retains the cookies from a response message to a global variable:

Local Message &SalesRequest, &SalesResponse; Local Rowset &SALES_ORDER; Global string &SalesCookies; &SALES_ORDER = GetLevel0(); &SalesRequest = CreateMessage(OPERATION.SALES_ORDER_SYNC); &SalesRequest.CopyRowsetDelta(&SALES_ORDER); /* Send the synchronous request; the return value is the response message object */ &SalesResponse = &SalesRequest.SyncRequest(); /* Retrieve cookies from the response message */ &SalesCookies = &SalesResponse.IBInfo.IBConnectorInfo.Cookies;

The following example retrieves the previously retained cookies from the global variable and inserts them into a new request message:

Local Message &SalesRequest, &SalesResponse; Local Rowset &SALES_ORDER; Global string &SalesCookies; &SALES_ORDER = GetLevel0(); &SalesRequest = CreateMessage(Message.SALES_ORDER_SYNC); &SalesRequest.CopyRowsetDelta(&SALES_ORDER); /* Insert the cookies in the request message */ &SalesRequest.IBInfo.IBConnectorInfo.Cookies = &SalesCookies; /* Send the asynchronous request */ %IntBroker.Publish(&SalesRequest);

Click to jump to top of pageClick to jump to parent topicPathInfo

Description

This property is specific to incoming HTTP requests. This is the path information extracted from the request, represented as a string.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicRemoteFrameworkURL

Description

Use this property to identify the URL to which to send a message, as a string. This value overrides the server URL specified in the Project Definitions section.

This property is read-write.