Optimize can handle only primitive variables and will skip complex variables by default. However, it's possible to use the variable plugin to turn those complex variables into primitive ones.
Jan Rohwer created an Optimize plugin so that complex variables like
can be imported to Optimize and will be flattened to:
You can find it here:
As many other users could benefit from this plugin, we should add it to our Optimize example repo.
- the plugin from https://github.com/janhuddel/optimize-plugin-variable-flattener is added to the Optimize example repository
- there is a readme that explains how it works - similar to all the other plugin examples
- the readme mentions that the initial implementation was done by Jan Rohwer with a link to Github and a link to Provinzial Versicherungen where we also thank them for their contribution
- the example is adjusted so that it's more targeted towards a general use case (e.g. date formatting can be consistent in the engine and Optimize)
- if possible, try to make the example work without the maven ee-repo defined