Page 1 of 1

Getting Role Cardinalities from Templates

Posted: Wed Dec 05, 2012 6:50 am
by Pavel Selchukov
Hello all!

We faced a problem which seems to be a common: the way to get all role properties from template is to use appropriate metatemplates, that offers properties such a RoleIndex, RoleFillerType and so on. But we cannot find a property to obtain Role Cardinality.

What could you suggest to do it properly?

We think that the proper way is to define something like HasCardinality in metatemplate p8:TemplateRoleDescription.

Re: Getting Role Cardinalities from Templates

Posted: Thu Dec 06, 2012 2:04 pm
by OnnoPaap
Your question suggests that a role can be used many times from a single template, if assigned a cardinality.

But a template has an internal model expressed in first order logic. A template role is connected to that model. It cannot be dynamic.

If a relationship needs to be multiple, the solution is to use multiple templates.

Here is Hans Teijgeler's application model that can be found at this link
two-stage-centrifugal-pump.jpg
two-stage-centrifugal-pump.jpg (51.09 KiB) Viewed 9129 times
The class-level template has cardinality, in this case set fixed to 2. That means that the instance of individual has 2 templates for the composition of impellers.