Directly from EMC SMARTS documentation, via
benhill:
Examples of an Event Declaration
The Employee class declares three events: UnderPaidEmployee, OverWorked, and UnderAchieved. UnderPaidEmployee occurs when the value of the attribute HourlyRate is less than the attribute LowWage_Thr. Similarly, OverWorked occurs when the attribute HoursWorked is greater than the attribute HoursWorked_Thr. UnderAchieved is defined using two previously declared events. When either UnderPaidEmployee or OverWorked occurs, the event UnderAchieved occurs.
interface Employee : Person "The people that work for the company" { // Events event UnderPaidEmployee "This employee is making less than the minimum wage" = HourlyRate < LowWage_Thr; event OverWorked "This employee is working too many hours during the " "week" = HoursWorked > HoursWorked_Thr; event UnderAchieved "The employee is not performing as expected" = UnderPaidEmployee || OverWorked; }
Problem Declarations
A problem declaration declares an event that is detected by observing its symptoms. Symptoms are observable events that uniquely identify the problem. Note that the symptoms described here are not necessarily declared by a symptom declaration. The symptoms of a problem can be declared by event, symptom, and other problem declarations. Like an event declaration, a problem declared by a problem declaration must be subscribed to by an InCharge client to make the domain manager monitor for it. A problem declaration specifies the name of the problem, the list of symptoms that the problem causes, and an optional description. As noted earlier, the domain manager only monitors for problems that an InCharge client has subscribed to. If a problem is not subscribed to, the domain manager does not monitor the attributes and events that the problem depends on.
Introduction by Example
14 InCharge Software Development Kit MODEL Reference Guide Example of a Problem Declaration
The PoorPerformance problem causes the UnderAchieved event, making UnderAchieved a symptom of PoorPerformance. When the domain manager detects the UnderAchieved event, it concludes that PoorPerformance is the problem and sends a notification for the PoorPerformance problem. The example for event declarations, "Examples of an Event Declaration" on page 13, shows the attributes and events the domain manager would have to monitor to determine when UnderAchieved occurs.
interface Employee : Person "A person who work for the company" { // Problems problem PoorPerformance "The employee is not able to complete his or " "her activities. Therefore, the employee is " "forced to work extra hours" => UnderAchieved; }