wiki:control-panel/hacking/state-transition

Version 1 (modified by Jamie McClelland, 8 years ago) (diff)

--

Red Item State Transitions

Objects such as hosting orders, members, contacts, invoices are simple since they do not require any action to take place on a node. They only exist in the database. Most of these objects have just two states: active or deleted.

Red items, however, are different since a state change is first recorded as pending in the database. Then, asynchronously, the node attempts to implement the change state and reports a new state based on the outcome. Below is a description of the state changes. Most are self-explanatory.

transfer-limbo is a state specifically used when a hosting order is being copied from one node to a different node. Normally, two items with the same unique identifiers cannot co-exist on two different servers. transfer-limbo is an exception - in which to items can co-exist if one of them is set to the transfer-limbo state (items in this state cannot be modified - they can only be deleted once the transfer is complete).

UI initiated transitions

non-existant>pending-insert
active>pending-update
active>pending-delete
active>pending-disable
active>transfer-limbo
disabled> pending-update
disabled> pending-delete
soft-error> pending-restore
transfer-limob> pending-delete

node initiated transitions

pending-insert>active
pending-insert>soft-error
pending-insert> hard-error
pending-update> active
pending-update> soft-error
pending-update> hard-error
pending-delete>deleted
pending-delete>soft-error
pending-delete> hard-error
pending-restor >active
pending-restore>soft-error
pending-restore>hard-error
pending-disable>disabled
pending-disable>soft-error
pending-disable>hard-error