11.12.2012 Views

Model-Driven Evolution of Software Architectures - Software and ...

Model-Driven Evolution of Software Architectures - Software and ...

Model-Driven Evolution of Software Architectures - Software and ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

7.5. SourceMetamodel 139<br />

0..1<br />

0..1<br />

Event<br />

+ trigger<br />

StateMachine<br />

StateVertex<br />

+ transitions<br />

0..1<br />

+ incoming<br />

*<br />

+ target *<br />

+ outgoing<br />

Transition<br />

*<br />

*<br />

+ subvertex<br />

+ source<br />

+ top<br />

State<br />

*<br />

0..1<br />

0..1<br />

+ entry<br />

0..1<br />

+ exit<br />

0..1 + effect<br />

Action<br />

+ script :ActionExpression<br />

Pseudostate<br />

+ kind :PseudostateKind<br />

0..1<br />

CompositeState<br />

Guard<br />

+ expression :BooleanExpression<br />

+ isConcurrent :Boolean<br />

+ guard<br />

0..1<br />

SimpleState FinalState<br />

+ container<br />

Created with Poseidon for UML Community Edition. Not for Commercial Use.<br />

Figure 7.4:Sourcemetamodel(excerptfromOMG[2007a])<br />

Usingthismetamodel,UMLstatemachinescanbeconstructedthatmodel<br />

behaviourasatraversal<strong>of</strong>agraph<strong>of</strong>statenodesinterconnectedbytransitionarcs.<br />

InFigure7.4astatenode,or StateVertex,isthe targetor source<strong>of</strong>any<br />

number<strong>of</strong> Transitions<strong>and</strong>canbe<strong>of</strong>differenttypes. A Staterepresentsa<br />

situationinwhichsomeinvariantoverstatevariablesholds. Inaddition,<br />

anoptional entryor exit Actionisexecutedwhenthestateisenteredorexited.<br />

Themetamodeldefinesdifferenttypes<strong>of</strong>States.A CompositeStatecontains<br />

(owns)anumber<strong>of</strong>substates(subvertex).IfaCompositeStateisconcurrent<br />

(isConcurrent)itcontainsatleasttwocompositesubstatesthatexecutein<br />

parallel. A SimpleStateisaStatewithoutanysubstates. Execution<strong>of</strong>an<br />

enclosingCompositeStateendswhenaFinalStateisentered.<br />

Nexttostatenodesthatdescribeadistinctsituation,themetamodel<br />

also<strong>of</strong>fersatype<strong>of</strong>StateVertexthatmodelsatransientnode<strong>of</strong>astate<br />

graph: a Pseudostate. Itallowsmodelling<strong>of</strong>morecomplex(conditional)<br />

transitionpaths. Threetypes<strong>of</strong>pseudo-states(PseudostateKind)arerelevantforthestatemodelsinthischapter:initial,choice,<strong>and</strong>junction.AninitialPseudostateisthedefaultnode<strong>of</strong>aCompositeState.AchoicePseu-<br />

0..1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!