Class WorkflowInstanceAction.Builder
java.lang.Object
io.nflow.engine.workflow.instance.WorkflowInstanceAction.Builder
- Enclosing class:
WorkflowInstanceAction
The builder for a workflow instance action.
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder()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
Modifier and TypeMethodDescriptionbuild()Build the workflow instance action.longgetId()Get the action id (generated by database)setExecutionEnd(org.joda.time.DateTime executionEnd) Set the execution end time.setExecutionStart(org.joda.time.DateTime executionStart) Set the execution start time.setExecutorId(Integer executorId) Set the executor id.setId(long id) Set the action id (generated by database)setRetryNo(int retryNo) Set the retry number.Set the state.setStateText(String stateText) Set the state text.setType(WorkflowInstanceAction.WorkflowActionType actionType) Set the trigger type of the action.setUpdatedStateVariables(Map<String, String> updatedStateVariables) Set the updated state variables.setWorkflowInstanceId(long workflowInstanceId) Set the workflow instance identifier.
-
Constructor Details
-
Builder
public Builder()Create a builder for a workflow instance action. -
Builder
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
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 Details
-
setId
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
Set the workflow instance identifier.- Parameters:
workflowInstanceId- The workflow instance identifier.- Returns:
- this.
-
setExecutorId
Set the executor id.- Parameters:
executorId- The executor id.- Returns:
- this
-
setType
Set the trigger type of the action.- Parameters:
actionType- The action type.- Returns:
- this.
-
setState
Set the state.- Parameters:
state- The name of the state.- Returns:
- this.
-
setStateText
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
Set the retry number.- Parameters:
retryNo- The retry number.- Returns:
- this.
-
setExecutionStart
Set the execution start time.- Parameters:
executionStart- The execution start time.- Returns:
- this.
-
setExecutionEnd
Set the execution end time.- Parameters:
executionEnd- The execution end time.- Returns:
- this.
-
build
Build the workflow instance action.- Returns:
- The workflow instance action.
-