You can create mapping between attributes and operations of application services, business objects, and external services.
If operation S is mapped to operation T, then:
The following scenarios are supported:
Structure of CRUD operations for Mapping
When mapping CRUD operations, refer to the table below:
Operation | Input Message Attributes | Output Message Attributes | Description |
---|---|---|---|
create |
Custom key, mandatory, default, and optional create attributes |
Custom key attributes |
Requires only the absolute minimum of parameters for the object to be created. If you need to set values to additional attributes, either mark them as optional create attributes, or call the UPDATE operation immediately after the create one. If the value of the custom key is generated by the external system, you should map it in the output mapping. |
read |
Custom key attributes |
All attributes |
Requires the custom key attributes so that the external system can identify the object. |
update |
All attributes |
None |
Requires the custom key attributes to identify the object. All other attributes are required because any of them may need to be changed. No output is needed because if the operation is not successful, it throws an exception. |
delete |
Key |
None |
Requires the custom key attributes to identify the object. No output is needed because if the operation is not successful, it throws an exception. |
Constant Mapping Values
On the Datasource tab page there is a list of all mappings for the selected operation in the table below the mapping trees. You can set constants which are assigned to the target attribute if the result of the attribute mapping is a null value.
To do this, enter the constant in the target attribute Fixed Value field. The Is Null checkbox indicates that there is no value in the Fixed Value field. If Is Null is unchecked and the Fixed Value field is empty, an empty string is used as the value.
It is important to be able to determine unambiguously the cardinality of every target attribute during a concrete message mapping execution. Most of the restrictions below work towards this goal. The examples use these message structures:
There are several types of attribute mappings:
Common Conditions
Conditions for Collection Mappings
Source collection's maxOccurs <= target collection's maxOccurs - switched on by default, but you can switch it off using the property IgnoreMinMaxOccursConstraints.
Right: A -c-> O and A -c-> Q
Wrong: A -c-> O and A -c-> O/p
Right: A -c-> O and A/B -c-> O/p
Wrong: A/B -c-> O/p (without A -c-> O)
Right: A -c-> O and A/B -c-> O/p
Wrong: A -c-> Q and A/B -c-> O/p
Conditions for Ordinary Mappings
Right1: A -c-> Q and A/c -o-> Q/r
Wrong1: A/c -o-> Q/r (without A -c-> Q)
Right2: A -c-> O and A/d -c-> O/p and A/d -o-> O/p
Wrong2: A -c-> O and A/d -o-> O/p (without A/d -c-> O/p)
Right1: A -c-> Q and A/c -o-> Q/r
Wrong1: A -c-> Q and A/c -o-> O/p
Right2.1: A -c-> O/p and A/c -o-> O/p
Right2.2: A -c-> O and A/c -o-> O/p
Wrong2: A/c -o-> O/p (without A -c-> ...)
Right3.1: A -c-> O and A/d -c-> O/S and A/d -o-> O/S/t
Right3.2: A -c-> O and A/d -c-> O/S/t and A/d -o-> O/S/t
Wrong3: A -c-> O and A/d -o-> O/S/t (without A/d -c-> ...)
CAF supports all mappings between attributes with the same simple type as well as the following cases (Java representations of XSD types as defined by JAXB):
In all other cases, the generated mapping classes may have compilation errors or may not function properly.