UML statechart + parallel state

R

raz

How can i make a parallel state in statechart diagram,
so that two processes take place parallelly?

Thanks
 
P

Paul Herber

How can i make a parallel state in statechart diagram,
so that two processes take place parallelly?

Do you want one process to track the other or for them to track each
other. You'll need to send a message from one to the other to indicate
a state transition.

However, if the states are really parallel then are they really the
same process?
Also, look up "race condition"
 
R

raz

I'm don't think it's a race condition.

I have an update state with consist of two inner states: text update and save.
I need to be able to continue updating while a prior update is being saved
(but not to be able to make another save untill the last one is over).
Is there a way to make a parallel state (using dashed lines, like a parallel
in sequence diagram is presented)?
Because i got a tutorial slide showing it, but i couldn't find out how it is
done in VISIO.

Thanks again.
 
P

Paul Herber

Process1:
....
copy the data to be saved into save buffer
disable save
start timeout
send save message to process 2 with address of save buffer
continue with updating
....

on event "timeout"
flag a failed save to the user
enable save

on message "save failed"
flag a failed save to the user
enable save

on message "save finished"
enable save

Process 2
on message "save"
try
do whatever has to be done
send message "save finished"
exception
send message "save failed"

and keep track of which process owns the save buffer.
 
R

raz

Hi Paul,
Apparently we are not on the same wavelength here.
You seem to be talking about some sort of code, and i'm talking about a
simple statechart diagram.
But thanks anyway, i some how worked around it.

Raz.
 
P

Paul Herber

Not at all, I can't post any sort of diagram here but I'm just giving
you an example of how 2 process can communicate safely.


Hi Paul,
Apparently we are not on the same wavelength here.
You seem to be talking about some sort of code, and i'm talking about a
simple statechart diagram.
But thanks anyway, i some how worked around it.

Raz.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top