I’m using a state script on Download_Enter that uses the server API to get the deployment artifact name. I’m using the name of the artifact to communicate meta-data about the update to the device. The application can then, with user input, selectively allow or delay the update based on the specific metadata.
The success case works just fine but in the case of an aborted deployment, I see no way to detect this situation and cleanup. The docs state that most states have an “Error” transition but it seems that does not correspond to a state script. I see logging info that the client has detected the aborted deployment but there does not appear any way for that to extend to my state scripts.
I guess the right approach is to cleanup in a Sync_Leave script. Does anyone have any other suggestions here?
Also, there are two “Leave” transitions from the Sync state; one to Download and one to Idle. Is there any way to know within the state script which transition is happening?