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 Details

    • 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 Details

    • 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

      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.