Value and data pool editors

On the Events page of the integration test client, a value editor is provided that enables you to specify, view, edit, and pass values for operations, manual emulations, and event definitions. The value editor also enables you to save values to the data pool, where you can view and edit the values using the data pool editor and later reuse them in the value editor.

In this topic, the following sections provide information to help you understand and use the value editor and data pool editor:

Understanding the value editor and its use in testing operations

When you invoke an operation in the integration test client, the test will pause whenever it encounters an interactive event like a manual Invoke event or a manual Emulate event. This enables you to use the value editor to specify input values for an operation or output values for a manual emulator. For those events that are not interactive, the value editor simply displays the values that were passed or returned for the events. The value editor is shown in the following figure:

Picture of the value editor

As shown in the figure, there are typically five objects that are displayed in the Name column of the value editor:
  • 1 Parameters
  • 2 Attributes
  • 3 Array attributes
  • 4 Elements
  • 5 Attributes

The Name column presents a hierarchical view of the data. Attributes of a complex attribute are nested below the complex attribute. Similarly, elements of array attributes are nested below the array attributes, and attributes of elements are nested below the elements. To add an element to an array attribute, you need to right-click the array attribute and select Add element.

The Type column shows the data type of each object.

The Value column accepts and displays the values specified for each object. If you specify an invalid value in the Value column, the value will be flagged with the validation error symbol Picture of the validation error symbol. You can hover your cursor over the validation error symbol to obtain additional information about the validation error.

When the value editor first opens for an event, the following values are automatically assigned:

Understanding the value editor and it use in testing event definitions

In the test client, you can use the value editor to specify values for an event definition. The value editor is shown in the following figure:

Picture of the value editor

As shown in the figure, there are typically six objects that are displayed in the Name column of the value editor:
  • 1 Event definition
  • 2 Property container
  • 3 Properties
  • 4 Extended data container
  • 5 Extended data elements
  • 6 Array elements

The Name column presents a hierarchical view of the data. If an extended data element is an array, the elements of the array are nested below the extended data element. To add an element to an array, you need to right-click the array and select Add element.

The Type column shows the data types of the properties and extended data elements. Properties are always a String data type. Extended data elements can be any non-array or array primitive data type.

The Value column accepts and displays the values specified for the properties and extended data elements. If you specify an invalid value in the Value column, the value will be flagged with the invalid value symbol Picture of the invalid value symbol.

When the value editor first opens for an Emit event, the following values are automatically assigned:

Understanding the data pool editor

In the value editor, you can save values to the data pool, view and edit the values using the data pool editor, and later reuse the values in the value editor. Since the value editor and the data pool editor are both used to manage the same kind of data, the two editors are similar in many respects. The data pool editor is shown in the following figure:

Picture of the data pool editor

The data pool editor enables you to save values to (or retrieve values from) the global data pool that resides in the workspace. When you use the data pool editor to save or retrieve values, the values are saved to (or retrieved from) the global data pool. This ensures that you are always working with the same set of values regardless of how many test client instances, test configurations, or modules you are using in your tests.

Unicode escape sequences

In both the value editor and the data pool editor, you can type values directly into the Value column for any attribute with a primitive data type, such as a string or integer. These values can be either unicode or unicode escape sequences.

By specifying unicode escape sequences in the value editor or the data pool editor, you can pass extended ASCII characters or control characters as values. For example, if you want to use a null character in a CICS® program, you could type \u0000. If you type unicode escape sequences in the data pool editor or value editor, they are displayed as the unicode characters that they represent. However, when you begin to edit them, they are displayed as unicode escape sequences. For example, if the unicode escape sequence \u004a is specified as part of a unicode value, the character J would be displayed, but when you begin to edit the value in the Value column, the unicode escape sequence \uoo4 would be displayed rather than the character J.

You can specify unicode escape sequences to represent character strings in whole or in part. For example, you could type AB\u0043 to specify the string ABC. You can also use the backslash (\) escape character to prevent unicode escape sequences from being interpreted. For instance, if you type \\u0043, it will be interpreted as \u0043 rather than as the letter C.

In standard unicode, escape sequences are specified using hex characters and only valid values are interpreted. For example, the hex characters \u004a are interpreted because they are valid and represent the letter J. However, the hex characters \u004k are not interpreted because they are not valid and they do not represent a valid character.

