Book a Demo

Author Topic: State activities  (Read 3687 times)

studmad

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
State activities
« on: October 14, 2010, 10:36:51 pm »
Hello everybody,

If we have more than one state entry action, are they executed sequenctially or concurrenly,"or can we not have more than one"

and also question for do activities;

thanks for your help;
studmad

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: State activities
« Reply #1 on: October 14, 2010, 10:47:11 pm »
Void question. The state entity will invoke the action on the presence of the token. The is no "sequentiallity" or "concurrence" involved.  The entity responds to the stimulus on appearance. You can not predict either the time nor the probability of any stimulus appearance.

They should not (in fact cannot)  be co-dependent. If they are your model is wrong.

b

(mod: grammar)
« Last Edit: October 14, 2010, 10:49:35 pm by sargasso »
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

studmad

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: State activities
« Reply #2 on: October 14, 2010, 10:55:45 pm »
Thank you for you answer, but i am sorry i haven't really undertood .I am still new to uml  :-[

let's say I have 3 do/activities inside a state; and i want them to execute sequentially, is this possible

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: State activities
« Reply #3 on: October 14, 2010, 11:50:14 pm »
Not with any respect to the object's environment.  If they are sequential WITHIN the state, then that is a matter for the object concerned, not a matter for the environment.

Consider this.  Your mother says, "Clean your room", (you are the state object).  Your father says, "Wash the car!".  Your phone rings and your beingfriend says, "Lets go to the beach".

You work out the sequentialities!

(Please note that I am tricking you here, "you" are a state machine that is not capable of understanding its environment. "i" the programmer, may wish to provide a set of rules by which "you" the state machine may decide to execute actions in a certain sequence depending on certain values that "I" the programmer decide.  So, wash the damn car OK! )

got it yet?

Oh, and do what your mother says, then take these papers down to the bin, then ....

Do you understand now what I mean that the state machine itself cannot prescribe sequentiality?

... and "Did you bring your washing down?"
  

p.s. please excuse any age/sex/gender/whatever-isms in the above and just try and get my gist.  If I am not good at explaining it then just refer to Douglas Adams' beautiful description of a state machine trying to cope with overloaded stimuli in the first bit of the hitchhikers guide,
« Last Edit: October 15, 2010, 12:05:05 am by sargasso »
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

studmad

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: State activities
« Reply #4 on: October 15, 2010, 01:57:57 am »
Thank you for you sofisticad reply;
So far I believe I understand what you are saying;

but my question is  as I am modelling a system with state machines; I have to make it clear,  that these activities are carried out sequentially in this state,
and maybe I need to indicate that some other activities are carried out concurrently in another state.
 
Is this feasible or is it violating some concept; if yes how can do that entreprise architect??

p.s. believe me i started reading the Hitchhicker's guide some days ago  :)
« Last Edit: October 15, 2010, 01:59:35 am by studmad »

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: State activities
« Reply #5 on: October 15, 2010, 04:19:12 am »
As Bruce pointed out, UML state machines are not there for modelling sequentiality. And who says that there have to be several entry activities for a state?

You could define one entry activity (called e.g. "On Entry") and then use an activty diagram for the actions you now regard as "more than one state entry action".