public abstract class CronWorkflow extends WorkflowDefinition<CronWorkflow.State>
| Modifier and Type | Class and Description |
|---|---|
static class |
CronWorkflow.State
States of cron workflow.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
VAR_SCHEDULE
Name of the state variable that stores schedule in cron syntax.
|
allowedTransitions, failureTransitions| Modifier | Constructor and Description |
|---|---|
protected |
CronWorkflow(String type)
Extend cron workflow definition.
|
protected |
CronWorkflow(String type,
WorkflowSettings settings)
Extend cron workflow definition with customized workflow settings.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.joda.time.DateTime |
getNextActivationTime(StateExecution execution,
String cron)
Calculates next activation time based on cron state variable.
|
NextAction |
handleFailure(StateExecution execution)
Tries to handle failures by calling
handleFailureImpl(io.nflow.engine.workflow.definition.StateExecution). |
protected boolean |
handleFailureImpl(StateExecution execution)
Logs an error and continues.
|
NextAction |
schedule(StateExecution execution,
String cron)
Determines the next execution time for the doWork state by calling
getNextActivationTime. |
getStatesgetAllowedTransitions, getDescription, getErrorState, getFailureTransitions, getInitialState, getMethod, getName, getSettings, getState, getSupportedSignals, getType, isAllowedNextAction, isStartState, permit, permit, setDescription, setNameequals, hashCode, toStringpublic static final String VAR_SCHEDULE
protected CronWorkflow(String type, WorkflowSettings settings)
type - The type of the workflow.settings - The workflow settings.protected CronWorkflow(String type)
type - The type of the workflow.public NextAction schedule(StateExecution execution, String cron)
getNextActivationTime.execution - The workflow execution context.cron - The cron state variable.protected org.joda.time.DateTime getNextActivationTime(StateExecution execution, String cron)
execution - The workflow execution context.cron - The cron schedule.public NextAction handleFailure(StateExecution execution)
handleFailureImpl(io.nflow.engine.workflow.definition.StateExecution).execution - The workflow execution context.protected boolean handleFailureImpl(StateExecution execution)
execution - The workflow execution context.Copyright © 2014–2020 Nitor Creations. All rights reserved.