To add a reset Activity to the Entry to the ready State


  1. Right-click the ready State on the StopWatch State Machine diagram and select Specification to open the State's Specification window.
  2. Select the Entry row and click the button. A context menu will open.
  3. Select Activity. A new Activity will be created for the entry to the ready State. 

    Adding an Activity to the Entry of the Ready State

  4. Name the created Activity "reset".
  5. Click Close to close the Specification window. The reset Activity will be added to the entry to the ready State on the StopWatch State Machine diagram as shown .

    Adding the Reset Activity to the Entry of the Ready State

  6. Add an Activity diagram to the created reset Activity of the ready State by right-clicking the reset Activity in the containment browser and select New Diagram > Activity Diagram. A new Activity diagram will be created.




  7. Use the default name of the diagram, which is "reset".
  8. Add a CallBehaviorAction to the resetTime Activity on the reset Activity diagram by dragging the resetTime Activity from the containment browser to the reset Activity Diagram.

    Adding the ResetTimeAction to the ResetActivity of the ResetActivity Diagram

  9. Complete the reset Activity by adding an Initial stage and a Final Activity stage to the reset Activity diagram and connect the two stages and the resetTime Action using ControlFlow, which is on the Activity Diagram toolbar. 

    A Complete Model of the ResetActivity