Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Automation Composition Management manages a number of states of various types to manage the lifecycle of compositions. Those states are described here. Please also see the ACM System Level Dialogues page to see the system dialogues that change states and how states interrelate in detail. Please also see ITU Recommendation X.731, which is reflected in the states of AC Element Instances.

Participant State

ACParticipant states are NOT managed by ACM but the state of a participant is recorded and supervised by ACM.


PlantUML Macro
@startuml

[*] --> ONLINE: Register
ONLINE --> ONLINE: Heartbeat
ONLINE --> OFFLINE: Timeout
OFFLINE --> ONLINE: Heartbeat
ONLINE --> [*]: Deregister
OFFLINE --> [*]: Deregister

@enduml

Automation Composition Type State

The states that an Automation Composition Type can have are shown in the diagram below.


PlantUML Macro
@startuml

The current ACM state machine works but it is incosistent in the way it handles error states or failed transitions. A composition and its elements can get "stuck" in transition states.

We need to

  • Specify what the current state machine is for both compositions and elements and describe what the state machine for both should be
  • Specify what the behaviour of the runtime and participants should be in each state
  • Specify what the behaviour should be for the runtime and participants should be in transitions

Specifically we need to clarify:

  • State of the composition elements
  • State of the overall composition is derived from the composition element states
  • Admin state/Running state
  • When all the elements are fully up and configured, the go to state Passive, when all elements are in Passive, the full composition goes to Passive
  • Error states: Are they parallel sates or part of the same state?
  • There should “it didn’t work” states like “Passive-Error” or “Run_Error” (names to be decided later)
  • Describe what the “Running” state means and what the participant should do in Passive->Running and Running->Passive transitions.
  • Say a K8S service crashes, how do we feed that back? Running_Error. The state of the POD is only checked during startup. It is not periodically checked. There should be supervision.

State Machine for Automation Compositions

Current State Machine

TBC

Proposed State Machine

PlantUML Macro
@startuml
'https://plantuml.com/state-diagram

state UNINITIALIZED

state UNINITIALIZED_TO_PASSIVE

state PASSIVE_TO_UNINITIALIZED

state PASSIVE

state PASSIVE_TO_RUNNING

state RUNNING_TO_PASSIVE

state RUNNING

state RUNNING_TO_PASSIVE_ERROR

state PASSIVE_TO_RUNNING_ERROR

state RUNNING

state RUN_ERROR



[*] --> UNINITIALIZED

UNINITIALIZEDCOMMISSIONED: Commission
COMMISSIONED --> [*]: Decommission
COMMISSIONED --> UNINITIALIZED_TO_PASSIVE

PASSIVE_TO_UNINITIALIZEDPRIMING: Prime
PRIMED --> PRIMING: Prime
PRIMING --> UNINITIALIZED

UNINITIALIZED_TO_PASSIVE PRIMED: AC Element Types\nall PRIMED
PRIMING --> DEPRIMING: Deprime
PRIMED --> PASSIVE

PASSIVEDEPRIMING: Deprime
DEPRIMING --> PASSIVE_TO_RUNNING

PASSIVECOMMISSIONED: AC Element Types\nall DEPRIMED

@enduml


Automation Composition Element Type State

The states that an Automation Composition Element Type can have on ACM Runtime are shown in the diagram below.


PlantUML Macro
@startuml

[*] --> PASSIVE_TO_UNINITIALIZED

PASSIVE_TO_RUNNINGCOMMISSIONED: Commission
COMMISSIONED --> RUNNING

PASSIVE_TO_RUNNING[*]: Decommission
COMMISSIONED --> PASSIVE_TO_RUNNING_ERROR

PASSIVE_TO_RUNNING_ERROR PRIMING: Prime
PRIMED --> PASSIVE_TO_RUNNING

RUNNING PRIMING: Prime
PRIMING --> RUNNING_TO_PASSIVE

RUNNING_TO_PASSIVE PRIMED: AC Element Type Primed\nresponse from Participant
PRIMING --> PASSIVE

RUNNING_TO_PASSIVEDEPRIMING: Deprime
PRIMED --> RUNNING_TO_PASSIVE_ERROR

RUNNING DEPRIMING: Deprime
DEPRIMING --> RUN_ERROR

RUN_ERRORCOMMISSIONED: AC Element Type Deprimed\nresponse from Participant

@enduml


The states that an Automation Composition Element Type can have on a Participant are shown in the diagram below.

PlantUML Macro
@startuml

[*] --> RUNNING

RUN_ERROR PRIMED: Prime from\nACM Runtime
PRIMED --> RUNNING_TO_PASSIVE

RUNNING_TO_PASSIVE_ERROR PRIMED: Prime from ACM Runtime
PRIMED --> RUNNING_TO_PASSIVE[*]: Deprime from\nACM Runtime

