States of the ExecutionStatus Attribute of a ScheduleEntry

This document shows the states of a schedule entry's execution status and the transitions that move the status from one state to another. This is a State Diagram:

state dgm

The state transitions can be examined from another angle. Instead of a state-centric view, a message-centric view can be used. In this view we focus on the messages that a ScheduleEntry receives that can change the state of its status attribute.

At this point we should mention that the execute and complete messages are not currently part of the ScheduleEntry interface. They are, though, part the ExecutionBlock API, and ExecutionBlock implements ScheduleEntry. If we add execute and complete to ScheduleEntry, we will delete this paragraph. Otherwise, we should change the focus of this page so that it includes ExecutionBlock more completely and then delete this paragraph.

schedule
  • The status will be changed only if the current status is NOT_YET_SCHEDULED. (Note that a client may change the time at which an entry is scheduled by sending this schedule message to an entry whose status is already SCHEDULED_BUT_NOT_STARTED.)
  • If the status is to be changed, it will be changed to SCHEDULED_BUT_NOT_STARTED.
reschedule
  • The status will be changed only if the current status is SCHEDULED_BUT_NOT_STARTED.
  • If the status is to be changed, it will be changed to NOT_YET_SCHEDULED.
  • This message makes the entry visible to the automated scheduler as something that needs to be scheduled.
hold
  • The status will be changed only if the current status is either NOT_YET_SCHEDULED or SCHEDULED_BUT_NOT_STARTED.
  • This message can be sent only by a human.
  • If the status is to be changed, it will be changed to ON_HOLD.
release
  • The status will be changed only if the current status is ON_HOLD.
  • This message can be sent only by a human.
  • If the status is to be changed, it will be changed to NOT_YET_SCHEDULED.
cancel
  • The status will be changed only if the current status is either NOT_YET_SCHEDULED, SCHEDULED_BUT_NOT_STARTED, ON_HOLD, or IN_PROGRESS.
  • If the status is to be changed, it will be changed to CANCELED.
  • If the status is changed from IN_PROGRESS to CANCELED, the abortedCount of the parent SchedulingBlock (SB) is incremented.
execute
  • The status will be changed only if the current status is SCHEDULED_BUT_NOT_STARTED.
  • If the status is to be changed, it will be changed to IN_PROGRESS.
complete
  • The status will be changed only if the current status is IN_PROGRESS.
  • If the status is to be changed, it will be changed to COMPLETED.
  • If the status is changed to COMPLETED, the completedCount of the parent SB is incremented.

The methods that change the execution status, and the enumeration of status elements is given in this class diagram:

class dgm