Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters

Please confirm you want to mark all posts read

Mark all topics read

sp_MobileMenu Actions
Avatar

New/Updated Topics

Select Forum

sp_TopicIcon
FiniteStateMachineType CurrentState values when current state is actually a substate
Avatar
EG
Posts: 35
08/22/2022 - 05:30

1

When a FiniteStateMachineType is in a state that is a substate of another stage, should the CurrentState property of the parent machine display the outer state or the inner state?

So taking PackML as an example, if in the Execute state, I think it is clear that BaseStateMachine.MachineState.ExecuteState.CurrentState should be Execute.

But given that Execute is a substate of Running, which is a substate of Cleared...

I am unsure whether the value of BaseStateMachine.CurrentState should be Cleared or Execute.
Similarly unsure whether BaseStateMachine.MachineState.CurrentState should be Running or Executing.

Avatar
Paul Hunkar
Posts: 28
08/23/2022 - 04:49

2

The current state only displays the state of the given StateMachine - i.e. cleared in the first item and running in the second item.  There is a property in the StateVariableType that is used to display the effective state that includes substates.

from part 16 - "EffectiveDisplayName contains a human readable name for the current state of the state machine after taking the state of any SubStateMachines in account. There is no rule specified for which state or sub-state should be used. It is up to the Server and will depend on the semantics of the StateMachineType."

So the BaseStateMachine.CurrentState.EffectiveDislayName would be Execute as would the  BaseStateMachine.MachineState.CurrentState.EffectiveDislayName.

Avatar
EG
Posts: 35
08/23/2022 - 05:39

3

Thanks, that makes sense.

This makes me think there is value in defining EffectiveId, EffectiveName and EffectiveNumber properties too, which would allow clients that are only interested in the effective values to get the machine processable values from a single node.

Forum Timezone:
America/Phoenix
Most Users Ever Online: 975
Currently Online:
Guest(s) 22
Currently Browsing this Page:
1 Guest(s)

Devices in use: Phone (5), Desktop (17)

Forum Stats:
Groups: 2
Forums: 10
Topics: 1519
Posts: 5141