Maintains a simple identity relationship from
within either a parent or child map.
Syntax
public static void maintainSimpleIdentityRelationship(
String relDefName, String particpntDefName,
BusObj appSpecificBusObj, BusObj genericBusObj,
CxExecutionContext map_ctx)
Parameters
- relDefName
- The name of the simple identity relationship (as defined in
Relationship Designer Express) in which this attribute
participates.
- particpntDefName
- The name of the participant definition that represents the
application-specific business object.
- appSpecificBusObj
- The variable that contains the application-specific business
object used in this map.
- genericBusObj
- The variable that contains the generic business object used in
this map.
- map_ctx
- The map execution context. To pass the map execution context,
use the cwExecCtx variable, which Map Designer
Express defines for every map.
Return values
None.
Exceptions
- RelationshipRuntimeException
- see the Notes section for more information on when this
exception is thrown.
- CxMissingIDException
- If a participant does not exist in the relationship tables
during a map execution with a verb of Retrieve and an calling context of SERVICE_CALL_REQUEST. The
connector sends a "service call request failed" message to the
collaboration without sending the business object to the
application.
Notes
The maintainSimpleIdentityRelationship() method
maintains the relationship table associated with the
particpntDefName participant of the
relDefName simple identity relationship. This
method maintains a relationship whose participant uses unique
keys from multiple business
objects at the same level.
The maintainSimpleIdentityRelationship() method
performs the following
validations on arguments that are passed in:
- Validate the name of the relDefName
relationship definition.
- Validate the name of the particpntDefName
participant definition for the application-specific business
object.
- Make sure that the application-specific
(appSpecificBusObj) and generic business objects
(genericBusObj) are not null.
- Make sure that the relDefName relationship is
an identity relationship. In addition, the participant definition
in relDefName that represents the generic business
object must be defined as IBM WebSphere InterChange Server
Express-managed. For more information on how to specify these
settings, see "Defining identity
relationships".
- Make sure the calling context is valid (see Table 73 for a
list of valid calling contexts).
- Make sure that the application-specific business object's verb
is supported. It must be one of the following: Create, Update,
Delete, Retrieve.
If any of these validations fails,
maintainSimpleIdentityRelationship() throws the
RelationshipRuntimeException exception.
Once the arguments are validated, the action that
maintainSimpleIdentityRelationship() takes depends on the
following information:
- The calling context--in the map execution context, passed in as
part of the map_ctx argument
(cwExecCtx)
- The verb--in the source business object
- Application-specific business object
(appSpecificBusObj) for calling contexts EVENT_DELIVERY (or ACCESS_REQUEST) and SERVICE_CALL_RESPONSE
- Generic business object (genericBusObj) for
calling contexts
SERVICE_CALL_REQUEST and
ACCESS_RESPONSE
The maintainSimpleIdentityRelationship() method handles
all of the basic adding and deleting of participants and
relationship instances for each combination of calling context and
verb. For more information on the actions that
maintainSimpleIdentityRelationship() takes, see "Accessing identity
relationship tables". Table 74 through
Table 78
provide the actions for each of the calling contexts.
You can call this method in either of the following cases:
- In the transformation step for the key attribute of a parent
object
- In the transformation step for the key attribute of a submap
that transforms child business objects if the child business
objects are related using a unique key.
Use maintainSimpleIdentityRelationship() in conjunction
with the maintainChildVerb() method to maintain a simple
identity relationship. For more information, see "Defining
transformation rules for a simple identity relationship".
Examples
The following example maintains the simple identity relationship
between the Clarify_BusOrg and generic Customer
business objects in an inbound
Clarify_BusOrg-to-Customer map:
IdentityRelationship.maintainSimpleIdentityRelationship(
"CustIdentity",
"ClarBusOrg",
ObjClarify_BusOrg,
ObjCustomer,
cxExecCtx);
For more examples involving
maintainSimpleIdentityRelationship(), see "Defining
transformation rules for a simple identity relationship".
See also
maintainChildVerb()
"Using
simple identity relationships"
