Process step types and element types can be selected as input interfaces and output interfaces. The input and output interfaces are used for modeling the interfaces of processes on a diagram either as interface elements attached on other elements or via Interface Mapping.
The input and output interface behaviors can be turned on only if the element has "Allow multiple instances" and "Allow attaching to elements" option on. You can define an element to be either an input or an output interface, i.e. an interface cannot be both input interface and output interface at the same time.
If an element type has the input or output interface behavior set, you cannot define interface relations for the element type. The interface relation behavior options and the interface relation attribute definitions are validated when you open a model to solve possible conflicts if simultaneous editing is done by different users.
Setting Interface Relations
To set an interface relation, do the following:
|1.||In the Behavior tab of the Custom Element Type Dialog or Process Step Type Dialog, set the element type to be either an input or output interface.|
|2.||You can set the interface relation in three different ways. In the Diagram View, do one of the following:|
|o||set the interface relation value from the element properties (in the Custom Attributes tab of the Process Step Dialog or Custom Element Dialog), or|
|o||attach an instance of an input/output interface element to an element with interface relations, or|
|o||create an instance of an input/output interface element on the sub-level of an element with interface relations.|
|3.||Now the interface relation attribute in that element is set to point to the interface element. However, if there is a value already pointing to the element, nothing is done. If there is no interface relation attribute that can be set to point to the element, the element can still be attached but no relations are set. Note that if the interface element (i.e. an element that has been set to be either an input or output interface) is attached to an element in the sub-level, it is not considered to be an interface of the parent level, but an interface of the element it is attached to.|
When an interface relation has been set (regardless of the way you have set it), the new attached interface element instance is automatically created (if it doesn't already exist) and similarly, if the process element has a sub-diagram level, the interface element instance is also automatically created on that level.
Clearing Interface Relations
You can clear an interface relation in three different ways:
|•||by removing the value directly from the element properties (in the Custom Attributes tab of the Process Step Dialog or Custom Element Dialog)|
|•||by removing the attached element|
|•||by deleting the instance in the sub-diagram.|
When the interface relation attribute value is cleared, the attached interface elements and the instance in the sub-diagram level are also deleted.
Note that if you a remove a process element, the interface elements that have been attached to it are also removed.
Hiding and Showing Attached Interfaces
It is possible to hide and show the interface elements attached to an element by either right-clicking the element having the attached interface elements and selecting "Hide Attached Interfaces" or "Show Attached Interfaces", or by opening the Graphical Properties Dialog of the element that has attached interface elements and selecting or deselecting the "Hide attached interfaces" check box on the Shape tab. The visibility of the elements can also be set in the diagram View Settings Properties Dialog.
See also the Element Graphical Properties Dialog topic about showing the interface source and destination on an interface element.
Example: Setting Up Modeling Options for Input Interface Use
To define a model based on the default template to have an input interface and and element that uses the interface, do the following:
|1.||Open the Modeling Options dialog.|
|2.||Create a new element type, and name the element "Input Interface".|
|3.||Switch to the Behavior tab, and select the "Allow element creation on diagrams", "Allow multiple instances", "Allow attaching to elements", and "Input interface" behaviors.|
|4.||In the Modeling Options dialog, create a new custom attribute type:|
|o||Name: Input Interface|
|o||Select model element type for relation: Element/Input Interface|
|o||Two-way link: No two way link|
|5.||In the Modeling Options dialog, select the Subprocess process step type and click "View".|
|6.||Switch to the Behavior tab, and select the "Allow attached elements" and "Allow attached interfaces" behaviors.|
|7.||Switch to the Custom Attribute Types tab, and add the "Input Interface" custom attribute type.|
|8.||Switch to the Interface Relations tab, and select "Input Interface" from the Input interface relations.|