This topic applies only to the IBM Business Automation Workflow Advanced
configuration.

JCA Interaction Spec and Connection Spec dynamic properties

Draft comment:
This topic only applies to BAW, and is located in the BAW repository. Last updated on 2025-03-13 12:15
The EIS binding can accept input for the InteractionSpec and ConnectionSpec specified by using a well-defined child data object that accompanies the payload. This allows for dynamic request-response interactions with a resource adapter through the InteractionSpec and component authentication through the ConnectionSpec.

The javax.cci.InteractionSpec carries information on how the interaction request with the resource adapter should be handled. It can also carry information on how the interaction was achieved after the request. These two-way communications through the interactions are sometimes referred to as conversations.

The EIS binding expects the payload that will be the argument to the resource adapter to contain a child data object called properties. This property data object will contain name/value pairs, with the name of the Interaction Spec properties in a specific format. The formatting rules are:
  • Names must begin with the prefix IS, followed by the property name. For example, an interaction spec with a JavaBeans property called InteractionId would specify the property name as ISInteractionId.
  • The name/value pair represents the name and the value of the simple type of the Interaction Spec property.

In this example, an interface specifies that the input of an operation is an Account data object. This interface invokes an EIS import binding application with the intention to send and receive a dynamic InteractionSpec property called workingSet with the value xyz.

The business graph or business objects in the server contain an underlying properties business object that permits the sending of protocol-specific data with the payload. This properties business object is built-in and does not need to be specified in the XML schema when constructing a business object. It only needs to be created and used. If you have your own data types defined based on an XML schema, you need to specify a properties element that contains your expected name/value pairs.
 BOFactory dataFactory = (BOFactory) \
 serviceManager.locateService("com/ibm/websphere/bo/BOFactory");
  //Wrapper for doc-lit wrapped style interfaces,
  //skip to payload for non doc-lit
  DataObject docLitWrapper = dataFactory.createByElement /
  ("http://mytest/eis/Account", "AccountWrapper");
Create the payload.
DataObject account = docLitWrapper.createDataObject(0);
  DataObject accountInfo = account.createDataObject("AccountInfo");
  //Perform your setting up of payload


  //Construct properties data for dynamic interaction
  
  DataObject properties = account.createDataObject("properties");
For name workingSet, set the value expected (xyz).
properties.setString("ISworkingSet", "xyz");


  //Invoke the service with argument

  Service accountImport = (Service) \
  serviceManager.locateService("AccountOutbound");
  DataObject result = accountImport.invoke("createAccount", docLitWrapper);               

  //Get returned property
  DataObject retProperties = result.getDataObject("properties");

  String workingset = retProperties.getString("ISworkingSet");
You can use ConnectionSpec properties for dynamic component authentication. The same rules apply as above, except that the property name prefix needs to be CS (instead of IS). ConnectionSpec properties are not two-way. The same properties data object can contain both IS and CS properties.

To use ConnectionSpec properties, set the resAuth specified on the import binding to Application. Also, make sure the resource adapter supports component authorization. See chapter 8 of the J2EE Connector Architecture Specification External link opens a new window or tab for more details.