Merger Principles
When upgrading your EV6 installation with a new version, the changes that may have been done to original mask files have to be transferred to the customized ones, according to the following process:

The merger algorithm is based on comparison between 3 sorted tree structures, loaded from previous DEFAULT, current DEFAULT and previous customization mask files.
Thus, file content is automatically sorted when loaded; but node’s weight (it’s line offset v/s its parent node) is kept to sort back the resulting tree according to the weight of added nodes in the sub trees, when it is important:
- list of authorized values (VALUE)
- ordered list of attributes use (FATTR)
Important: merging nodes coming from different trees (NEW or CUSTO) and recombining them according to their weight in these different trees may lead to “bizarre” orders, semantically speaking, although this is a normal behaviour. See example in Limitation 1.
Comparisons are made between nodes of each tree, and an action is deduced according to the result of these comparisons. This is summarized and detailed in the following table.
Actions:
Action |
Description |
Add node
|
the node and its sub tree are cloned and added in the result tree |
Keep node
|
the node is kept and comparisons and actions are launched in the node sub tree, that's why deep-first = yes for keep action |
Ignore node
|
the node and its sub tree are ignored (they do not appear in the result tree) |
Node origin:
Action |
Description |
Ref |
Previous DEFAULT version (n) |
New |
Current DEFAULT version (n+1) |
Cus |
Previous Customized version (n) |
Table:
External Pattern |
Results |
Next Iteration |
Situation description |
Recommendation |
Alternate |
deep first |
next sibling |
Action |
Node |
Action |
Node |
Ref |
New |
Cus |
No change |
Keep |
Cus |
|
|
Yes |
X |
X |
X |
Node value changed in Cus |
Keep |
Cus |
|
|
Yes |
X |
X |
X |
Node value changed in New |
Keep |
New |
Keep |
Cus |
Yes |
X |
X |
X |
Node added in Cus |
Add |
Cus |
|
|
No |
|
|
X |
Node added in New |
Add |
New |
Ignore |
New |
No |
|
X |
|
Node removed from Cus |
Ignore |
New |
|
|
No |
X |
X |
|
Node removed from New |
Ignore |
Cus |
Keep |
Cus |
No (yes) |
X |
|
X |
Same node added in Cus & New |
Keep |
Cus |
|
|
Yes |
|
X |
X |
Same node removed from Cus & New |
Ignore |
Ref |
|
|
No |
X |
|
|
Same node removed from Cus + node value changed in New |
Ignore |
New |
|
|
No |
X |
X |
|
Same node removed from New + node value changed in Cus |
Ignore |
Cus |
Keep |
Cus |
No (yes) |
X |
|
X |
Node value changed in Cus & New (same value) |
Keep |
Cus |
|
|
Yes |
X |
X |
X |
Node value changed in Cus & New (different values) |
Keep |
Cus |
Keep |
New |
Yes |
X |
X |
X |
Same node added in Cus & New + but node values differ |
Keep |
Cus |
Keep |
New |
Yes |
|
X |
X |
In some cases, a doubt may exist; an alternate action may be performed. This may be defined through a rule file describing the actions to be taken in such cases (X+4 limitation: only the recommended action is performed, no rule file is considered).
The Next iteration columns define complementary actions that have to be performed:
deep first
If set to yes, the merging process has to be performed on current node’s sub-levels BEFORE the resulting recommended (or alternate) action.
next sibling
It defines in which tree(s) the current node’s cursor has to be moved to the next sibling AFTER the resulting action.

Mask Merger Syntax
VPLMPosMaskMerger is a server-side batch program (a shell on UNIX), located in:
- INSTALL_PATH\server\win_b64\code\command (on Windows)
- INSTALL_PATH/server/scripts (on UNIX).
The mask merger merges all mask files listed in the previous customization directory of each specified mask name (<previous_custo_dir>/vplm/mask/<mask_name>).
The merge is based on previous and current DEFAULT version, and of course the previous customization version of each mask file.
Each merged file is generated in a sub-directory of the output directory, depending on the specified mask name (<output_dir>/vplm/mask/<mask_name>). Note that not existing output sub-directories are automatically created, if possible (an error is raised otherwise).
Note: the merger does not use the PLM Dictionary to make additional checks, as the mask compiler does (for instance, checking an entity really exists). It only requires mask files to have a correct mask file syntax.
IMPORTANT: as only mask files (mask sources) are merged – and not SecurityMask files (result) – the administrator has to compile them using the VPLMPosMaskCompiler tool after merge, and redeploy the compiled SecurityMask file in the Web Application Server.
VPLMPosMaskMerger [-h]
-m <mask_name> [<mask_name> ...]
-p <previous_DEFAULT_dir> <current_DEFAULT_dir> [<previous_custo_dir>]
[-d <output_dir>]
The syntax is as follows:
Keyword
|
Description |
-h |
Dump help |
-m <mask_name> |
The list of customized mask names whose mask files have to be merged. |
-p <previous_DEFAULT_dir> <current_DEFAULT_dir> [<previous_custo_dir>] |
Specifies the base directories of mask files:
|
[-d <output_dir>] |
Specifies the output location of generated files:
- merger.log file
the generated mask file(s).
Any mask file found in the <previous_custo_dir>/vplm/mask/<mask_name> subdirectory of each <mask_name> parameter is merged, and generated in a corresponding output filetree structure : <output_dir>/vplm/mask/<mask_name> (sub-directories are created if necessary). If this option is not specified, the current path is used as output. Rule: the output directory must be different from the <previous_custo_dir>.
|
Example
Let’s consider the following filetrees:
/previousInstallation
/vplm
/mask
/DEFAULT
PLMProductDS.mask
…
/MYMASK
PLMProductDS.mask
/currentInstallation
/vplm
/mask
/DEFAULT
PLMProductDS.mask
...
Executing:
VPLMPosMaskMerger -m MYMASK -p /previousInstallation /currentInstallation
merges all MYMASK customized mask files located in:
/previousInstallation/vplm/mask/MYMASK directory
according to their DEFAULT versions located in:
/previousInstallation/vplm/mask/DEFAULT
and:
/currentInstallation/vplm/mask/DEFAULT
directories (previous and current version, respectively), and generates merged version of mask files in:
./vplm/mask/MYMASK
If we consider there is only one file named PLMProductDS.mask in the /previousInstallation/vplm/mask/MYMASK directory, only one merged file will be generated:
./vplm/mask/MYMASK/PLMProductDS.mask