Sparx Systems Forum

Enterprise Architect => Uml Process => Topic started by: Anmk on November 13, 2021, 08:47:19 pm

Title: How to add multiple entry/exit actions to a state?
Post by: Anmk on November 13, 2021, 08:47:19 pm
Hi all,
I am designing a state chart for a class. one of the states in the state chart should do multiple actions as entry action.
I could add one action to the entry action of the state, but I don't know how can I add other actions to entry action field of the state.
Is this feature supported by EA (ver. 15.2) or we can only have one action per entry in each state?
Title: Re: How to add multiple entry/exit actions to a state?
Post by: qwerty on November 13, 2021, 09:48:37 pm
That's per UML specs. Anything to be done at entry is done in ONE action. What about an order if you had multiple entry do actions? You would control all those in the single action. Seems pretty logicial, doesn't it?

q.
Title: Re: How to add multiple entry/exit actions to a state?
Post by: Anmk on November 13, 2021, 10:33:36 pm
Yeah it seems logical.
But how about code generation?
If we cannot to add multiple operations of a class as entry actions in EA, I should define a new operation(e.g. stateXentryAction that is not an operation of my class) and call the operations (that I want to call when I enter the state) of my class inside the stateXentryAction operation. right?

Title: Re: How to add multiple entry/exit actions to a state?
Post by: qwerty on November 14, 2021, 02:24:50 am
An action is an arbitrary amount of code. You put in that behavior you need to control the entry. If you need to invoke other operations, then just do so right in there.

q.