Template Usage

To use a template, start a normal pattern creation process like in the example below.




In the 'Properties' tab, click the 'Use template…' button.




The action may fail if more than one element was selected or, more generally, if there is an ambiguity about the main element of the pattern. An error message indicates that this can be solved by mapping the main element to the first role of the pattern.

When the action succeeds, a new dialog pops up which allows the user to select the template to use.




If the 'Only show strictly compatible templates' check box is ticked, only templates whose main element is of the same type as in the pattern are shown. It can be relevant to disable this option, for example when the user has defined a template that gathers the Interfaces of a Logical Component and he/she wants to use it on a Physical Component.

When 'Finish' is clicked, the template is actually executed and a new dialog shows up.




This 'Template Usage' dialog shows the elements that have been collected for each role and proposes a few options for integrating them to the pattern under construction.

When 'OK' is clicked, the pattern is updated according to the previous dialog. In the figure below, the default options have been used to that the pattern is structured exactly as the template.




The pattern can be freely modified after the template has been used. When ready, click 'Finish' as usual to actually create the pattern.

Warning: Do not forget to select graphical elements in the diagram before creating the pattern in order to reuse the graphical layout of the collected elements.