Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

At the moment, at migrate time, there is a merge of the old and new properties helm by the instance. However, this merge of properties does not take account of nested maps that need to be recursively merged.In order to apply the recursive update it needs to implement the recursive properties validation.

Solution 1

For any "property" of the new Map, recursive update will be apply only if in both new and old map, the type of the value "map.get(property)" are Map.

Type of

oldMap.get(property)

Type of

newMap.get(property)

Operation
int/string/boolean/listMapupdate
Mapint/string/boolean/listupdate
int/string/boolean/listint/string/boolean/listupdate
MapMaprecursive update

Solution 2

The implementation of the recursive properties validation It could help for the recursive update. Using same methods for the validation, we can convert properly what is supposed to be a Map by definition.

Work Breakdown:

  • Create reusable methods to retrieve data structure of the properties
  • Implement validation in creation, update and migrate of the instance
  • Implement recursive merge and add eventually additional validations in migration
  • participant needs same recursive merge, so needs the full service template in priming time

Unresolved question:

...

Note:

  • We can do same implementation in update
  • In solution 2, we can support default values defined into the composition definition?