64953773
MAF2021x
3
Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
The Ordering model demonstrates the use of Alf as the action language within an executable model using State Machines. It includes the following diagrams:
- Order Classes – – A Class diagram of an an Order consisting consisting of multiple multiple OrderLineItems, placed placed by a a Customer, which which may be paid using a a CreditCard.
- Order_Behavior – – A State Machine diagram of the active Behavior of an an Order.
- CreditCardCharge_Behavior – – A State Machine diagram of the active Behavior of a a CreditCardCharge (this is just a stub for testing purposes).
- Customer_Behavior – – A State Machine diagram of the active Behavior of a a Customer (this is just a stub for testing purposes).
- Test – A Class diagram of a simple simple Test Class Class with a classifier behavior that acts as a test driver.
Alf is used to define the behavior of all Operations in the the Order Classes model model, entry Behaviors in all the state machines and the classifier behavior for for Test. To To view any of the Alf code, open the the Alf editor window window (select select Windows > Alf) and then select the desired Operation, entry Behavior or Activity. The Alf code will appear in the window.
To run the test
, do either of the following
- Press the start button on the main toolbar.
- Right-click OrderingSimConfig and select Simulation > Run
- .