General idea
Snapshot export will generate a configuration file: config.json on the root level of the zip file. This configuration will hold some mandatory information for import snapshot.
{
"exportTime": "2019-01-23 12:18",
"functions": {
"nameStartsWith": ["demo.", "test2"]
"removeNotInSnapshot": false
},
"parameters": {
"nameStartsWith": ["pl.parameters.old"]
"removeNotInSnapshot": true
},
"domain": {
"removeNotInSnapshot": true
}
}
Field description:
exportTime - generated snapshot zip file timestamp - it is not mandatory
Block functions - stores configuration for functions export - it is not mandatory
- nameStartsWith - set of function's prefixes that will be exported. During import, this filter will be used as the context of the import
- removeNotInSnapshot - control flag. By default false.
- false - no functions are deleted and whatever is defined in nameStartsWith, doesn't impact import
- true - remove functions that are not present in snapshot zip file. If nameStartsWith field contains any prefix then missing functions are deleted ONLY from that bounded context,
for example:
The snapshot contains a function: pl.decerto.1
Snapshot file will be imported to Hyperon that contains functions:
pl.decerto.1, pl.decerto.2, some.other.package.fun.1
After a successful import,
- If nameStartsWith field is empty then pl.decerto.2 and some.other.package.fun.1 will be deleted.
- If nameStartsWith field contains value: pl.decerto, only pl.decerto.2 will be deleted.
Block parameters - stores configuration for parameters export- it is not mandatory
- nameStartsWith - set of parameter's prefixes that will be exported. During import, this filter will be used as the context of the import
- removeNotInSnapshot - control flag. By default false.
- false - no parameters are deleted and whatever is defined in nameStartsWith, doesn't impact import
- true - remove parameters that are not present in snapshot zip file. If nameStartsWith field contains any prefix then missing parameters are deleted ONLY from that bounded context,
for example:
The snapshot contains a parameter: pl.decerto.1
Snapshot file will be imported to the Hyperon that contains parameters:
pl.decerto.1, pl.decerto.2, some.other.package.par.1
After a successful import,
- If nameStartsWith field is empty then pl.decerto.2 and some.other.package.par.1 will be deleted.
- If nameStartsWith field contains value: pl.decerto, only pl.decerto.2 will be deleted.
Block domain - stored configuration for domain - it is not mandatory
- removeNotInSnapshot - control flag. By default false.
- false - (by default) no elements of domain definition or configuration are deleted.
- true remove the following elements from domain definition and configuration which are not present in snapshot zip file:
- attributes of domain types
- elements of domain configuration
- attributes of domain configuration elements
- local attributes of domain configuration elements
- references to domain elements.
Available since: hyperon version 1.6.41 (domain configuration available since 1.8.11)