Open pieterbos opened 8 years ago
You are right, we need a specification of flattening of the rules section. I think it would be roughly like this:
In templates, the scope of any rules section is only the enclosing archetype, not the whole template, so I think this case is simpler.
Sounds good!
With templates that can certainly be easier.
However, if you create an operational template based on a template using archetype_roots, you have only one rules section left in the result, where you have several in the source. We could choose to say 'you cannot evaluate rules in an operational template, you need the source archetypes for that', or we could find a solution to combine the rules in the operational template, for example with a component_rules section.
The flattening operation and operational template creation operation do not mention the rules section. However, a spec on how to do and possibly a change in the AOM is useful, because nowhere is specified how to handle the following cases:
I'm not sure if it's possible to merge two rules sections. We could do something like 'component_rules', same as 'component_terminologies' to make things easier, or specify how to merge multiple rules sections into one.