Business graphs

In the integration test client, you can test operations that have business graphs as their parameters. This capability is especially valuable for testing the business graph implementations of the IBM WebSphere Adapters and the IBM WebSphere Business Integration Adapters. However, before you can test business graphs in the integration test client, you must have a firm understanding of business objects and business graphs. Information on business objects and business graphs is found in the business object editor topic “Creating and mapping business objects” and its subtopics.

If the operation that you are testing has a business graph as its parameter, you can view, specify, and test values for both the verb property and the changeSummary property in the value editor of the test client. However, for the eventSummary property, you can only view values in the value editor.

In the value editor, you can select a Show Change Summary menu item to append a Change Summary column to both the value editor and data pool editor. The Change Summary column accepts values that represent the original state of the business objects in the business graph. The Value column, by comparison, accepts values that represent the current state of the business objects in the business graph. You can modify business object and attribute values in both the Change Summary column and the Value column.

If the Show Change Summary menu item is selected, the test client will pass the business graph to the target adapter or component during the test and the business graph will contain changeSummary information.

If the Show Change Summary menu item is selected and the Enable Logging menu item is also selected, the test client will pass the business graph to the target adapter or component during the test and the business graph will contain changeSummary information. However, the changeSummary information will also include a record of business object changes that have occurred since the operation was invoked. This logging capability enables you to restore a business object to its original state.

If the Show Change Summary menu item is not selected, the test client will still pass the business graph to the target adapter or component during the test. However, the business graph will not contain any changeSummary information at all.

In the Preferences window of WebSphere Integration Developer, you can set a preference to determine whether verb, eventSummary, and changeSummary properties are displayed in the value editor. This is described in the test client topic "Selecting business graph properties to display." However, the Show Change Summary menu item in the value editor enables you to override any preference that you have set in the Preferences window for the changeSummary property.

Context menu items

In the value editor and data pool editor, you can choose from numerous context menu items to help you manage the values that you pass to operations, manual emulations, and event definitions. These include a set of standard menu items that are common to most of the tools in WebSphere® Integration Developer, such as:
  • Undo
  • Cut
  • Copy
  • Paste
  • Delete
  • Select all

However, most of the menu items in the value editor and the data pool editor are specific to the integration test client. Although many of the same context menu items are found in both of the editors, some of the context menu items are specific to one editor or the other.

Additionally, the context menu items that are available differ depending on whether you are specifying values for operations, manual emulations, or event definitions.

The context menu items available for working with operations and manual emulations are described in the following table:

Context menu item Editor How to invoke Function
Undo Data pool In the Name column, select one or more attributes with editable fields, then right-click a selected row and select Undo set. This will undo the last action that you have performed, such as adding new array elements or changing values in a value field.
Redo Data pool In the Name column, select one or more attributes with editable fields, then right-click a selected row and select Redo set. This will redo the last action that you have undone, such as adding new array elements or changing values in a value field.
Set value Value, data pool In the Name column, select one or more attributes in editable fields, then right-click a selected row and select Set value. Opens the Set Value dialog to enable you to specify a value for all selected attributes. Alternatively, you can also type a value directly into the Value column for an individual attribute.
Set to Unset Value, data pool In the Name column, select one or more attributes in editable fields, then right-click one of the selections and select Set to Unset. Sets the value of the selected attributes to the predefined value <unset>. (Predefined values are described below in the section "Predefined values.")
Set to Null Value, data pool In the Name column, select one or more attributes in editable fields, then right-click one of the selections and select Set to Null. Sets the value of the selected attributes to the predefined value <null>. (Predefined values are described below in the section "Predefined values.")
Set to Default Value, data pool In the Name column, select one or more attributes in editable fields, then right-click one of the selections and select Set to Default. Sets the value of the selected attributes to their default values. For example, a boolean data type is set to a value of false and an integer value is set to a value of 0.
Add Element Value, data pool In the Name column, right-click an array attribute and select Add element. In the value editor, this menu item opens the Add Element dialog box to enable you to specify the number of elements that you want to add to the array.

In the data pool editor, this menu item opens the Add Element dialog box to enable you to specify the number of elements that you want to add to the array as well as the name of the module that defines the data type.

