Standard processes for collaboration templates

This section describes the business process flow of a typical WebSphere InterChange Server collaboration. The standard processes include the following:

The business process flow differs depending on the triggering verb and values of the collaboration object's configuration properties.

Retrieve process

A collaboration can receive a triggering business object that uses the Retrieve verb. It is assumed that a source application's business object uses this verb when its attributes contain cross-referenced key values. The business object's map and the destination application's connector use the primary key to return the business object from the destination application.

Figure 91 illustrates a collaboration's process for retrieving business objects when the triggering verb is Retrieve.

Figure 91. Retrieve process

The figure shows the retrieve process as follows: 1) The process starts from main. 2) The business object is sent to the destination. The fail path is a business object with no values. 3) Successful send of business object contains values from the destination application. 4) Either path returns end success to the main flow.

Use_Retrieve process

Figure 92 illustrates a collaboration's Use_Retrieve Process when its USE_RETRIEVE configuration property evaluates to true. For information about the configuration property, see its entry in TABLEA3.

Figure 92. Use_Retrieve process

The figure shows the processing for a business object with the use_retrieve property. On the fail path, the following is done dependent on the verb:   Business Object Verb Action Create Return to main. Delete Raise exception. Update If convert_update is false, raise an exception. Otherwise change the verb to create and return to main. None of the above Raise exception.  For the success path, the processing depends on the conditions in the following:   Condition Action If the verb is delete. Return to main. If the verb is not delete. Test to see if the business objects are equal. If so, raise an exception. If not, determine what the verb is. If the business objects are not equal, is the verb update? If the verb is update, return to main. If not, check to see it the verb is create. Is the verb create? If not, raise an exception. If so, is convert_update true? If convert_update is false, raise an exception. If convert_update is true, change the verb to update and then return to main.   Note:All exceptions are sent through the email process.

Table 102 illustrates the relationship between the setting for the USE_RETRIEVE and CONVERT_CREATE properties when the triggering verb is Create. The relationship is similar between the USE_RETRIEVE and CONVERT_UPDATE properties.

Table 102. Relationship between the USE_RETRIEVE and CONVERT_CREATE properties

Value of USE_RETRIEVE Value of CONVERT_CREATE Action
true True Retrieve the business object from the destination application.

If the destination application does not return a business object, send the business object with the Create verb to the destination application.

If the destination application returns a business object, check whether the source and destination business objects are identical:

  • If they are identical, raise an exception stating that the business objects are identical and stop processing.
  • If they are not identical, convert the Create verb to the Update verb and send the business object to the destination.
false True Send the business object with the create verb to the destination application.
  • If the destination application fails to create the business object, convert the Create verb to the Update verb and resend the business object.
  • If the destination application succeeds in creating the business object, continue processing.
false False Send the business object with the Create verb to the destination application.
  • If the destination application fails to create the business object, raise an exception and stop processing.
  • If the destination application succeeds in creating the business object, continue processing.
true False Retrieve the business object from the destination application.

If the destination application does not return a business object, send the business object with the Create verb to the destination application.

If the destination application returns a business object, determine whether the source and destination business objects are identical.

  • If they are identical, raise an exception stating that the CONVERT_CREATE property value evaluates to false and stop processing.
  • If they are not identical, raise an exception and stop processing.

Filtering process

Figure 93 illustrates a collaboration's process for filtering business objects based on values in specified attributes.

Figure 93. Filtering process

The figure is a flow of the filtering process. The assumptions follow. First, the process determines if the verb is delete. If so, the process returns to main because filtering is unnecessary. If the verb is not delete, determine if x_exclude_values is none and x_include_values is all. These tests are performed for each and every x_filter_attribute in the business object. If those tests evaluate to true, the process returns to main. If the tests evaluate to false, the process compares the value of x_filter_attribute to x_exclude attribute. If the valudes do not match, the process compares the value of x_filter_attribute to x_include_values. If x_filter_attribute and x_include_values match, the process returns to main.  If x_filter_attribute and x_exclude_values match, the process checks to see if x_fail_on_invalid_value is true. This test is also performed if x_filter_attribute and x_include_values do not match. If x_fail_on_invalid_value is true, the process raises an exception. If x_fail_on_invalid_value is false the process tests if the attribute is on a child business object.  If the attribute is on a child business object, the child is removed from the array and the process returns to main.  If the attribute is not on a child business object, the process returns to main.

The above graphic refers to filter configuration properties with an "X_" rather than "1_" because you can add sets of filtering configuration properties to the collaboration in order to filter on multiple attributes. For more information on adding filter properties, see Filtering data in the triggering business object and Table 103.

To understand the collaboration's behavior when 1_FAIL_ON_INVALID_VALUE evaluates to false, assume that a top-level business object named BusObjA contains an array of child business objects named BusObjB. Assume further that each BusObjB child business object contains an array of child business objects named BusObjC. To filter on an attribute named Type in the BusObjB business object, set the value of 1_FILTER_ATTRIBUTE to BusObjA.BusObjB.Type. To exclude all business objects whose Type contains the value of "Non-standard", set the value of the 1_EXCLUDE_VALUES property to "Non-standard".

Now assume that one of the business objects in the array of BusObjB has a value of "Non-standard" in its Type attribute and that 1_FAIL_ON_INVALID_VALUE evaluates to false. The collaboration removes this business object and its child business objects from processing.

Note:
If the attribute that fails filtering is contained by the top-level business object, the collaboration continues processing the entire business object.

Additional_Retrieve process

If a collaboration's ADDITIONAL_RETRIEVE property evaluates to true, the collaboration retrieves the business object from the destination application after it has successfully synchronized the data. This property is useful when the source application requires a full-valued business object to be returned from the destination application, but the destination application's connector does not send back a complete business object after creating or updating its data. For more information on the ADDITIONAL_RETRIEVE configuration property, see Standard properties for collaboration templates.

Figure 94 illustrates a collaboration's Additional Retrieve process.

Figure 94. Additional Retrieve process

The figure shows the additional_retrieve process. Entering the process from main, the process sends the business object with the retrieve verb to the destination. If the retrieve fails, the process raises an exception. If the send succeeds, the verb is reset to the triggering verb and the process copies the business object to the triggering BusObj variable.

Email process for error handling

The settings of a collaboration's SEND_EMAIL and INFORMATIONAL_EXCEPTIONS properties determine whether the collaboration does one of the following:

Figure 95 illustrates a collaboration's process for sending email and determining whether a particular exception can cause the collaboration to end in failure.

Figure 95. Email process for error handling

The figure shows the flow of the email process. Control comes from main to the process which checks to see if the value of send_email is all or a specific message number. If the value is true, the email is sent. If not, an email is not sent. Either way, the process checks if informational_exceptions is either all or the message number. If this test evaluates false, the process raises an exception and ends in success. If informational_exceptions test evaluates to true, a level 1 trace is processed and then the process ends in success.

Copyright IBM Corp. 1997, 2004