Control attributes
Specific mechanisms during Import can be controlled by a number of control attributes, which are configured as fields of the respective nodes in the import structure.
Control attribute |
Value |
Short description |
core:clear |
true/false |
Removes all entries from a list. |
core:delete |
true/false |
Removes a single element. |
core:index |
0,1,... |
Identifies an element in a list by its sequence position (not supported for all lists). |
core:updateOnly |
true/false |
When true, the list entry is not added if it could not be resolved. |
|
true/false |
Skips resolving the data of an object before updating – replaced by: core:mode="NO_RESOLVE". |
core:mode |
|
Specifies the merging mode of the node. The default value is INHERITED which corresponds to the mode of the parent mode. Therefore the default mode is APPEND. |
INHERITED |
Use the parent object mode. |
|
APPEND |
Mapped values are taken over and merged. |
|
OVERWRITE |
Mapped values are taken over and merged. |
|
NO_RESOLVE |
No existing data will be resolved. Therefore, only mapped data will be taken over. |
|
core:listMode |
|
Specifies the merge mode of a list. The default value is INHERITED which corresponds to the mode of the parent mode (core:mode). The list mode is never inherited! Therefore the default mode is APPEND. |
INHERITED |
Use the parent object mode. |
|
APPEND |
Mapped values are taken over and merged. Unmapped values are retained. |
|
OVERWRITE |
Mapped values are taken over and merged. Unmapped values are discarded. |
|
base:keepChildren |
true/false |
Valid only for core:listMode="OVERWRITE" on a"<lineItem>" node of a hierarchical business object. All unmapped child line items are taken over anyway. |
base:keepTrees |
Line item prefix or regular expression |
Valid only for core:listMode="OVERWRITE" on a"<lineItem>" node of a hierarchical business object. All applicable unmapped line items will be copied over. A list separated by "," can be specified. The single values can be a prefix or a regular expression: base:keepTrees="1.,2.,ORD,/^X[0-9]/" |
Control node |
Value |
Brief description |
core:itemMatcher |
The first object of a list that matches the configured rule is used for updating. |
The use of each attribute is explained by means of examples:
Common to all cases is the following checklist for creating the attribute field in Lobster_data:
The field is in the correct position within the import structure?
The field name combines the name of the control attribute (clear, delete, index, skipResolve) with the suffix "_attr"?
The appropriate value is assigned to this attribute as a fixed value, by mapping or functions?
The data type matches the assigned value?
The entry core was assigned to the 'XML Namespace' property?
The following screenshot illustrates the items of the checklist in the editor for the target structure of a lobster_data profile:
|
The example shows a node that deletes the first entry of a plural text attribute within an address. (1) Position The correct position for the field that defines the core:delete attribute is highlighted on the screen by selection. In contrast, the control attribute core:index (highlighted with a frame) must be defined as a field of the value node. (2) Name Between the actual name of the control attribute (delete) and the suffix (_attr), that identifies the field as an attribute, an extension (#accessCode) appears in the field name, which is required to create a unique name. This does not appear in XML output for the target structure. (3) Value The Fix value true is statically assigned here as the value of the control attribute. (4) Data type The appropriate Data type in this case is 'Boolean'. (5) XML namespace The core assignment for the XML namespace property of the field appears as a prefix in the XML output for the target structure. |
In cases of doubt, it is advisable to inspect the generated target structure (XML), where deviations from the objective structure may be easier to recognize than in the profile itself.
... <base:AddressText core:delete="true"> |