Remove Element Value, data pool In the Name column, select one or more array elements, then right-click a selected row and select Remove element. Removes selected elements from an array.
Show Change Summary Value If the operation that you are testing has a business graph as its parameter, right-click any cell in the Name column and then select the Show Change Summary menu item. A check mark symbol is displayed beside the menu item to show that it is selected. Appends a Change Summary column to the value editor and the data pool editor. The column accepts values that represent the original state of the business objects in the business graph.
Enable Logging Value If the operation that you are testing has a business graph as its parameter, right-click any cell in the Name column and then select the Enable Logging menu item. A check mark symbol is displayed beside the menu item to show that it is selected. Note that the Show Change Summary menu item must be selected before you can select the Enable Logging menu item. Initiates the logging of business object changes that occur after the operation has been invoked.
Copy Value Value, data pool In the Name column, right-click a parameter, attribute, array attribute, or element and select Copy value. Copies the selected parameter, attribute, array attribute, or element to the clipboard.
Add Value to Pool Value In the Name column, right-click a parameter, attribute, array attribute, or element and select Add value to pool. Adds the selected parameter, attribute, array attribute, or element to the data pool.
Use Value from Pool Value In the Name column, select one or more objects and then right-click a selected row and select Use value from pool. Opens the data pool editor, where you can select a value to use for a field, array element, or business object. Values of one business object in the data pool may be used for a business object with a different data type if the attribute names match. For example, if a business object in the data pool has attributes A, B, and C but the business object for which you are using the values has attributes B, A, and D, then attributes A and B will receive copied values but attribute D will not. If the data type of any fields copied from the data pool do not match, such as when using a boolean value in an integer field, then an error icon will display in the cell.
Import from XML File Value In the Name column, select one or more objects and then right-click a selected row and select Import from XML. Opens a file selection window that enables you to import the value of a field, array element, or business object from an XML file. Values of one business object may be copied to a business object with a different data type if the attribute names match. If a copied value is not correct for the data type of the field to which it is being imported, such as when importing a boolean value to an integer field, then an error icon will display in the cell. For additional information and an example of an XML file, see the section below entitled "Importing values from XML files."
Paste Value Value, data pool In the Name column, select one or more objects and then right-click a selected row and select Paste value. Pastes the copied value of a field, array element, or business object from the clipboard. Values of one business object may be copied to a business object with a different data type if the attribute names match. For example, if a copied business object has attributes A, B, and C but the business object to which you are pasting has attributes B, A, and D, then attributes A and B will receive copied values but attribute D will not. If the data type of any copied fields do not match, such as when copying a boolean value to an integer field, then an error icon will display in the cell.
Remove Value Data pool In the Name column, select one or more top-level parameters, attributes, array attributes, or elements, then right-click a selected row and select Remove value. Removes the value of the parameters, attributes, array attributes, or elements that are selected at the top level in the data pool editor.
Select All Value, data pool In the Name column, right-click any object and select Select all. Selects all objects in the value editor or the data pool editor.

The context menu items available for working with event definitions are described in the following table:

Context menu item Editor How to invoke Function
Undo Data pool In the Name column, select one or more attributes with editable fields, then right-click a selected row and select Undo set. This will undo the last action that you have performed, such as adding new array elements or changing values in a value field.
Redo Data pool In the Name column, select one or more attributes with editable fields, then right-click a selected row and select Redo set. This will redo the last action that you have undone, such as adding new array elements or changing values in a value field.
Set Value Value, data pool In the Name column, select one or more properties or extended data elements, then right-click a selected row and select Set value. Opens the Set Value dialog to enable you to specify a value for all selected properties or extended data elements. Alternatively, you can also type a value directly into the Value column for an individual property or extended data element.
Set to Unset Value, data pool In the Name column, select one or more properties and extended data elements and then right-click one of the selections and select Set to Unset. Sets the value of the selected properties and extended data elements to the predefined value <unset>. (Predefined values are described below in the section "Predefined values.")
Set to Null Value, data pool In the Name column, select one or more properties and extended data elements and then right-click one of the selections and select Set to Null. Sets the value of the selected properties and extended data elements to the predefined value <null>. (Predefined values are described below in the section "Predefined values.")
Set to Default Value, data pool In the Name column, select one or more properties and extended data elements and then right-click one of the selections and select Set to Default. Sets the value of the selected properties and extended data elements to their default values. For example, a boolean data type is set to a value of false and an integer value is set to a value of 0.
Add Element Value, data pool In the Name column, right-click any extended data element that is an array and select Add element. In the value editor, this menu item opens the Add Element dialog box to enable you to specify the number of elements that you want to add to the array.

