07state

Software Developer en HCMUS
14 de Apr de 2011
07state
07state
07state
07state
07state
07state
07state
07state
07state
07state
07state
07state
07state
07state
07state
07state
07state
07state
07state
07state
1 de 20

07state

Notas del editor

  1. To create (open) a state diagram Click right on the class in the Browser to make the pop up menu visible. Select the Open State Diagram menu command. A state diagram is used to show the life history of a given class, the events that cause a transition from the state, and the actions that result from a state change. State diagrams are created for classes with significant dynamic behavior. In Rose, state diagrams are attached to classes.
  2. To customize the sequence diagram toolbar Click right on the toolbar to make the pop up menu visible. Select the Customize menu command Click to select the button that you want to add or remove. Click the Add or Remove button to add or remove the button from the toolbar. Click the Close button to close the Customize Toolbar window.
  3. To create a state Click to select the state icon on the toolbar. Click on the state diagram to place the state. While the state is still selected, enter its name. A state is one of the possible conditions in which an object may exist.
  4. To create a state transition Click to select the State Transition icon on the toolbar. Click on the originating state. Drag the state transition arrow to the successor state. While the state transition is still selected, enter its name (if needed). A state transition is a change from an originating state to a successor state. Explain that some transitions are automatic transitions (no name) while other transitions are named events.
  5. To create a reflexive transition Click to select the Transition to Self icon on the toolbar. Click on the state. While the transition is still selected, enter its name (if needed). A reflexive state transition is a transition where the successor state is the originating state.
  6. To create multiple reflexive state transitions Click to select the State Transition icon on the toolbar. Click on the state. Move the cursor to the diagram and release the mouse button. Depress the mouse button and drag the state transition line back to the state. While the state transition is still selected, enter its name if needed. To make the state transition line rectilinear Click to select the state transition line. Select the Edit:Change Line Style:Rectilinear menu command.
  7. To create state transition arguments Click right on the state transition line to make the pop up menu visible. Select the Open Specification menu command. Enter the arguments in the Arguments field. Click the OK button to close the Specification. Data that accompanies an event is shown as an argument.
  8. To create a guard Click right on the state transition line to make the pop up menu visible. Select the Open Specification menu command. Select the Detail tab. Enter the guard condition in the Condition field. Rose will automatically add the brackets ([ ]). Click the OK button to close the Specification. A transition may be made conditional through the use of a guard.
  9. To create an action Click right on the state transition line to make the pop up menu visible. Select the Open Specification menu command. Select the Detail tab. Enter the action in the Action field. Rose will automatically add the slash (/). Click the OK button to close the Specification. An action is an operation that accompanies a transition event.
  10. To send an event Click right on the state transition line to make the pop up menu visible. Select the Open Specification menu command. Select the Detail tab. Enter the event in the Send Event field. Enter event arguments (if needed) in the Send Arguments field. Enter the name of the target class (class receiving the event) in the Send Target field. Rose will automatically add the carat (^). Click the OK button to close the Specification. One event may trigger the sending of another event. The format is: ^target class.event
  11. To create a start state Click to select the Start State icon on the toolbar. Click on the diagram to place the start state. Click to select the State Transition icon on the toolbar. Click on the start state on the diagram and drag the arrow to the successor state. The start state is the initial state of an object. There is only one start state.
  12. To create an end state Click to select the End State icon on the toolbar. Click on the diagram to place the end state. Click to select the State Transition icon on the toolbar. Click on the originating state on the diagram and drag the arrow to the end state. An end state is the final state of an object. There does not have to be an end state. There can also be multiple end states.
  13. To create an action on entry into a state Click right on the state on the diagram to make the pop up menu visible. Select the Open Specification menu command. Select the Detail tab. Click right in the Actions field to make the pop up menu visible. Select the Insert menu command. This will insert an action labeled entry: into the Actions field. Double click on the new action to make the Action Specification visible. Select the action type -- simple or send event. If the action type is simple, enter the action in the Action field. If the action type is send event, enter the event name in the Send event field, enter any arguments in the Send arguments field (if needed) and enter the target class in the Send target field. Select the On entry radio button in the When field. Rose will automatically enter the entry: keyword. Click the OK button to close the Action Specification. Click the OK button to close the State Specification. This is often referred to as an entry action. It is shown inside the state preceded by the keyword entry.
  14. To create an action upon entry until exit from a state Click right on the state on the diagram to make the pop up menu visible. Select the Open Specification menu command. Select the Detail tab. Click right in the Actions field to make the pop up menu visible. Select the Insert menu command. This will insert an action labeled entry: into the Actions field. Double click on the new action to make the Action Specification visible. Select the action type -- simple or send event. If the action type is simple, enter the action in the Action field. If the action type is send event, enter the event name in the Send event field, enter any arguments in the Send arguments field (if needed) and enter the target class in the Send target field. Select the Entry until exit radio button in the When field. Rose will automatically enter the do: keyword. Click the OK button to close the Action Specification. Click the OK button to close the State Specification. This is often referred to as an exit action. It is shown inside the state preceded by the keyword exit.
  15. To create an action on exit from a state Click right on the state on the diagram to make the pop up menu visible. Select the Open Specification menu command. Select the Detail tab. Click right in the Actions field to make the pop up menu visible. Select the Insert menu command. This will insert an action labeled entry: into the Actions field. Double click on the new action to make the Action Specification visible. Select the action type -- simple or send event. If the action type is simple, enter the action in the Action field. If the action type is send event, enter the event name in the Send event field, enter any arguments in the Send arguments field (if needed) and enter the target class in the Send target field. Select the On exit radio button in the When field. Rose will automatically enter the exit: keyword. Click the OK button to close the Action Specification. Click the OK button to close the State Specification. This is often referred to as an activity. It is shown inside the state preceded by the keyword do.
  16. To create a nested state Click to select the state icon on the toolbar. Click on the state diagram to draw the superstate. While the superstate is still selected, enter its name. Click to select the state icon on the toolbar. Click inside the superstate to draw the substate. While the substate is still selected, enter its name. Resize the superstate as needed. To move a state into a superstate Click to select the state to be moved Drag the state into the superstate. Resize the superstate as needed. Nested states may be used to simplify complex drawings.
  17. To turn on the History icon Click right on the superstate to make the pop up menu visible. Select the Open Specification menu command. Select the Detail tab. Click to select the History checkbox. Click the OK button to close the State Specification. History provides the capability to return to the most recently visited state. History is shown by adding the history icon (a circle with an H inside it) inside a superstate.
  18. This is the state diagram for the MaintainScheduleForm class.