ReturnTestResult collaboration template

The ReturnTestResult collaboration template is used to return a test result. ReturnTestResult is used together with a TestDSLServiceProcessing collaboration object. TestDSLServiceProcessing collaboration is used for requesting a configuration test.

ReturnTestResult uses the Generic TestResult business object to represent a test result.

This collaboration template uses the ProcessContext attribute of generic business objects to maintain process information between two or more collaboration objects. In order to maintain this information, the collaboration object performs the following actions, starting from when it receives a triggering business object:

Collaboration object setup

This section includes information on port bindings and required steps for setting up collaboration objects based on this collaboration template. For information on standard features, ports, and configuration properties for collaboration templates, and for general information on creating collaboration objects refer to the documents listed in Required documents for creating collaboration objects.

Port information

The following diagram illustrates ReturnTestResult's ports:

ReturnTestResult collaboration's ports

Note: To keep the collaboration object from using a port, bind that port to the Port connector. Doing so indicates that the port is unused without causing the collaboration object to provide additional functionality.

Port name: From
Business object Bound to Function Verbs used
TestResult

Caller application

Receives the triggering business object

Create


Port name: To
Business object Bound to Function Verbs used
TestResult

Requester

Sends the triggering business object out of the collaboration object Create

Setting up the collaboration object

To set up ReturnTestResult as a stand-alone collaboration object, complete the following steps:

  1. Create the ReturnTestResult collaboration object.
  2. Bind the collaboration object's ports as described in Port information.
  3. Set the configuration properties for ReturnTestResult.

Collaboration template processes

This section illustrates the following business processes for this collaboration template:

Overall process logic

The following diagram shows the process logic for this collaboration template's Create verb.

ReturnTestResult Validate process logic

Compensation processing

IBM WebSphere InterChange Server provides the ability to roll back a transaction upon the failure of any step in the transaction. For example, when this collaboration object is a member of a collaboration object group, its process is one subtransactional step in a larger process. If any step fails in the collaboration object group's processes, IBM WebSphere Business InterChange Server allows you to roll back the processing of every collaboration object in the group.

When this collaboration object is used independently of other collaboration objects, its process comprises a single transactional step. In such a situation, it is not necessary to perform a rollback.

To cause a collaboration object or a collaboration object group to perform rollback requires modifying the collaboration template. To understand transaction processing by IBM WebSphere InterChange Server, see the Technical Introduction to IBM WebSphere InterChange Server. For information on adding transaction processing to the collaboration template, see the Collaboration Development Guide.

To extend the collaboration object to handle transaction processing, complete the following steps:

  1. Add this capability to the collaboration template and to every other collaboration template used in the collaboration object group.
  2. Set the minimum transaction level of the collaboration object and all members of the collaboration object group to a value higher than None. If a failure occurs in any subtransaction step, settings of Minimal Effort or higher cause the collaboration object and member collaboration objects in the group to execute compensation for Create, Update, and Delete operations performed on all business objects.
  3. Set the USE_RETRIEVE property of the collaboration object and all members of a collaboration object group to true. Forcing the collaboration objects to retrieve values before changing them allows the collaborations objects to restore the original values in an Update or Delete process.

Configuration properties

This section describes the following properties for this collaboration template:

Standard properties

This collaboration template uses the following standard configuration properties:

Properties specific to this collaboration template

The following properties are specific to this collaboration template:

SUCCESSFUL_COMPLETION_STATUS

This property is used to determine whether the requested test was performed or not. If one of the listed values in this property is the same as the  TestResult.CompletionStatus attribute, this collaboration object assumes that the test was performed. If not, the collaboration object assumes that the test was not performed and handles an error according to RETURN_COMPLETION_STATUS_ERROR property.

SUCCESSFUL_COMPLETION_STATUS configuration property
Possible values Usage
A comma-delimited list of values Provides values to match against the TestResult.CompletionStatus attribute
success (default value)  

RETURN_COMPLETION_STATUS_ERROR

This property is closely related to the SUCCESSFUL_COMPLETION_STATUS property. This property specifies collaboration behavior only when a test was not performed.

RETURN_COMPLETION_STATUS_ERROR configuration property
Possible values Usage
true (default value) Causes this collaboration object to send the triggering business object to the destination without throwing an exception
false Causes this collaboration object to throw an exception instead of sending the triggering business object to the destination

RETURN_TEST_RESULT_ERROR

This property affects collaboration object behavior only when the test was performed and failed. This collaboration uses SUCCESSFUL_COMPLETION_STATUS property to determine whether the test was performed or not, and uses the value of the TestResult.Result attribute to determine whether the test succeeded or failed. If the value of this attribute is true, this collaboration object assumes that the test succeeded. This property affects collaboration object behavior only when the test was performed and failed.

RETURN_TEST_RESULT_ERROR configuration property
Possible values Usage
true (default value) Causes this collaboration object to send the triggering business object to the destination without throwing an exception
false Causes this collaboration object to throw an exception instead of sending the triggering business object to the destination

Copyright IBM Corp. 2002, 2003