In the data pool editor, this menu item opens the Add Element dialog box to enable you to specify the number of elements that you want to add to the array as well as the name of the module that defines the data type.

Remove Element Value, data pool In the Name column, select one or more array elements, then right-click a selected row and select Remove element. Removes selected elements from an array.
Copy Value Value, data pool In the Name column, right-click any object and select Copy value. Copies the selected object to the clipboard.
Add Value to Pool Value In the Name column, right-click any object and select Add value to pool. Adds the selected object to the data pool.
Use Value from Pool Value In the Name column, select one or more objects and then right-click a selected row and select Use value from pool. Opens the data pool editor, where you can select a value to use for an object, such as an event definition, property, or extended data element. Values of one object in the data pool may be used for an object with a different data type if the names match. For example, if an extended data element array has the elements A, B, and C but the extended data element array to which you are pasting has the elements B, A, and D, then elements A and B will receive copied values but element D will not. If the data type of any copied fields do not match, such as when copying a boolean value to an integer field, then an error icon will display in the cell.
Paste Value Value, data pool In the Name column, select one or more objects and then right-click a selected row and select Paste value. Pastes the copied value of an object (such as an event definition, property, or extended data element) from the clipboard. Values of one object may be copied to an object with a different data type if the names match. For example, if an extended data element array has the elements A, B, and C but the extended data element array to which you are pasting has the elements B, A, and D, then elements A and B will receive copied values but element D will not. If the data type of any copied fields do not match, such as when copying a boolean value to an integer field, then an error icon will display in the cell.
Remove Value Data pool In the Name column, right-click one or more properties or extended data elements and select Remove value. Removes the selected property or extended data element from the data pool.
Select All Value, data pool In the Name column, right-click any object and select Select all. Selects all objects in the value editor or the data pool editor.

Predefined values

In the value editor and data pool editor, you can choose from several predefined values to help you manage the values that you pass to operations, manual emulations, or event definitions.

The predefined values that are available differ depending on whether you are specifying values for operations, manual emulations, or event definitions.

The predefined values for working with operations and manual emulations are described in the following table.

Predefined value How to invoke Function
<new> In the Value column for a self-referential business object, such as an element nested inside an array attribute or a complex type nested inside another complex type, click inside the cell and then select the <new> predefined value from the drop-down list. Creates a new (and duplicate) element or complex type that is nested one level under the selected element or complex type.
<null> If you want to set a value of null for a single parameter, attribute, or element, click inside the cell of the parameter, attribute, or element in the Value column and then select the <null> predefined value from the drop-down list. If you want to simultaneously set a value of null for multiple parameters, attributes, or elements, select each parameter, attribute, or element in the Name column, then right-click one of the selected rows and select Set Value to open the Value Name dialog. In the Enter the name of the value to add to the pool field, type <null> and click OK. Specifies that the value is null.
<unset> If you want to unset the value of a single attribute, click inside the cell of the attribute in the Value column and then select the <unset> predefined value from the drop-down list. If you want to simultaneously unset the values for multiple attributes, select each attribute in the Name column, then right-click one of the selected rows and select Set Value to open the Value Name dialog. In the Enter the name of the value to add to the pool field, type <unset> and click OK. Specifies that there is no value. (Selecting <unset> unsets the default value that was automatically set when the value editor first opened for an event. All attributes in a business object have their isSet property set to true by default. The <unset> predefined value enables you to unset the default value of true and set the isSet property to false.)
<create> If the operation that you are testing has a business graph as its parameter, click inside the cell of a business object in the Change Summary column and then select the <create> predefined value from the drop-down list. Note that the Show Change Summary menu item must be selected before the Change Summary column is displayed. Indicates that a new business object has been created.
<update> If the operation that you are testing has a business graph as its parameter, click inside the cell of a business object in the Change Summary column and then select the <update> predefined value from the drop-down list. Note that the Show Change Summary menu item must be selected before the Change Summary column is displayed. Indicates that a business object has been updated.
<delete> If the operation that you are testing has a business graph as its parameter, click inside the cell of a business object in the Change Summary column and then select the <delete> predefined value from the drop-down list. Note that the Show Change Summary menu item must be selected in the before the Change Summary column is displayed. Indicates that a business object has been deleted.

