How to Draw State Diagram in Staruml

Modeling with Statechart Diagram

The following elements are available in a statechart diagram.

  • Country
  • SubmachineState
  • InitialState
  • FinalState
  • JunctionPoint
  • ChoicePoint
  • ShallowHistory
  • DeepHistory
  • Synchronization
  • Flow Final
  • Transition
  • SelfTransition

Country

Semantics

A state is a condition during the life of an object or an interaction during which it satisfies some condition, performs some action, or waits for some event.

Process for creating land

In society to create State,

  1. Click [Toolbox] -> [Statechart] -> [State] button.
  2. And click at the position where State will be placed in the [main window].
  3. A state is created and quick dialog appears. Enter the land name at the quick dialog .
  4. And press [Enter] key to have washed this process.

Procedure for moving state into another state

In society to move a state into another state,

  1. Click a land that is contained in some state.
  2. Drag information technology into another state.
  3. The selected country is movement into another land.

Procedure for transiting to multiple states at in one case

In gild to create states with incoming or outgoing transition from selected state at in one case, apply shortcut creation syntax.

  1. Double-click country. And so quick dialog is shown. At the quick dialog, After "->" string(or "<-" string for incoming), enter target state names, and separate country names by "," grapheme.
  2. And printing [Enter] key. Several states outgoing(incoming) from selected state are created and arranged automatically.

Procedure for adding entry/practise/exit activity

There are three way to add together action to country.

  • using quick dialog
  • using model in the [chief window] or the [model explorer]
  • using [collection editor]

In the instance of using quick dialog,

  1. Double-click state.
  2. At the quick dialog, press [Add together Entry/Add DoAction/Add ExitAction] push at the quick dialog.
  3. And y'all can add action.

In the case of using model, select state in the [main window] or in the [model explorer]. Right-click the selected state, select [Add] -> [Entry/Do/Exit] popup menu. And you can practice.

In the last case,

  1. select [Collection Editor...] popup menu of land.
  2. Or click button in [EntryActions/DoActions/ExitActions] belongings on properties window.
  3. At [Entry Deportment/Practise Actions/Exit Actions] tab of the [drove editor], you can add activity by using push.

SubmachaineState

Semantics

A submachine state is a syntactical convenience that facilitates reuse and modularity. It is a shorthand that implies a macro-similar expansion past another state motorcar and is semantically equivalent to a composite state.

Procedure for creating submachine state

In social club to create SubmachineState,

  1. Click [Toolbox] -> [Statechart] -> [SubmachineState] push button.
  2. And click at the position where SubmachineState will be placed in the [main window]. A submachine country is created and quick dialog is opened.
  3. At the quick dialog, enter the submachine land name and press [Enter] key.

InitialState

Semantics

An initial is a kind of pseudostate that represents the starting point in a region of a land car. It has a unmarried outgoing transition to the default state of the enclosing region, and has no incoming transitions. At that place can be i (and but one) initial state in any given region of a land auto. It is not itself a state but acts as a marking.

Procedure for creating initial state

In club to create InitialState,

  1. Click [Toolbox] -> [Statechart] -> [InitialState] button.
  2. And click at the position where InitialState will exist placed in the [main window].

Process for creating initial state from state

In order to create initial country with outgoing transition to selected object, utilise shortcut cosmos syntax.

  1. Double-click land. At the quick dialog, Afterwards "-*" string, enter initial state name or none.
  2. Press [Enter] central and initial state with approachable transition to selected country is created.

FinalState

Semantics

A final country represents the last or "concluding" country of the enclosing composite land. In that location may be more than i final land at any level signifying that the blended state can end in different means or conditions. When a final country is reached and there are no other enclosing states it means that the entire state machine has completed its transitions and no more than transitions can occur.

Procedure for creating final country

In order to create FinalState,

  1. Click [Toolbox] -> [Statechart] -> [FinalState] push.
  2. And click at the position where FinalState will be placed in the [main window].

Process for creating final state from state

In order to create last land with outgoing transition from selected object, apply shortcut cosmos syntax.

  1. Double-click land. At the quick dialog, After "-@" string, enter final land proper name or none.
  2. Press [Enter] key and final state with ingoing transition from selected land is created.

