SCM State Transitions
A deployment of an SCM package transitions through multiple states. For a successful deployment, the states that it transitions through follow:
1. TW_SWUPDATE_CREATED
2. TW_SWUPDATE_NOTIFIED
3. TW_SWUPDATE_WAIT_FOR_DOWNLOAD
4. TW_SWUPDATE_START_DOWNLOAD
5. TW_SWUPDATE_DOWNLOADING. During this state, the download function returns TW_SWU_IN_PROGRESS, and the platform is notified that the package is being downloaded.
6. TW_SWUPDATE_DOWNLOADED. When the job transitions to this state, the download function returns TW_SWU_COMPLETE_SUCCESS. From this state, the job can transfer to one of the following states:
TW_SWUPDATE_WAIT_FOR_INSTALL_COMMAND
TW_SWUPDATE_WAIT_FOR_INSTALL_DATETIME
7. From these two WAIT states, the job transitions to TW_SWUPDATE_INSTALLING at the scheduled time or when the install command is triggered.
8. TW_SWUPDATE_COMPLETED
9. TW_SWUPDATE_DONE
Cancelled (Aborted) Deployments
If a user cancels the deployment (abort()), the deployment falls out of the general order listed above and transitions to the TW_SWUPDATE_ABORTED. The states in which this can happen follow:
TW_SWUPDATE_CREATED
TW_SWUPDATE_NOTIFIED
TW_SWUPDATE_WAIT_FOR_DOWNLOAD
TW_SWUPDATE_START_DOWNLOAD
TW_SWUPDATE_DOWNLOADED
TW_SWUPDATE_WAIT_FOR_INSTALL_COMMAND
TW_SWUPDATE_WAIT_FOR_INSTALL_DATETIME
TW_SWUPDATE_INSTALLING
After transitioning to TW_SWUPDATE_ABORTED, the job transitions to TW_SWUPDATE_DONE.
Deployments Encountering Error
If a problem causes a deployment to stop, the deployment can transition as follows:
From TW_SWUPDATE_START_DOWNLOAD to TW_SWUPDATE_ABORTED
From TW_SWUPDATE_DOWNLOADING to TW_SWUPDATE_FAILED
After the deployment transitions to TW_SWUPDATE_ABORTED or TW_SWUPDATE_FAILED, it transitions to the TW_SWUPDATE_DONE state.
Transitions After Invoking ScheduleInstall Service
When the ScheduleInstall() service is invoked, the job transitions to TW_SWUPDATE_WAIT_FOR_INSTALL_DATETIME from any of the following states:
TW_SWUPDATE_CREATED
TW_SWUPDATE_NOTIFIED
TW_SWUPDATE_WAIT_FOR_DOWNLOAD
TW_SWUPDATE_START_DOWNLOAD
TW_SWUPDATE_DOWNLOADING
TW_SWUPDATE_WAIT_FOR_INSTALL_COMMAND
TW_SWUPDATE_WAIT_FOR_INSTALL_DATETIME
TW_SWUPDATE_INSTALLING
TW_SWUPDATE_FAILED
TW_SWUPDATE_DONE
How It Works
The following diagram illustrates the states that a Software Update Manager goes through to accomplish its goals. Each state transition is reported to listeners that have registered a handler.
Was this helpful?