Message states and transitions
The core of the Auron SMS Server is its internal message bus architecture. This article defines the message states and state-transitions.
State and state transitions in the Auron SM Server are very straightforward. The status of a message is split over two axis:
- Channel status. Set in the StatusID and the AckStatusID fields;
- Trigger status. Set in the TriggerStatusID.
The channel status fields are mostly controlled by the channels while trigger processing controls the trigger status.
These are the message status fields as shown from the Auron SMS Server Manager. The direction field is supplementary and not a status field.
The following sections explain the status fields in detail.
StatusID
The status ID shows if a message is sending or receiving and whether this has succeeded or failed. This field is used in message processing to determine if a trigger should run.
Each trigger specifies on which status it should run. Triggers can only run on a permanent status. This means that a trigger can run on a ‘RECEIVED’ status but can not run on a ‘RECEIVING’ status.
Sending
The schematic below shows the state diagram for sending a message. The permanent states are green and red. Transient states are blue.
The following status ID values are used when sending a new message:
StatusID | Description | Trigger |
CREATING | Creating this message / message data is incomplete | |
SCHEDULED | Scheduled for sending. Please look at scheduled time | |
QUEUED | Queued for sending. Please look at Channel ID | |
SENDING | Channel is currently sending this message | |
SENT | Message was sent successfully | ✔ |
FAILED | Message failed to send | ✔ |
NOCHANNEL | No channel can sent this message | ✔ |
BLOCKED | A blocking rule prevents this message from sending | ✔ |
DAILYLIMIT | The channel has already reached its daily limit | ✔ |
Sending and delivery reports
If delivery reports are supported, enabled and the ‘Apply Delivery Report’ trigger was created the following additional status ID’s become available:
Here is a description of these states:
StatusID | Description | Trigger |
DELIVERED | The message was deliverd | ✔ |
NOTDELIVERED | The message was not delivered | ✔ |
NOREPORT | Delivery report timed out | ✔ |
Receiving
This is a state diagram for receiving a message:
The following status ID values are used when receiving a message:
StatusID | Description | Trigger |
CREATING | Creating this message / message data is incomplete | |
RECEIVING | The message is currently being received by the channel | |
RECEIVED | The channel has received this message | ✔ |
AckStatusID
The acknowledge status id (AckStatusID) shows if a message is acknowledged. Depending on the channel a message can be acknowledged either on status id received, sent, both or neither.
The following acknowledge status are possible:
StatusID | Description |
N/A. No acknowledge is required | |
ACK | Acknowledged (positively) |
NACK | Negative acknowledge |
WAITING | Waiting to be acknowledged |
TriggerStatusID
The trigger status id (TriggerStatusID) shows whether the message was processed by a trigger and if this succeeded or failed.
The following trigger status are possible:
StatusID | Description |
N/A. If a trigger condition is met this message will be processed | |
PENDING | Message was queued for processing |
PROCESSING | Message is currently being processed |
PROCESSED | This message was successfully processed |
NOMATCH | No trigger condition matched. This message does not need to be processed |
NOTRIGGERS | No triggers defined. This message does not need to be processed |
FAILED | Processing failed. This is an error in the script file |