In order to be able to merge fragments using different methods, you need to define multiple merge methods. To do this, the key and priority attributes are added to the merger configuration (eventmerge XML element).
The value of the key attribute specifies the name of the merge method and is referenced by the AT_INTERNAL_EVENT_MERGE_MODE graph attribute for fragments to be imported. If fragments with different merge methods are merged during an import operation, the method with the lowest priority (priority XML element) is used.
The default merge method is used for fragments for which the AT_INTERNAL_EVENT_MERGE_MODE attribute is not specified. The default method is the one that is defined in the merge configuration without specifying a key.
Warning
Specify different priorities for all merge methods.
To specify the merge method to be used for different system event types, specify the key for the relevant merge method in the AT_INTERNAL_EVENT_MERGE_MODE process attribute for the fragment definition EPCs. All system events imported with this fragment definition are then automatically merged using the specified method.
Warning
If the merge method specified in the fragment to be imported does not exist, the fragment is not imported and an error message is displayed. The error message is also saved in the AT_MERGE_ERROR_MESSAGE attribute for the corresponding fragment. In addition, the value true is entered for the AT_MERGE_ERROR_FLAG attribute.
Example
The following merge configuration is used for the data import and defines 3 methods:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE mergerconfig SYSTEM "mergerconfig.dtd">
<mergerconfig>
<mergehandling>
<eventmerge priority="10">
<mode>
<keymerge/>
</mode>
</eventmerge>
<eventmerge key="SORTMERGE_ID" priority="3">
<mode>
<sortmerge>
<criterion name = "AT_ID" />
</sortmerge>
</mode>
</eventmerge>
<eventmerge key="SORTMERGE_DATE" priority="4">
<mode>
<sortmerge>
<criterion name = "AT_START_TIME" />
</sortmerge>
</mode>
</eventmerge>
</mergehandling>
</mergerconfig>
Fragments without the AT_INTERNAL_EVENT_MERGE_MODE attribute are merged using the key-based merge method. Fragments with the attribute value SORTMERGE_ID are merged based on sort order according to the AT_ID function attribute. Fragments with the attribute value SORTMEGRE_DATE are merged based on sort order according to the AT_START_TIME function attribute.