diff --git a/articles/node_lifecycle.md b/articles/node_lifecycle.md index b796e39bb..16f34f673 100644 --- a/articles/node_lifecycle.md +++ b/articles/node_lifecycle.md @@ -39,7 +39,7 @@ There are 4 primary states: - `Active` - `Finalized` -To transition out of a primary state requires action from an external supervisory process, with the exception of an error being triggered in the `Active` state. +To transition out of a primary state requires action from an external supervisory process, with the exception of an error being triggered in the `Active` state, the `Inactive` state, or the `Unconfigured`. There are also 6 transition states which are intermediate states during a requested transition. @@ -71,6 +71,8 @@ This is the life cycle state the node is in immediately after being instantiated This is also the state in which a node may be retuned to after an error has happened. In this state there is expected to be no stored state. +If an error that cannot be handled by the node/system occurs in this state, the node will transition to `ErrorProcessing`. + #### Valid transition out - The node may transition to the `Inactive` state via the `configure` transition. @@ -89,6 +91,8 @@ Data retention will be subject to the configured QoS policy for the topic. Any managed service requests to a node in the inactive state will not be answered (to the caller, they will fail immediately). +If an error that cannot be handled by the node/system occurs in this state, the node will transition to `ErrorProcessing`. + #### Valid transitions out of Inactive - A node may transition to the `Finalized` state via the `shutdown` transition. @@ -144,6 +148,7 @@ If the cleanup cannot be successfully achieved it will transition to `ErrorProce #### Valid transitions out if CleaningUp - If the `onCleanup` callback succeeds the node will transition to `Unconfigured`. +- If the `onCleanup` callback results in a failure code, the node will transition back to `Inactive`. - If the `onCleanup` callback raises or results in any other return code the node will transition to `ErrorProcessing`. ### Transition State: Activating @@ -156,6 +161,7 @@ Ideally, no preparation that requires significant time (such as lengthy hardware #### Valid transitions out if Activating - If the `onActivate` callback succeeds the node will transition to `Active`. +- If the `onActivate` callback results in a failure code, the node will transition back to `Inactive`. - If the `onActivate` callback raises or results in any other return code the node will transition to `ErrorProcessing`. ### Transition State: Deactivating @@ -166,6 +172,7 @@ This method is expected to do any cleanup to start executing, and should reverse #### Valid transitions out of Deactivating - If the `onDeactivate` callback succeeds the node will transition to `Inactive`. +- If the `onDeactivate` callback results in a failure code, the node will transition back to `Active`. - If the `onDeactivate` callback raises or results in any other return code the node will transition to `ErrorProcessing`. ### Transition State: ShuttingDown @@ -176,7 +183,7 @@ It may be entered from any Primary State except `Finalized`, the originating sta #### Valid transitions out of ShuttingDown -- If the `onShutdown` callback succeeds the node will transition to `Finalized`. +- If the `onShutdown` callback succeeds or results in a failure code, the node will transition to `Finalized`. - If the `onShutdown` callback raises or results in any other return code the node will transition to `ErrorProcessing`. ### Transition State: ErrorProcessing diff --git a/img/node_lifecycle/life_cycle_sm.asta b/img/node_lifecycle/life_cycle_sm.asta index c5af3a0f8..fbd168955 100644 Binary files a/img/node_lifecycle/life_cycle_sm.asta and b/img/node_lifecycle/life_cycle_sm.asta differ diff --git a/img/node_lifecycle/life_cycle_sm.png b/img/node_lifecycle/life_cycle_sm.png index 4830f35d4..854ae56d3 100644 Binary files a/img/node_lifecycle/life_cycle_sm.png and b/img/node_lifecycle/life_cycle_sm.png differ