Node and App lifecycle

As you interact with an ActyxOS node or app, it transitions through different states in its lifecycle. This page explains the lifecycles of ActyxOS nodes and apps, as well as the behaviour you can expect in the different stages. The first section describes the states of nodes and apps, and the second section explains state transitions and the behaviour you can expect.

States

The states of nodes and apps are a combination of three and four boolean variables, respectively. Note that not all theoretically possible combinations of these variables can actually be achieved, this will become clear in the second section of this page. The state of your node or app can depend on the following variables:

The tables in the following sub-sections will explain the meaning of each variable and its values for ActyxOS nodes and apps.

Status

The variable Status describes if ActyxOS or an app is running on your node:

ValueNodesApps
RunningActyxOS is running on your nodeApp is running in its runtime
StoppedActyxOS is not running on your nodeApp is not running

Note that closing the ActyxOS window on Android will not actually stop ActyxOS – it will keep running in the background. Please have a look at the section starting and stopping ActyxOS in the advanced guide for ActyxOS on Android.

Mode (only apps)

The variable Mode is only available for apps. While the variable Status (see above) describes the actual state of an app, Mode describes the target state from a user's point of view. This might, for example, lead to an app being started on your device if it is in the state Enabled and Stopped.

ValueApps
EnabledApp should be running
DisabledApp should be stopped
Use fleet management services to control this behaviour for your nodes

ActyxOS does not control the Host system of your nodes, therefore this is only available for apps. You can use fleet management services such as Balena for ActyxOS on Docker or Workspace one for ActyxOS on Android to control e.g. restarts of ActyxOS.

Settings

Nodes and apps can have valid or invalid settings. The validity of your settings depends on whether the settings object that you configured complies with the underlying settings schema:

ValueNodesApps
ValidThe settings object under com.actyx.os (= your node settings) is validThe settings object under <APP ID> is valid
InvalidThe settings object under com.actyx.os (= your node settings) is invalidThe settings object under <APP ID> is invalid

If you want to know more about node and app settings and in ActyxOS, please refer to our advanced guide on Node and App Settings.

Licenses

This state displays whether the license key you entered for your ActyxOS node or app is valid:

ValueNodesApps
ValidNode license key is validApp license key is valid
InvalidNode license key is invalidApp license key is invalid

Events and state transitions

Events define when a node or an app changes one or more of its states. A simple example would be that starting the ActyxOS app on your Android device (if ActyxOS was Stopped before) leads to your node transitioning from Stopped to Running. This state transition would then be caused by the NodeStarted event. As you can see in the next section, not all events necessarily trigger always state transitions.

We refer to each combination of node or app states as lifecycle stages. Referring to the below illustration of the node lifecycle, a node in the lifecycle stage Operational has the states Running, LicenseValid and SettingsValid.

Node lifecycle

The following illustration shows the lifecycle stages, states and events of an ActyxOS node. Below the illustration you can find an explanation of the different node states.

Node Lifecycle

A node starts its lifecycle once it is installed on its host system. At that point its states are Stopped, LicenseInvalid, SettingsInvalid.

From this point only one event leading to a transition is possible:

  • NodeStarted: leads to the next lifecycle stage: Misconfigured.

App lifecycle

The following illustration shows the lifecycle stages, states and events of an ActyxOS app. Below the illustration you can find an explanation of the different app states.

App Lifecycle

A node starts its lifecycle once it is installed on a node via ax apps deploy. At that point its states are Stopped, Disabled, LicenseValid, SettingsInvalid.

From this point only one event leading to a transition is possible:

  • AppSettingsValidated: leading to the next lifecycle stage: Configured.
Why can you not start the app?

In order to be able to start an app, your node must fulfill the following prerequisites:

  • Running node
  • Valid node settings
  • Valid app settings