Sparx Systems Forum

Enterprise Architect => Bugs and Issues => Topic started by: Michael Rufer on May 05, 2010, 07:48:28 pm

Title: State machine transition with multiple operations
Post by: Michael Rufer on May 05, 2010, 07:48:28 pm
I would like to asign multiple operations to the transition effect. But I can only select one operation as soon as I select the "Effect is a Behavior" checkbox. Is this behaviour intended or am I doing something wrong?
Title: Re: State machine transition with multiple operati
Post by: Geert Bellekens on May 05, 2010, 08:55:05 pm
Michael,

We have had this same issue, and we've overcome it using a tagged value with definition:
Code: [Select]
Type=RefGUID;
Values=Operation;
AppliesTo=StateFlow;
This allows us to add multiple tagged values to the stateflow, and select a different operation in each tagged value.
I first used the RefGUIDList, to be able to link multiple operations to one tagged value, but that wasn't very practical in use.

Geert
Title: Re: State machine transition with multiple operati
Post by: Frank Horn on May 05, 2010, 08:58:38 pm
It's probably intended.

If you want to see your transition being labelled with multiple operations in your diagram: I think it's not possible.

If you need a link to multiple operations in your model: you can select an activity instead of an operation, and this activity can contain multiple actions (each of which can be linked to an operation).

Anyway: are you sure it's a good idea to have more than one operation as effect of a transition? The model (or diagram) would not specify how these operations are to be executed (in parallel? sequentially?) Wouldn't it be wiser to change your model so that you have one operation for each effect?
Title: Re: State machine transition with multiple operati
Post by: Geert Bellekens on May 05, 2010, 09:02:01 pm
Quote
Anyway: are you sure it's a good idea to have more than one operation as effect of a transition? The model (or diagram) would not specify how these operations are to be executed (in parallel? sequentially?) Wouldn't it be wiser to change your model so that you have one operation for each effect?

Frank, I agree with your point of view.

Geert
Title: Re: State machine transition with multiple operati
Post by: Van Lepthien on May 13, 2010, 05:32:37 am
The UML 2.1 definition of effect in a Transition:

effect: Behavior[0..1] Specifies an optional behavior to be performed when the transition fires.

So allowing at most one conforms to the UML spec.
Title: Re: State machine transition with multiple operati
Post by: ChrisBD on May 13, 2010, 11:04:37 pm
Isn't this why you have entry and exit behaviour for states (although they can seriously increase the complexity of your model)?