IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with adapters > Configure and using adapters > IBM WebSphere Adapters > Email > Reference > Globalization
Bidirectional transformation in business objects
For outbound processing, you can modify the business objects to enable the bidirectional transformation of the headers in the WebSphere Adapter for Email business object and the data in content-specific business objects.
Add an annotation to the complex type of the business object to specify the bidirectional formatting attributes in the following files:
- For the generic business object, change the email.xsd file.
- For the user-defined business object, change the custom wrapper (for example, the CustomWrapper.xsd file).
- For the SimpleAlertEmail business object, change the SimpleAlertEmail.xsd file.
- For all the custom data type business objects such as the WbiAddress.xsd file, use WbiPhone.xsd.
The following sections include annotations that can serve as examples.
Bidirectional formatting attributes of the business object
The following annotation, which contains the bidirectional context information, applies to all the headers in the email business objects. The EmailWrapperDataBinding uses the bidirectional information in the element BiDiContext to transform the header values.
<complexType name="Email"> <annotation> <appinfo source="http://www.ibm.com/xmlns/prod/websphere/j2ca/ datatransformation/databindingmapping"> <dtm:DataBindingMapping xsi:type="dtm:DataBindingMapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dtm="http://www.ibm.com/xmlns/prod/websphere/j2ca/ datatransformation/databindingmapping"> <BiDiContext> <orientation>rtl</orientation> <textShape>nominal</textShape> <orderingScheme>visual</orderingScheme> <symmetricSwapping>true</symmetricSwapping> <numeralShapes>nominal</numeralShapes> </BiDiContext> </dtm:DataBindingMapping> </appinfo> </annotation>
Bidirectional formatting attributes of the wrapper
You can add an annotation to the wrapper business object that is the user-defined type. The annotation in the wrapper business objects such as the generic (email) and the user-defined type (CustomerWrapper) is used to do bidirectional transformation of wrapper attributes (header values). The content-specific business objects used inside the wrapper business objects are not transformed using annotation in the wrapper business objects. To transform content-specific business objects, you must edit the respective business object definition to add the annotation shown in the previous example for bidirectional formatting attributes of the business object.
The following annotation is an example for the wrapper:
<complexType name="Customer"> <annotation> <appinfo source="http://www.ibm.com/xmlns/prod/websphere/j2ca/ datatransformation/databindingmapping"> <dtm:DataBindingMapping xsi:type="dtm:DataBindingMapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dtm="http://www.ibm.com/xmlns/prod/websphere/j2ca/ datatransformation/databindingmapping"> <BiDiContext> <orientation>rtl</orientation> <textShape>nominal</textShape> <orderingScheme>visual</orderingScheme> <symmetricSwapping>true</symmetricSwapping> <numeralShapes>nominal</numeralShapes> </BiDiContext> </dtm:DataBindingMapping> </appinfo> /annotation>