AddAEAttribute method: IBInfo class

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

Parameter Description

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;