Extending and Embedding Perspectives
Perspectives can both extend and embed other perspectives. These practices can be used to keep your diagrms modular and reuseable.
A perspective can extend one or more previously-defined perspectives by specifying the extended perspective(s) in its extends property. The extending perspective will inherit all properties of the extended perspective(s):
perspectives: ... - name: My Perspective extends: Existing Perspective ...
There are two specific rules for relation and sequence perspectives:
- When extending relation perspectives, all relations from the extended perspective(s) are included in the extending perspective. They will be present in the extending perspective in addition to any new relations specified in the extending perspective.
- When extending sequence perspectives, if the extending perspective specifies a sequence, that sequence will replace the extended sequence(s) entirely.
When extending multiple perspectives, their properties are applied in the order they are specified. Values from perspectives listed later take precedence.
Tip: Its common to create perspectives that exist only to be extended by other perspectives. You can hide these perspectives from the perspective tray by setting their hidden property to true.
Perspectives can also be embedded directly into other perspectives, appearing as boxes as if they were resources. Users can zoom in on embedded perspectives to see their details:
To embed a perspective in another, reference it by name with the Perspective:: prefix anywhere you would normally reference a resource:
perspectives: - name: My Perspective relations: ... from: Resource A to: Perspective::PerspectiveName
Embedded perspectives are especially useful for show sub-processes in sequence perspectives:
Like with resources, embedded perspectives can be cloned to make them appear in multiple places in a single perspective.
Tip: Its common to create perspectives that exist only to be embedded in other perspectives. You can hide these perspectives from the perspective tray by setting their hidden property to true.