Class WorkflowInstanceAction.Builder
- java.lang.Object
-
- io.nflow.engine.workflow.instance.WorkflowInstanceAction.Builder
-
- Enclosing class:
- WorkflowInstanceAction
public static class WorkflowInstanceAction.Builder extends Object
The builder for a workflow instance action.
-
-
Constructor Summary
Constructors Constructor Description Builder()Create a builder for a workflow instance action.Builder(WorkflowInstance instance)Create a builder for a workflow instance action based on an existing workflow instance.Builder(WorkflowInstanceAction action)Create a builder for a workflow instance action based on an existing workflow instance action.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WorkflowInstanceActionbuild()Build the workflow instance action.longgetId()Get the action id (generated by database)WorkflowInstanceAction.BuildersetExecutionEnd(org.joda.time.DateTime executionEnd)Set the execution end time.WorkflowInstanceAction.BuildersetExecutionStart(org.joda.time.DateTime executionStart)Set the execution start time.WorkflowInstanceAction.BuildersetExecutorId(Integer executorId)Set the executor id.WorkflowInstanceAction.BuildersetId(long id)Set the action id (generated by database)WorkflowInstanceAction.BuildersetRetryNo(int retryNo)Set the retry number.WorkflowInstanceAction.BuildersetState(String state)Set the state.WorkflowInstanceAction.BuildersetStateText(String stateText)Set the state text.WorkflowInstanceAction.BuildersetType(WorkflowInstanceAction.WorkflowActionType actionType)Set the trigger type of the action.WorkflowInstanceAction.BuildersetUpdatedStateVariables(Map<String,String> updatedStateVariables)Set the updated state variables.WorkflowInstanceAction.BuildersetWorkflowInstanceId(long workflowInstanceId)Set the workflow instance identifier.
-
-
-
Constructor Detail
-
Builder
public Builder()
Create a builder for a workflow instance action.
-
Builder
public Builder(WorkflowInstanceAction action)
Create a builder for a workflow instance action based on an existing workflow instance action.- Parameters:
action- The workflow instance action to be copied.
-
Builder
public Builder(WorkflowInstance instance)
Create a builder for a workflow instance action based on an existing workflow instance.- Parameters:
instance- The workflow instance for which the action is created.
-
-
Method Detail
-
setId
public WorkflowInstanceAction.Builder setId(long id)
Set the action id (generated by database)- Parameters:
id- Action id- Returns:
- this.
-
getId
public long getId()
Get the action id (generated by database)- Returns:
- The action id.
-
setWorkflowInstanceId
public WorkflowInstanceAction.Builder setWorkflowInstanceId(long workflowInstanceId)
Set the workflow instance identifier.- Parameters:
workflowInstanceId- The workflow instance identifier.- Returns:
- this.
-
setExecutorId
public WorkflowInstanceAction.Builder setExecutorId(Integer executorId)
Set the executor id.- Parameters:
executorId- The executor id.- Returns:
- this
-
setType
public WorkflowInstanceAction.Builder setType(WorkflowInstanceAction.WorkflowActionType actionType)
Set the trigger type of the action.- Parameters:
actionType- The action type.- Returns:
- this.
-
setState
public WorkflowInstanceAction.Builder setState(String state)
Set the state.- Parameters:
state- The name of the state.- Returns:
- this.
-
setStateText
public WorkflowInstanceAction.Builder setStateText(String stateText)
Set the state text.- Parameters:
stateText- The state text.- Returns:
- this.
-
setUpdatedStateVariables
public WorkflowInstanceAction.Builder setUpdatedStateVariables(Map<String,String> updatedStateVariables)
Set the updated state variables.- Parameters:
updatedStateVariables- The updated state variables.- Returns:
- this.
-
setRetryNo
public WorkflowInstanceAction.Builder setRetryNo(int retryNo)
Set the retry number.- Parameters:
retryNo- The retry number.- Returns:
- this.
-
setExecutionStart
public WorkflowInstanceAction.Builder setExecutionStart(org.joda.time.DateTime executionStart)
Set the execution start time.- Parameters:
executionStart- The execution start time.- Returns:
- this.
-
setExecutionEnd
public WorkflowInstanceAction.Builder setExecutionEnd(org.joda.time.DateTime executionEnd)
Set the execution end time.- Parameters:
executionEnd- The execution end time.- Returns:
- this.
-
build
public WorkflowInstanceAction build()
Build the workflow instance action.- Returns:
- The workflow instance action.
-
-