public static class WorkflowInstance.Builder extends Object
| Constructor and Description |
|---|
Builder()
Create a workflow instance builder.
|
Builder(ObjectStringMapper objectMapper)
Create a workflow instance builder with an object mapper.
|
Builder(WorkflowInstance copy)
Create a workflow instance builder based on an existing workflow instance.
|
| Modifier and Type | Method and Description |
|---|---|
WorkflowInstance |
build()
Create the workflow instance object.
|
WorkflowInstance.Builder |
putStateVariable(String key,
Object value)
Put a state variable to the state variables map.
|
WorkflowInstance.Builder |
putStateVariable(String key,
Optional<?> optionalValue)
Put a state variable to the state variables map if the optional value is present.
|
WorkflowInstance.Builder |
putStateVariable(String key,
String value)
Put a state variable to the state variables map.
|
WorkflowInstance.Builder |
setActions(List<WorkflowInstanceAction> actions)
Set the workflow instance actions.
|
WorkflowInstance.Builder |
setBusinessKey(String businessKey)
Set the business key.
|
WorkflowInstance.Builder |
setCreated(org.joda.time.DateTime created)
Set the creation timestamp.
|
WorkflowInstance.Builder |
setExecutorGroup(String executorGroup)
Set the executor group name.
|
WorkflowInstance.Builder |
setExecutorId(Integer executorId)
Set the executor instance identifier.
|
WorkflowInstance.Builder |
setExternalId(String externalId)
Set the external identifier.
|
WorkflowInstance.Builder |
setId(long id)
Set the workflow instance identifier.
|
WorkflowInstance.Builder |
setModified(org.joda.time.DateTime modified)
Set the modification timestamp.
|
WorkflowInstance.Builder |
setNextActivation(org.joda.time.DateTime nextActivation)
Set the next activation time.
|
WorkflowInstance.Builder |
setOriginalStateVariables(Map<String,String> originalStateVariables)
Set the original state variables.
|
WorkflowInstance.Builder |
setParentActionId(Long parentActionId)
Set the parent workflow identifier.
|
WorkflowInstance.Builder |
setParentWorkflowId(Long parentWorkflowId)
Set the parent workflow identifier.
|
WorkflowInstance.Builder |
setPriority(Short priority)
Set the priority of the workflow instance.
|
WorkflowInstance.Builder |
setRetries(int retries)
Set the number of retries.
|
WorkflowInstance.Builder |
setSignal(Optional<Integer> signal)
Set the signal value.
|
WorkflowInstance.Builder |
setStartedIfNotSet(org.joda.time.DateTime started)
Set the started timestamp if it has not already been set.
|
WorkflowInstance.Builder |
setState(String state)
Set the state.
|
WorkflowInstance.Builder |
setStateText(String stateText)
Set the state text.
|
WorkflowInstance.Builder |
setStateVariables(Map<String,String> stateVariables)
Set the state variables.
|
WorkflowInstance.Builder |
setStatus(WorkflowInstance.WorkflowInstanceStatus status)
Set the status.
|
WorkflowInstance.Builder |
setType(String type)
Set the type of the workflow definition.
|
public Builder()
public Builder(ObjectStringMapper objectMapper)
objectMapper - The object mapper.public Builder(WorkflowInstance copy)
copy - The instance to be used as a basis for the new instance.public WorkflowInstance.Builder setId(long id)
id - The identifier.public WorkflowInstance.Builder setExecutorId(Integer executorId)
executorId - The identifier.public WorkflowInstance.Builder setParentWorkflowId(Long parentWorkflowId)
parentWorkflowId - The identifier.public WorkflowInstance.Builder setParentActionId(Long parentActionId)
parentActionId - The identifier.public WorkflowInstance.Builder setStatus(WorkflowInstance.WorkflowInstanceStatus status)
status - The status.public WorkflowInstance.Builder setType(String type)
type - The type.public WorkflowInstance.Builder setPriority(Short priority)
priority - The priority.public WorkflowInstance.Builder setBusinessKey(String businessKey)
businessKey - The business key.public WorkflowInstance.Builder setExternalId(String externalId)
externalId - The external identifier.public WorkflowInstance.Builder setState(String state)
state - The name of the state.public WorkflowInstance.Builder setStateText(String stateText)
stateText - The state text.public WorkflowInstance.Builder setNextActivation(org.joda.time.DateTime nextActivation)
nextActivation - The next activation time.public WorkflowInstance.Builder setOriginalStateVariables(Map<String,String> originalStateVariables)
originalStateVariables - The original state variables.public WorkflowInstance.Builder setStateVariables(Map<String,String> stateVariables)
stateVariables - The state variables.public WorkflowInstance.Builder putStateVariable(String key, String value)
key - The name of the variable.value - The string value of the variable.public WorkflowInstance.Builder putStateVariable(String key, Object value)
key - The name of the variable.value - The value of the variable, serialized by object mapper.public WorkflowInstance.Builder putStateVariable(String key, Optional<?> optionalValue)
key - The name of the variable.optionalValue - The optional value of the variable, serialized by object mapper.public WorkflowInstance.Builder setActions(List<WorkflowInstanceAction> actions)
actions - List of actions.public WorkflowInstance.Builder setRetries(int retries)
retries - The number of retries.public WorkflowInstance.Builder setCreated(org.joda.time.DateTime created)
created - Creation time.public WorkflowInstance.Builder setModified(org.joda.time.DateTime modified)
modified - Modification time.public WorkflowInstance.Builder setStartedIfNotSet(org.joda.time.DateTime started)
started - Start time.public WorkflowInstance.Builder setExecutorGroup(String executorGroup)
executorGroup - The executor group name.public WorkflowInstance.Builder setSignal(Optional<Integer> signal)
signal - The signal value.public WorkflowInstance build()
Copyright © 2014–2020 Nitor Creations. All rights reserved.