Using the Connector Agent view
The Connector Agent view allows you to emulate the clients in IBM WebSphere
InterChange Server Express interfaces--connector agents and access clients. The
view provides interfaces to connect the clients to the server, create and
send business object requests, and reply with business object responses.
Showing and closing Connector Agent views
The following sections describe the numerous ways you can show and close
Connector Agent views.
The "Default interface position" column in Table
23 lists the views whose default positions in the interface are overlaid
with the Connector Agent views in the "Connector Agent view number" column.
Table 23. Default Connector Agent
view positions
Connector Agent view number |
Default interface position |
Test Connector 1 |
ITE Navigator |
Test Connector 2 |
Outline |
Test Connector 3 |
Properties |
Test Connector 4 |
Dependency |
Test Connector 5 |
ITE Navigator |
Test Connector 6 |
Outline |
Test Connector 7 |
Properties |
Test Connector 8 |
Dependency |
Test Connector 9 |
ITE Navigator |
Showing Connector Agent views
Use one of the following techniques to show Connector Agent views.
Using the Task Manager view
Follow the instructions in Using
the Task Manager view along with Table
19 to use the Task Manager view to start Connector Agent views for
the connectors and access clients in the interface you are testing.
Using the Test Unit view
Follow the instructions in Using,
showing, and closing Connector Agent views to show a Connector Agent
view in the Test Unit view.
Using the Integrated Test Environment
menu
Select Integrated Test Environment > Show All Connector Views from
the menu bar to show all nine Connector Agent views.
Using the Perspective menu
Select Perspective > Show View >
x:Connector Agent from the
menu bar to launch a specific Connector Agent view, where x
is the number of the Connector Agent view position you want to use for
that connector.
Table 23 shows the default interface
positions in which the different Connector Agent views are displayed.
Closing Connector Agent views
Use one of the following techniques to close Connector Agent views.
Using the Integrated Test Environment
menu
Select Integrated Test Environment > Close All Connector Views from
the menu bar to close all open Connector Agent views.
Using the Test Unit view
Follow the instructions in Using,
showing, and closing Connector Agent views to show a Connector Agent
view in the Test Unit view.
Using the Connector Agent view
Either click the Close button in the right-hand side of the Connector
Agent view title bar, or right-click the Connector Agent view title bar
and select Close from the context menu.
Connecting to the server
You must connect Connector Agent views to the server to emulate a connector
as part of testing an interface.
When using the Connector Agent view, you can either emulate a connector
using the definition in the repository or using a configuration file. You
can also use the Connector Agent view to emulate an access client.
Note that you can also use the Task Manager view to connect agents to
the server. For more information, see Table
19.
Emulating a connector using the repository
definition
To emulate a connector using its repository definition, click the down
arrow in the right-hand corner of the title bar of the Connector Agent
view and select Server > Connect.
Emulating a connector using a configuration
file
Do the following to emulate a connector using a configuration file:
-
Click the down arrow in the right-hand corner of the title bar of the Connector
Agent view and select Server > Connect with *.cfg.
-
Navigate to and open the connector configuration file.
Emulating an access client
To emulate an access client, click the down arrow in the right-hand corner
of the title bar of the Connector Agent view and select Server > Connect.
Confirming that a client has connected
to the server
When the Connector Agent view has successfully connected to the server
to emulate a connector, the message "[AppConnector: Connector has recovered]"
is written to the Status Pane of the Connector Agent view.
When the Connector Agent view has successfully connected to the server
to emulate an access client, the message "Ready" is written to the Status
Pane of the Connector Agent view.
For more information about the Status Pane, see Using
the Status Pane.
When the Connector Agent view has successfully connected to the server
to emulate either type of client, the BO Type and
BOInstance
drop-down menus become enabled on the Input Pane of the Connector Agent
view.
For more information about the Input Pane, see Using
the Input Pane.
Disconnecting from the server
To disconnect a Connector Agent that is emulating a connector from the
server, click the down arrow in the right-hand corner of the title bar
of the Connector Agent view and select Server > Disconnect.
A Connector Agent view also disconnects from the server when you close
it. The only way to disconnect a Connector Agent view that is emulating
an access client from the server is to close the Connector Agent view.
For more information on closing Connector Agent views, see Closing
Connector Agent views.
Connector Agent view panes and pane arrangements
The Connector Agent view has several panes you use to simulate the behavior
of a connector or access client.
Using the Input Pane
You use the Input Pane in the Connector Agent view to work with and send
business object requests. You can create business object instances, add
data to their attributes, and send them as requests. You typically use
the Input Pane when working with a Connector Agent view that is emulating
a source client in an interface.
Figure 66 shows the Input Pane for
a Connector Agent view that is emulating a source connector.
Figure 66. Connector Agent view
Input Pane
Using the Result Pane
You use the Result Pane in the Connector Agent view to work with business
object requests that have been received and to send business object responses.
You typically use the Result Pane when working with a Connector Agent view
that is emulating a destination client in an interface.
Figure 67 shows the Result Pane for
a Connector Agent view that is emulating a destination connector.
Figure 67. Connector Agent view
Result Pane
Using the Status Pane
The Status Pane contains messages about the execution of the Connector
Agent view. For instance, the message "[AppConnector: Connector has recovered]"
is written to the Status Pane when the connector has successfully connected
to the server.
You use the Status Pane primarily to confirm that the connector has
successfully connected to the server and to troubleshoot the Connector
Agent view. For instance, if you send a business object request from a
Connector Agent view and there is no subscription for the business object
type, then a message is written to the Status Pane. This can help you to
determine why a business object request does not appear in the Result Pane
of a Connector Agent view emulating a destination client in an interface.
Figure 68 shows the Status Pane for
a Connector Agent view.
Figure 68. Connector Agent view
Status Pane
Arranging all panes vertically
You can arrange a Connector Agent view so that it displays the Input, Result,
and Status panes simultaneously, stacked on top of one another. This view
can be helpful when a Connector Agent view is emulating a client that has
to handle both event notification and request processing responsibilities.
Do one of the following to arrange the Connector Agent view panes vertically:
-
Click the down arrow in the right-hand corner of the title bar of the Connector
Agent view and choose Window > Arrange Vertical from the menu.
-
Click the Show all vertically button in the title bar of the Connector
Agent view.
Figure 69 shows the Connector Agent view
panes when they have been arranged vertically.
Figure 69. Arranging Connector Agent
view panes vertically
Arranging all panes horizontally
You can arrange a Connector Agent view so that it displays the Input, Result,
and Status panes simultaneously from left to right. This view can be helpful
when a Connector Agent view is emulating a client that has to handle both
event notification and request processing responsibilities.
Do one of the following to arrange the Connector Agent view panes horizontally:
-
Click the down arrow in the right-hand corner of the title bar of the Connector
Agent view and choose Window > Arrange Horizontal from the menu.
-
Click the Show all horizontally button in the title bar of the Connector
Agent view.
Figure 69 shows the Connector Agent view
panes when they have been arranged horizontally.
Figure 70. Arranging Connector Agent view
panes horizontally
Working with business object requests
in the Connector Agent view
Request business objects are those that you send from a Connector Agent
view when it is emulating a connector that is the source of the events
that trigger an interface. Working with request business objects consists
of creating a business object instance, populating it with data, and sending
the request.
Creating request business objects
Do the following to create a new business object instance:
-
In the Input Pane, select the name of the business object you want to create
from the BOType drop-down menu.
-
Do one of the following:
-
Click Create next to the BOInstance field.
-
Click the down arrow in the right-hand corner of the title bar of the Connector
Agent view and select Edit > Create BO.
-
When presented with the "New Instance" dialog, type a name for the instance
in the Enter Name field.
-
Select the desired verb from the Verb drop-down menu.
-
Select the desired locale from the BOLocale drop-down menu.
-
Provide values for the simple attributes and child business objects within
the top-level object, as described in Setting
values for business object attributes.
-
Click OK.
Sending request business objects asynchronously
When a source client sends a request business object in asynchronous mode,
it does not expect to get back a response business object. Once the request
business object is dispatched, the source client's role in the transaction
is finished. The response business object is typically processed by the
integration broker. The default mode for a Connector Agent view is asynchronous.
To send a business object asynchronously, do the following:
-
Create the request business object instance, as described in Creating
request business objects.
-
Click the down arrow in the right-hand corner of the title bar of the Connector
Agent view and select Server > Mode > Asynchronous.
-
Note:
-
The Connector Agent view operates in "Asynchronous" mode by default, so
you only have to perform this step if you previously were sending synchronous
requests from the view. Furthermore, you do not have to set the mode before
sending each request.
-
Do one of the following to send the request:
-
Click the down arrow in the right-hand corner of the title bar of the Connector
Agent view and select Server > Send.
-
Click the Send BO button in the toolbar of the Connector Agent view.
Sending business object requests synchronously
When a source client sends a request business object synchronously, it
expects to get back a response business object from the integration broker
after any destination applications have processed the request.
-
Create the request business object instance, as described in Creating
request business objects.
-
Click the down arrow in the right-hand corner of the title bar of the Connector
Agent view and select Server > Mode > Synchronous to set the Connector
Agent view to synchronous mode.
-
Do one of the following to send the request:
-
Click the down arrow in the right-hand corner of the title bar of the Connector
Agent view and select Server > Send.
-
Click the Send BO button in the toolbar of the Connector Agent view.
-
When presented with the "Select Collaboration" dialog, select the collaboration
to which the business object should be sent from the
Collaboration
drop-down menu and click OK.
The business object request is sent to the configured port of the
collaboration object chosen for processing.
Sending business object requests in batch
mode
In batch mode, the Connector Agent view lets you specify the number of
instances of a particular business object you want to send, as well as
one attribute in the top-level object --a primary key attribute, for example--that
you want set to a unique value for each instance. The Connector Agent view
copies the business object as many times as you have specified, incrementing
the value of the single attribute you specified for each instance, and
then sends each instance. This option allows you to create a large number
of business objects quickly and easily.
If the selected attribute is a key field that participates in dynamic
cross-referencing as part of an identity relationship, then you must guarantee
that the initial value and all those that follow it are unique. Otherwise,
the cross-referencing logic will fail, causing the request business objects
to fail.
To ensure that the values are unique, you can use Relationship Manager
or execute SQL statements against the table for the relationship participant
as follows.
-
Determine the highest current value for the participant and set the Initial
Value field to an even higher value. The first business object instance
in the batch and all those that follow will then be unique.
-
Delete the existing table entries for the participant, thus guaranteeing
that no entries have the same attribute value as any of the batch business
objects.
To send business objects in batch mode, do the following:
-
Click the down arrow in the right-hand corner of the title bar of the Connector
Agent view and select Server > Send Batch.
-
In the "Batch Mode" window, select from the Attribute list the attribute
in the top-level business object that you want incremented with each business
object request in the batch.
The selected attribute should typically be an attribute that uniquely
identifies the business object, such as a primary key.
-
In the Initial Value field, type the starting value for the attribute
to be incremented.
-
In the No. of BO's field, type the number of business object instances
you want generated and sent.
-
Click OK.
The Connector Agent view generates the number of business objects
you specified, all identical with the exception of the one specified attribute,
whose value is incremented for each instance.
Figure 71 shows a batch mode configuration
in which:
-
Fifty business objects are to be sent.
-
The value of the attribute OrgObjid is to be incremented.
-
The starting value for the attribute is 10000.
Figure 71. Sending business object
requests in batch mode
Setting values for business object attributes
You can set values for business object attributes when creating a business
object request and when editing a business object request that has been
received, so that it can be returned as a response.
To set values for the attributes of a business object you intend to
send as a request, you must use the Input Pane of the Connector Agent view.
For more information, see Using the Input
Pane.
To set values for the attributes of a business object you are editing
to send as a response, you use the "Response BO" window. For more information,
see Editing response business objects.
Setting values for simple attributes
To provide a value for a simple attribute, click its cell in the
Value
column of the Input Pane or the "Response BO" window and enter a value.
Adding child business objects
To add an instance of a child business object, right-click the attribute
that represents the child object in the Input Pane or the "Response BO"
window and select Add Instance from the context menu.
A plus sign (+) is added next to the attribute that represents the child
business object to show that there is at least one child business object
instance. If you expand the child object attribute, numbered entries are
displayed for each instance. The individual instances also have plus signs
(+) next to them, so you can expand them and set values for their attributes.
To add more child business object instances, right-click the attribute
that represents the child object and select Add Instance from the
context menu.
-
Note:
-
If the Card property of the attribute that references the child
business object is set to the value 1 (indicating it is of single-cardinality),
then you will only be able to add one instance of the child object.
Removing child business objects
To remove an instance of a child business object, right-click the instance
and select Remove Instance from the context menu.
To remove all instances of a child business object, right-click the
attribute that represents the child business object and select Delete
All Instances from the context menu.
Setting the verb of a child business object
You can set the verb of a child business object to test the effect that
value has on the business process. This can be helpful when you are troubleshooting
logic that involves the cross-referencing of child objects.
To set the verb of a child business object instance, right-click it
and choose Set Verb from the context menu. When presented with the
"Select Verb" prompt, selected the desired verb and click
OK.
Resetting business object attributes to
their default values
To reset the attributes of a business object request to their default values,
click the down arrow in the right-hand corner of the title bar of the Connector
Agent view and select Edit > Reset BO.
To reset the attributes of a business object response to their default
values, click the Reset BO to default button in the toolbar of the
"Response BO" window.
Clearing business object attribute values
To clear the attributes of a business object request of their values, click
the down arrow in the right-hand corner of the title bar of the Connector
Agent view and select Edit > Clear BO.
To clear the attributes of a business object response of their values,
click the Clear BO values button in the toolbar of the "Response
BO" window.
Working with response business objects
Response business objects are those that you send from a Connector Agent
view when it is emulating a connector that is the recipient of business
object requests in an interface. Working with request business objects
consists of editing the values in the business object instance and sending
the response back to the server.
If you create and send a business object request as described in Working
with business object requests in the Connector Agent view and it is
successfully processed by the interface, then the business object appears
in the Result Pane of any destination connectors in the interface. Figure
67 shows a Result Pane in which a business object request has been
received.
Editing response business objects
describes how to edit a business object request that has been received,
and Sending response business objects
describes how to send the instance as a response.
Editing response business objects
When you receive a business object request in a Connector Agent view that
is emulating a destination connector in an interface, you frequently want
to edit the values of the attributes. For instance, you will want to provide
unique values for primary key attributes that participate in relationships,
or you will want to modify the value of other attributes to test map or
collaboration logic that responds differently depending on the exact values
in the business object. Do the following to set the values of business
object attributes:
-
Do one of the following to edit the business object request in the "Response
BO" window:
-
Double-click the business object instance in the Result Pane.
-
Select the business object instance in the Result Pane, then click the
down arrow in the right-hand corner of the title bar of the Connector Agent
view and select Reply > Edit Response.
-
Do one of the following to edit the attributes of the business object:
-
Use one of the techniques described in Setting
values for business object attributesto modify the values of the business
object attributes.
-
Import business object data from a file as described in Importing
a response business object.
The ability to import saved data into a business object request
is very useful in situations where you have to populate a response business
object with data before sending it as a reply. Instead of manually typing
a value for each attribute that requires response data, you can type the
values once, export the business object (as described in Exporting
a response business object), and then import the saved data on subsequent
tests.
Sending response business objects
After you edit a request business object (if editing is needed), you send
it back to the server as a reply.
Table 24 lists the reply options and
shows their corresponding connector return codes for both C++ and Java
connectors. For more detailed information about C++ or Java Connector return
codes, see the Connector Development Guide for Java or C++.
Table 24. Connector Agent view reply
types and connector return codes.
Connector Agent view reply
type |
C++ connector return code |
Java connector return code |
Success |
BON_SUCCESS |
SUCCESS |
Fail |
BON_FAIL |
FAIL |
Multiple Hits |
BON_MULTIPLE_HITS |
MULTIPLE_HITS |
Retrieve By Content Fail |
BON_FAIL_RETRIEVE_
BY_CONTENT |
RETRIEVEBYCONTENT_
FAILED |
Not Found |
BON_BO_DOES_NOT_EXIST |
BO_DOES_NOT_EXIST |
Value Duplicate |
BON_VALDUPES |
VALDUPES |
To reply to a request business object, do the following:
-
Select the business object instance in the Request Pane.
-
Do one of the following:
-
Click the Reply Success or Reply Fail buttons in the toolbar
of the Connector Agent view.
-
Click the down arrow in the right-hand corner of the title bar of the Connector
Agent view, select the Reply submenu, and then select the desired
type of reply.
Saving business objects
You can save a business object instance that you have created in the Input
Pane so that it is available whenever the Connector Agent view is opened
to emulate that particular connector definition. You can select the instance
by name from BOInstance field instead of having to go through the
process of creating a new request.
To save the business object instances currently listed in the
BOInstance
field, click the down arrow on the right-hand side of the title bar of
the Connector Agent view and select Edit > Save All BO's.
The business object is saved to a file with the name of the business
object instance, without any extension, in a directory named after the
business object type in the .bos directory of the directory for
the test project in which the test unit is defined. The file is saved in
the same format used by Visual Test Connector and Map Designer Express, so it can
be used for testing in those tools as well.
Deleting business objects
To delete a business object instance from a Connector Agent view, click
the down arrow on the right-hand side of the title bar of the Connector
Agent view and select Edit > Delete BO.
Exporting business objects
You can export a business object instance to a file to conveniently archive
data and to share with Technical Support. The test data file is saved with
a .bo extension and can be used for testing with Visual Test Connector
and Map Designer Express as well as the Integrated Test Environment.
Exporting a request business object
Do the following to export a business object instance from the Input Pane
of the Connector Agent view:
-
Select the business object instance you want to export in the
BOInstance
field.
-
Click the down arrow on the right-hand side of the title bar of the Connector
Agent view and select Edit > Export BO.
-
Navigate to the directory in which you want to save the file and specify
a name in the File name field.
-
Click Save.
Exporting a response business object
Do the following to export a business object instance from the "Response
BO" window when editing a business object response in the Result Pane:
-
Click the Save BO button in the toolbar of the "Response BO" window.
-
Navigate to the directory in which you want to save the file and specify
a name in the File name field.
-
Click Save.
Importing business objects
You can import a business object test data file that was saved from Map
Designer or Visual Test Connector, or exported from Integrated Test Environment.
Importing a request business object
Do the following to import a business object instance into the Input Pane
of the Connector Agent view:
-
Click the down arrow on the right-hand side of the title bar of the Connector
Agent view and select Edit > Import BO.
-
Navigate to and open the test data file.
Importing a response business object
Do the following to import a business object instance into the "Response
BO" window when editing a business object response in the Result Pane:
-
Click the Load BO button in the toolbar of the "Response BO" window.
-
Navigate to and open the test data file.
Comparing business object instances
A Connector Agent view can compare two business objects of the same type
and display the attributes that differ in value. You can use this function
to view changes to a business object at different points in the execution
of a transaction. For instance, you could compare a business object that
has been sent to the server with the same business object after the server
has processed it and returned it to the source connector. Do the following
to compare two business object instances:
-
Select the request business object instance to be compared on the Input
Pane.
-
Select the response business object to be compared on the Response Pane.
-
Click the down arrow in the right-hand corner of the title bar of the Connector
Agent view and select Reply > Compare BO's.
[ Top of Page | Table
of Contents ]
