« Back to Fachhochschule Nordwestschweiz FHNW

Relation Class Implementation

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Relation Class Implementation
Answer
5/15/14 8:38 AM
I would like to ask you a question related to Relation classes. I created the Decision Model Diagram on based of the Decision Model of Barbara von Halle and
Larry Goldberg. (Figure 01 shows this model.)

In this diagram there is an octagonal shape that called Business Decision and there are different hexagonal shapes that are called in general Rule Family. There is a need to do distinguish between different kinds of Rule Family in this diagram. The Rule family directly connected to the Business Decision shape is called the “Decision Rule Family”, and the other hexagonal shapes are called Rule Families. For distinguish between these kinds of Rule families, I have I chose the option that can be visible the name of them in lower shape, Red color for RF (Rule Family) and Black color for DRF (Decision Rule Family). (Figure 02 and Figure 03).

After that I created the relation between DRF and RF, I have noticed that it is a bidirectional relations (from DRF to RF and vice versa), and in this case I only need to have unidirectional relation only from DRF to RF. (Figure 04 and Figure 05)

My question is how can have only unidirectional relation from DRF to RF.
Attachment

Attachment

Attachment

Attachment

Attachment

Attachments: Figure 01.PNG (134.1k), Figure 02.PNG (48.3k), Figure 03.PNG (7.2k), Figure 04.PNG (39.6k), Figure 05.PNG (8.2k)

RE: Relation Class Implementation
Answer
5/15/14 8:43 AM as a reply to Anonymous.
Based on your question we could think of two alternative approaches to realize the intended behaviour:

Proposal 2. Realisation using an extend class hierarchy and relation class implementation
This approach can be realized if you update the concept how to realize "Rule Family" and "Decision Rule Family". Using the class hierarchy/inheritance concept in ADOxx, you can derive the "Rule family" class from the "Decision rule family" class and define a relation class FROM "Decision rule family" TO "Rule family". The effect of this setup is:

The relation class can be used to
a) connect a decision rule family instance with a rule family instance
b) connect a rule family instance with an other rule family instance (this is allowed since the inheritance also works on the relation class endpoint definition)

Please find the resources for implementation (example ABL, class hierarchy screenshots attached as a ZIP archive). Please have a look in detail on how the classes are derived from each other (switch to meta-model and class hierarchy)

Proposal 2. Realisation using event handling mechansism
This approach is closer to the one you had described in your message, since the type of the rule family is made available through an attribute definition ("Type"). In order to prevent wrong relation instances we can use the ADOxx event handler concept, allowing to perform certain actions when an event is triggered by the platform. The event we want to use is "AfterCreateModelingConnector". The event handler triggers and AdoScript and 2 options (warning, delete and correct) have been implemented - please remove code and adapt accordingly as you need.

Please find the resources for implementation (example ABL, class hierarchy screenshots attached as a ZIP archive). The event is added in the dynamic library's library attribute "External coupling" and executes and AdoScript made available in the file management of the library.

Since proposal 1 utilizes the actual class hierarchy mechanism of ADOxx, we recommend to restructure your conceptualization accordingly.
Attachments: Proposal 1 - Class Hierarchy Structure.zip (35.8k), Proposal 2 - Event Handler.zip (12.3k)