A behaviour can act as a source of events that cause a stub to execute an operation that is not a reaction to an incoming message from an external system. For example, you might want to create a stub that can proactively publish messages that are not just "responses" to an incoming message.
After you have defined one or more behaviors on the Behaviour tab, you can use them as "events" on the Events tab.
The lower half of the tab comprises a Configuration window that displays details about any behavioral entity with custom instance names.
The following table outlines the default behaviour-types that are supplied with IBM® Rational® Integration Tester.
Behaviour-Type | Description |
---|---|
Lifecycle | This enables you to execute certain actions when the currently
selected stub starts up or shuts down. For example, you can set up and later clean up any resources that may be required by the stub. |
Timer | This enables you to set up a timer that schedules a future
callback after a specified delay so that the stub will receive an
event to which it can respond. Note: Callback timer
settings for a stub can be overridden for each event created for the
stub (for information about this, refer to Events tab).
|
The following table describes the buttons on the upper half of the Behaviour tab.
Button | Description |
---|---|
Add | Clicking this button opens the Add Behavioral Entity dialog
box. The
upper left side of the Add Behavioral Entity dialog box displays the
available behaviour-types. The upper right side of the Add Behavioral
Entity dialog box displays a description for each selected behaviour-type.
The default available behaviour-types are as follows:
The lower half of the Add Behavioral Entity dialog box displays the available sample behaviors for the currently selected behaviour type. The Instance field is used to refer to the behavioral entity in function actions. This field is an optional field that enables you to create multiple instances of a behaviour. Based on the selected behavior, a default instance name is displayed. If required, you can specify a different instance name. The
following type of behaviors are listed:
An example of calling a Function Action from the logon
event for setting a timer to log out the user from a session after
a period of time.
In
this example:
Note: To select multiple behaviors for a behavioral
entity, hold the CTRL key and click each behaviour after selecting
a behaviour-type on the upper left side of the Add Behavioral Entity
dialog box.
After specifying the properties of a behaviour, click Add to complete creating the behaviour and to close the Behaviour dialog box. Note: In addition to being displayed on the list window on
the upper left side of the Behaviour tab, each
newly created behavioral entity also has its events (qualified by
the name of the behaviour instance) available as values in the Events field
on the Events tab for the stub. For more information,
see Events tab.
|
Edit | Clicking this button opens the Edit Behavioral Entity dialog box, which enables you to modify instance details for the selected behavioral entity. |
Delete | Clicking this button deletes any behavioral entities selected
in the list window on the tab. Note: To select multiple
behavioral entities for deletion, hold down CTRL and click each entity.
|