JunctionPoint

Semantics

JunctioPoint chains together transitions into a single run-to-completion path. May take multiple input and/or output transitions. Each complete path involving a junction is logically independent and
merely i such path fires at ane fourth dimension. May be used to construct branches and merges.

Procedure for creating junciton signal

In gild to create JunctionPoint,

  1. Click [Toolbox] -> [Statechart] -> [JunctionPoint] push button.
  2. And click at the position where JunctionPoint will be placed in the [chief window].

ChoicePoint

Semantics

ChoicePoint splits an incoming transition into several disjoint outgoing transitions. Each outgoing transition has a baby-sit condition that is evaluated later prior deportment on the incoming path have been completed. At least one outgoing transition must exist enabled or the model is ill formed.

Procedure for creating choice point

In order to create ChoicePoint,

  1. Click [Toolbox] -> [Statechart] -> [ChoicePoint] push.
  2. And click at the position where ChoicePoint will be placed in the [main window].

ShallowHistory

Semantics

When reached equally the target of a transition, shallow history restores the country within the enclosing composite land that was agile just earlier the enclosing country was final exited. Does non restore any substates of the last active state.

Procedure for creating shallow history

In lodge to create ShallowHistory,

  1. Click [Toolbox] -> [Statechart] -> [ShallowHistory] button.
  2. And click at the position where ShallowHistory will be placed in the [main window].

State���� History State ����:

Procedure for creating last state from land

In order to create history with outgoing transition from selected object, utilise shortcut cosmos syntax.

  1. Double-click state. At the quick dialog, enter one of "-(h)", "-(H)",  "-(h*)",  "-(H*)" string.
  2. Press [Enter] key and history with approachable transition from selected country is created.

DeepHistory

Semantics

When reached equally the target of a transition, deep history restores the full country configuration that was active just before the enclosing composite state was last exited.

Process for creating deep history

In order to create DeepState,

  1. Click [Toolbox] -> [Statechart] -> [DeepState] push.
  2. And click at the position where DeepState will exist placed in the [main window].

Synchronization

Procedure for creating synchronization bar

In order to create Synchronization,

  1. Click [Toolbox] -> [Statechart] -> [Synchronization] button.
  2. And click at the position where Synchronization will exist placed in the [main window].

Process for creating join

In social club to create incoming join transition to selected object, use shortcut creation syntax.

  1. Double-click state. At the quick dialog, enter "<-|" and state names to be joined, and divide state names past "," graphic symbol.
  2. Press [Enter] primal and states joined to selected land is created and arranged automatically.

Procedure for creating join

In order to create outgoing fork transition to selected object, use shortcut creation syntax.

  1. Double-click country. At the quick dialog, enter "->|" and state names to be forked, and separate state names by "," character.
  2. Press [Enter] central and states forked from selected state is created and bundled automatically.

Flow Final

Process for creating menstruum terminal

In order to create Flow Final,

  1. Click [Toolbox] -> [Statechart] -> [Flow Last] button.
  2. And click at the position where Flow Terminal will be placed in the [main window].

Transition

Semantics

A transition is a directed human relationship betwixt a source land vertex and a target state vertex. It may exist part of a compound transition, which takes the state machine from one land configuration to another, representing the complete response of the state machine to a item event instance.

Procedure for creating transition

In order to create Transition,

  1. Click [Toolbox] -> [Statechart] -> [Transition] push.
  2. Drag and drop between states in transition direction in the [main window].
  3. Between two states, a transition is created.

Procedure for reconnecting to some other element

In order to reconnect to another state,

  1. Click the stop of transition.
  2. Drag and drop information technology into some other country.
  3. Then transition'southward stop will exist changed.

SelfTransition

Procedure for creating self-transition

In guild to create cocky-transition,

  1. Click [Toolbox] -> [Statechart] -> [SelfTransition] button.
  2. Click state to have self-transition in the [main window].

How to Draw State Diagram in Staruml

Source: http://staruml.sourceforge.net/docs/user-guide(en)/ch05_5.html

0 Response to "How to Draw State Diagram in Staruml"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel