agave-jobs/jobs-core/src/main/java/org/iplantc/service/jobs/model/enumerations/JobStatusType.java
/**
	 * The job state that logically comes directly before the 
	 * current state. Some states such as {@link JobStatusType#PAUSED},
	 * {@link JobStatusType#KILLED}, {@link JobStatusType#STOPPED}, {@link JobStatusType#FINISHED}, and
	 * {@link JobStatusType#FAILED} do not have a well-defined predecessor
	 * so they fall back to {@link JobStatusType#PENDING}.
	 * 
	 * Note that this method does not pull from the actual 
	 * job history, but rather represents the backward
	 * progression of a job in an ideal situation.
	 *   
	 * @return job state logically before this one.
	 */
The job state that logically comes directly before the
current state.

Note that this method does not pull from the actual
job history, but rather represents the backward
progression of a job in an ideal situation.

@return job state logically before this one.
The job state that logically comes directly before the current state . Note that this method does not pull from the actual job history but rather represents the backward progression of a job in an ideal situation . @return job state logically before this one .
public JobStatusType previousState()
	{
		if (this == PENDING || this == PROCESSING_INPUTS) {
			return PENDING;
		} else if (this == STAGING_INPUTS) {
			return PROCESSING_INPUTS; 
		} else if (this == STAGED) {
			return STAGING_INPUTS;
		} else if (this == STAGING_JOB) {
			return STAGED;
		} else if (this == SUBMITTING) {
			return STAGING_JOB;
		} else if (this == QUEUED) {
			return SUBMITTING;
		} else if (this == RUNNING) {
			return QUEUED;
		} else if (this == CLEANING_UP) {
			return RUNNING;
		} else if (this == ARCHIVING) {
			return CLEANING_UP;
		} else if (this == ARCHIVING_FAILED || this == ARCHIVING_FINISHED) {
			return ARCHIVING;
		} else { 
			return PENDING;
		}
	}
public JobStatusType previousState ( ) { if ( this == PENDING || this == PROCESSING_INPUTS ) { return PENDING ; } else if ( this == STAGING_INPUTS ) { return PROCESSING_INPUTS ; } else if ( this == STAGED ) { return STAGING_INPUTS ; } else if ( this == STAGING_JOB ) { return STAGED ; } else if ( this == SUBMITTING ) { return STAGING_JOB ; } else if ( this == QUEUED ) { return SUBMITTING ; } else if ( this == RUNNING ) { return QUEUED ; } else if ( this == CLEANING_UP ) { return RUNNING ; } else if ( this == ARCHIVING ) { return CLEANING_UP ; } else if ( this == ARCHIVING_FAILED || this == ARCHIVING_FINISHED ) { return ARCHIVING ; } else { return PENDING ; } }
The job state that logically comes directly before the
 current state.
The job state that logically comes directly before the current state .
// PAUSED, KILLED, STOPPED, FINISHED, FAILED