Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [dsdp-tml-dev] State machine problem

Hi Fabio!

A simple solution to this problem could be:

 

If we have 2 services (S1, S2) such that both transition from A to B, this 2 can be executed in parallel. In other cases, the machine could be left on an undecidable state. So two services are allowed to run in parallel only if they have the same transition. A special case is the one which the start state is the same as the end state.

 

There are no other situations that parallelism could be allowed.

 

Daniel.

 

 


From: dsdp-tml-dev-bounces@xxxxxxxxxxx [mailto:dsdp-tml-dev-bounces@xxxxxxxxxxx] On Behalf Of Fabio Scramim Rigo
Sent: quinta-feira, 4 de setembro de 2008 10:41
To: TmL Mailing List
Subject: [dsdp-tml-dev] State machine problem

 

Hello guys,

 

I’ve found a potential problem source in the device framework, related to the state machine control.

 

Consider an instance that has 3 states (A, B and C) and 2 transitions (A->B, A->C). The instance is initially at state A.

At the instance view, the services that execute both transitions are enabled. Say we execute the service that transitions from A to B.

 

While the transition is ongoing, the device is neither in state A or B, but at the state machine it is still considered in state A before a result is available. Therefore the transition A->C is still enabled. What happens if we execute A->C?

 

I think it is necessary to define new rules for state maintenance. One simple solution would be to disable all services while a transition is ongoing, but there are cases in which two or more services can be executed in parallel. Does anyone have ideas about what would be the most effective algorithm to deal with a state machine generically, allowing robustness and parallelism at the same time?

 

Thanks and best regards,

 

Fabio Rigo


Back to the top