Merge key rules are used for merging merge events within a process instance. In this way, the process instance fragments assigned using process keys are linked to form a process instance.
Merge keys are calculated from particular object attributes of the process instance fragment. They are used to reconstruct the process logic of the process instance and the unlinked fragments are linked accordingly.
PPM differentiates between two merge procedures:
The relevant merge procedure is specified in the XML configuration file *_merger.xml. The structure of this file is specified by the DTD mergerconfig.dtd.
File mergerconfig.dtd (Part 1)
<!ELEMENT mergerconfig ( mergehandling, connectorhandling? )>
<!ELEMENT mergehandling ( sharedfragmentmerge?, processmerge?, eventmerge+ )>
<!ATTLIST mergehandling eventmode (startevent | endevent | importtime) "importtime">
<!ELEMENT sharedfragmentmerge ( algorithm )>
<!ELEMENT processmerge ( algorithm?, mergeattributes?)>
<!ATTLIST processmerge
mode (replace|update) 'replace'>
<!ELEMENT eventmerge ( mode, condition?, algorithm? )>
<!ATTLIST eventmerge
key ID #IMPLIED
priority CDATA #IMPLIED>
<!ELEMENT condition EMPTY>
<!ATTLIST condition
classname NMTOKEN #REQUIRED
value (TRUE|FALSE) 'TRUE'
comment CDATA #IMPLIED>
<!ELEMENT algorithm EMPTY>
<!ATTLIST algorithm
classname NMTOKEN #REQUIRED
comment CDATA #IMPLIED>
<!ELEMENT mergeattributes (attribute+)>
<!ELEMENT attribute EMPTY>
<!ATTLIST attribute
key CDATA #REQUIRED>
<!ELEMENT mode ( keymerge | sortmerge )>
<!ELEMENT keymerge EMPTY >
<!ELEMENT sortmerge ( criterion*, algorithm? )>
<!ELEMENT criterion EMPTY>
<!ATTLIST criterion
name NMTOKEN #REQUIRED>
XML tag |
Description |
---|---|
mergerconfig |
Grouping of merge configuration |
mergehandling |
Merge type to be configured. At least the eventmerge element must be specified. |
sharedfragmentmerge |
Algorithm differing from the default algorithm for merging the shared fragments with process instance fragments |
processmerge |
Algorithm differing from the default algorithm for merging the process instance fragments. Available for selection are the modes Replace or Update. The default value is Replace. |
eventmerge |
Algorithm differing from the default algorithm for merging the merge events |
key |
ID that can be used to reference the eventmerge element. |
priority |
Priority of the eventmerge element – the lower the integer value, the higher the priority. |
condition |
Condition for merging of merge events |
classname |
Name of JAVA class, which checks the specified condition |
value |
Condition is met if checking by the JAVA class returns the specified value (TRUE or FALSE). The default value is TRUE. |
algorithm |
Calculation rule (JAVA class) |
classname |
JAVA class that implements a particular calculation rule |
mode |
Merge procedure for event merging |
keymerge |
Key-based event merge based on defined merge keys |
sortmerge |
Event merge based on sort order of functions |
criterion |
Criterion (function attribute) to be used as a basis for sorting the fragments. Multiple criteria can be specified. |
name |
Name of function attribute |
File mergerconfig.dtd (Part 2)
<!ELEMENT connectorhandling ( multiindegreehandling?, multioutdegreehandling?, andhandling?, orhandling?, xorhandling?)>
<!ELEMENT multiindegreehandling (algorithm) >
<!ELEMENT multioutdegreehandling (algorithm) >
<!ELEMENT andhandling (algorithm) >
<!ELEMENT orhandling (algorithm) >
<!ELEMENT xorhandling (algorithm) >
XML tag |
Description |
---|---|
connectorhandling |
Handling of connectors in process graphs by specifying a JAVA class (algorithm) |
multiindegreehandling |
Algorithm, which controls the inserting of connectors with multiple incoming connections for the object merge |
multioutdegreehandling |
Algorithm, which controls the inserting of connectors with multiple outgoing connections for the object merge |
andhandling |
Algorithm for handling of AND connectors |
orhandling |
Algorithm for handling of OR connectors |
xorhandling |
Algorithm for handling of XOR connectors |
Example
For linking process instance fragments, the key-based event merge is used.
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE mergerconfig SYSTEM "mergerconfig.dtd">
<mergerconfig>
...
<mergehandling>
<eventmerge>
<mode>
<keymerge/>
</mode>
</eventmerge>
</mergehandling>
...
</mergerconfig>
During the event merge, the combined set of attributes of both merge events is copied to the remaining event. Existing object attributes are not overwritten. The first merge event imported is deleted.