-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ : update workflow with PENDING states
- Loading branch information
Showing
29 changed files
with
545 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package io.gaia_app.stacks.bo; | ||
|
||
public enum StepStatus { | ||
STARTED, FINISHED, FAILED | ||
PENDING, STARTED, FINISHED, FAILED | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/main/java/io/gaia_app/stacks/workflow/state/ApplyPendingState.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package io.gaia_app.stacks.workflow.state; | ||
|
||
import io.gaia_app.stacks.bo.JobStatus; | ||
import io.gaia_app.stacks.workflow.JobWorkflow; | ||
|
||
public class ApplyPendingState implements JobState { | ||
|
||
@Override | ||
public void start(JobWorkflow jobWorkflow) { | ||
var job = jobWorkflow.getJob(); | ||
|
||
job.proceed(JobStatus.APPLY_STARTED); | ||
jobWorkflow.setState(new ApplyStartedState()); | ||
|
||
jobWorkflow.getCurrentStep().start(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/main/java/io/gaia_app/stacks/workflow/state/PlanPendingState.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package io.gaia_app.stacks.workflow.state; | ||
|
||
import io.gaia_app.stacks.bo.JobStatus; | ||
import io.gaia_app.stacks.workflow.JobWorkflow; | ||
|
||
/** | ||
* Describes a job which plan has not been started yet | ||
*/ | ||
public class PlanPendingState implements JobState { | ||
|
||
@Override | ||
public void start(JobWorkflow jobWorkflow) { | ||
var job = jobWorkflow.getJob(); | ||
|
||
job.start(); | ||
jobWorkflow.setState(new PlanStartedState()); | ||
|
||
jobWorkflow.getCurrentStep().start(); | ||
} | ||
} |
Oops, something went wrong.