Session States
A session undergoes various states from its creation, through the initiation of charging, to the calculation of the final cost. Below are the different states and the permissible transitions between them.
INITIALIZED: A session is first established within our system in the form of a
Requested Session
. Specifically, this indicates that the session has been requested by a user, but the station has not yet acknowledged the request.CONFIRMED: The session is established within our system, and acknowledgment from the station has been received, but charging has not yet commenced.
DENIED: The session initiation failed as the station denied the request, timed out, or encountered other issues.
ACTIVE: The station has acknowledged the session and has started charging. During this phase, the session collects energy meter readings at regular intervals, which are later used to calculate the session's cost.
PROCESSING: The station has completed charging, and the session is now in the
PROCESSING
phase. During this phase, the session conducts various validations and computes the session's cost using the collected meter values. During this stage, the session may be flagged forManual Review
if it fails any of the validations or checks.SANITY_CHECK: This phase involves verifying the validity of the session's various components, such as the total session cost and energy. If the session fails any of the sanity checks, it is flagged for
Manual Review
.MANUAL REVIEW: A session with a
Manual Review
status is one that has been flagged for review by either the system or a user. This phase is typically reached when a session fails any of the calculations or validations from thePROCESSING
orSANITY_CHECK
phases. These sessions are to be manually reviewed by a support specialist to determine the cause of the failure and to correct the session's cost and energy values.COMPLETE: A session reaches the
COMPLETE
phase once it has been successfully processed and has passed all the validations and checks. This phase indicates that the session is ready to be billed.
State transitions:
Current Status | Valid Transition Status |
---|---|
INITIALIZED | CONFIRMED, ACTIVE, DENIED |
CONFIRMED | ACTIVE, DENIED |
ACTIVE | PROCESSING |
PROCESSING | SANITY_CHECK, MANUAL_REVIEW |
SANITY_CHECK | COMPLETE, MANUAL_REVIEW |
MANUAL_REVIEW | COMPLETE |
COMPLETE |