@enduml

...

Automation Composition

...

Instance State

...

TBC

The states that an Automation Composition Instance can have are shown in the diagram below.

...


PlantUML Macro
@startuml

[*] --> UNDEPLOYED: Create
UNDEPLOYED --> [*]: Delete
UNDEPLOYED --> DEPLOYING: Deploy
DEPLOYING --> DEPLOYED: AC Element Instances\nall DEPLOYED
DEPLOYING --> UNDEPLOYING: Undeploy
DEPLOYED --> UNDEPLOYING: Undeploy
UNDEPLOYING --> UNDEPLOYED: AC Element Instances\nall UNDEPLOYED


state DEPLOYED {
 [*] --> LOCKED: Deploy
 LOCKED --> [*]: Undeploy
 LOCKED --> UNLOCKING: Unlock
 UNLOCKING --> UNLOCKED: AC Element Instances\nall UNLOCKED
 UNLOCKED --> LOCKING: Lock
 UNLOCKING --> LOCKING: Lock
 LOCKING --> LOCKED: AC Element Instances\nall LOCKED
}

@enduml

Automation Composition Element Instance State

The states that an Automation Composition Element Instance can have on ACM Runtime are shown in the diagram below.


PlantUML Macro
@startuml
'https://plantuml.com/state-diagram

state UNINITIALIZED

state UNINITIALIZED_TO_PASSIVE

state PASSIVE_TO_UNINITIALIZED

state PASSIVE

state PASSIVE_TO_RUNNING

state RUNNING_TO_PASSIVE

state RUNNING

state RUNNING_TO_PASSIVE_ERROR

state PASSIVE_TO_RUNNING_ERROR

state RUNNING

state RUN_ERROR



[*] --> UNDEPLOYED: UNINITIALIZED

UNINITIALIZEDCreate
UNDEPLOYED --> [*]: Delete
UNDEPLOYED --> UNINITIALIZED_TO_PASSIVE

PASSIVE_TO_UNINITIALIZED DEPLOYING: Deploy
DEPLOYING --> DEPLOYED: AC Element\nInstance DEPLOYED
DEPLOYING --> UNINITIALIZED

UNINITIALIZED_TO_PASSIVEUNDEPLOYING: Undeploy
DEPLOYED --> UNDEPLOYING: Undeploy
UNDEPLOYING --> PASSIVE

PASSIVE UNDEPLOYED: AC Element\nInstance UNDEPLOYED


state DEPLOYED {
 [*] --> PASSIVE_TO_RUNNING

PASSIVE LOCKED: Deploy
 LOCKED --> [*]: Undeploy
 LOCKED --> PASSIVE_TO_UNINITIALIZED

PASSIVE_TO_RUNNING UNLOCKING: Unlock
 UNLOCKING --> UNLOCKED: AC Element\nInstance UNLOCKED
 UNLOCKED --> LOCKING: RUNNING

PASSIVE_TO_RUNNINGLock
 UNLOCKING --> LOCKING: Lock
 LOCKING --> PASSIVE_TO_RUNNING_ERROR

PASSIVE_TO_RUNNING_ERROR LOCKED: AC Element\nInstance LOCKED
}

@enduml


The states that an Automation Composition Element Instance can have on a Participant are shown in the diagram below.


PlantUML Macro
@startuml

[*] --> PASSIVE_TO_RUNNING

RUNNINGDEPLOYING: Deploy
DEPLOYING --> DEPLOYED: AC Element\nInstance DEPLOYED\nRespond with\nAC Element State Update
DEPLOYING --> RUNNING_TO_PASSIVE

RUNNING_TO_PASSIVEUNDEPLOYING: Undeploy
DEPLOYING --> [*]: Deploy Failed\nRespond with\nAC Element State Update
DEPLOYED --> PASSIVE

RUNNING_TO_PASSIVEUNDEPLOYING: Undeploy
UNDEPLOYING --> RUNNING_TO_PASSIVE_ERROR

RUNNING [*]: Undeployed\nRespond with\nAC Element State Update

state DEPLOYED {
 [*] --> RUN_ERROR

RUN_ERRORLOCKED
 LOCKED --> [*]
 LOCKED --> RUNNING

RUN_ERRORUNLOCKING: Unlock
 UNLOCKING --> UNLOCKED: AC Element\nInstance UNLOCKED
 UNLOCKED --> RUNNING_TO_PASSIVE

RUNNING_TO_PASSIVE_ERRORLOCKING: Lock
 UNLOCKING --> LOCKING: Lock
 LOCKING --> RUNNING_TO_PASSIVE LOCKED: AC Element\nInstance LOCKED
}

@enduml