The predefined values for working with event definitions are described in the following table.

Predefined value How to invoke Function
<new> In the Value column for a self-referential object, such as an element nested inside an array or a complex type nested inside another complex type, click inside the cell and then select <new> from the drop-down list. Creates a new (and duplicate) element or complex type that is nested one level under the selected element or complex type.
<null> If you want to set a value of null for an object, click inside the cell of the object in the Value column and then select <null> from the drop-down list. If you want to simultaneously set a value of null for multiple objects, select each object in the Name column and then right-click one of the selected rows and select Set Value to open the Value Name dialog. In the Enter the name of the value to add to the pool field, type <null> and click OK. Specifies that the value is null.

Maximum depth of expanded business objects

In the Preferences window of WebSphere Integration Developer, you can set a preference that enables you to change the maximum depth to which you want to automatically expand your nested business objects in the value editor. This is described in the topic "Specifying the maximum depth of expanded business objects." However, if you have business objects that are nested many levels deep and you choose to automatically expand the nested business objects to a great depth, it can adversely impact the usability of the editor. They may take a long time to display all of the nested business objects and it may take you even longer to specify values for all of them. Conversely, if you find that you are continually expanding nested business objects manually, you may choose to specify a greater maximum depth. By default, nested business objects are automatically expanded to a maximum depth of five levels.

If your business objects are nested deeper than the specified maximum depth, the editors will expand the business objects to the specified maximum depth and the deepest nested business object will display a value of <unset>. You can expand the nested business objects another X levels (where X is the specified maximum depth) by changing the <unset> value to <new>. For example, if you have a business object that is nested 15 levels deep and the specified maximum depth is 5, changing the <unset> value of the deepest nested business object to <new> will expand the nested business objects another five levels. This enables you to expand the depth of the nested business objects as needed on a case-by-case basis rather than by changing the preference that is specified globally for the maximum depth. When you next open the test client (or when you next click Invoke in an open test client), the nested business objects will be expanded to the specified depth.

Importing values from XML

When you are specifying values for an operation or manual emulation in the value editor, you can select the Import from XML menu item. This opens a file selection dialog to enable you to select an XML file from the file system. You can import the value of a field, array element, or business object from an XML file or from the XML content in a SOAP message file. The XML does not necessarily need to be valid, but it must be well-formed if you want to successfully import values from it.

Values of one business object in the XML can be imported into a business object with a different data type in the value editor if the attribute names match. (The one exception to this rule is that if the top-level root element name in the XML differs from the top-level parameter name in the value editor, the top-level root name in the XML will be ignored. And if the XML resides in a SOAP message file, the SOAP envelope and body elements are also ignored.)

Some other considerations for importing values from XML include:

To better illustrate how importing values from XML works, assume that the value editor is populated with the following elements:

Name Type Value
order PurchaseOrder  
id string  
items Item[]  
And assume that you have the following XML:
<?xml version="1.0" encoding="UTF-8"?>
<bo:po xmlns:bo="http://OrderEntry/bos"
       xmlns:bo1="http://OrderEntry"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://OrderEntry/bos PurchaseOrder.xsd http:
              //OrderEntry xsd-includes/http.OrderEntry.xsd ">
       <id>id1</id>
       <items>
              <id>item1 id</id>
              <quan>5</quan>
       </items>
       <items>
              <id>item2 id</id>
              <desc>def</desc>
              <quan>6</quan>
       </items>
</bo:po>
If you import the XML into the value editor, the value editor will be populated with the following elements:
Name Type Value
order PurchaseOrder  
id string id1
items Item[]  
items[0] Item  
id string item1 id
desc string <unset>
quan int 5
items[1] Item  
id string item2 id
desc string def
quan int 6
Related reference
Events page of the integration test client
Configurations page of the integration test client
Icons and symbols for the integration test client
Keyboard shortcuts for the integration test client

Feedback
(C) Copyright IBM Corporation 2005, 2006. All Rights Reserved.