Class QueryWorkflowInstances.Builder
java.lang.Object
io.nflow.engine.workflow.instance.QueryWorkflowInstances.Builder
- Enclosing class:
QueryWorkflowInstances
Builder for workflow instance queries.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd identifiers to query parameters.Add workflow states to query parameters.addStatuses(WorkflowInstance.WorkflowInstanceStatus... newStatuses) Add workflow statuses to query parameters.Add workflow definitions types to query parameters.build()Create the workflow instance query object.setBusinessKey(String businessKey) Set business key to query parameters.setExternalId(String externalId) Set external identifier to query parameters.setIncludeActions(boolean includeActions) Set whether workflow actions should be included in the results.setIncludeActionStateVariables(boolean includeActionStateVariables) Set whether state variables for workflow actions should be included in the results.setIncludeChildWorkflows(boolean includeChildWorkflows) Set whether child workflow IDs created by this instance should be included in the results.setIncludeCurrentStateVariables(boolean includeCurrentStateVariables) Set whether current workflow state variables should be included in the results.setMaxActions(Long maxActions) Set the maximum number of actions returned for each instance.setMaxResults(Long maxResults) Set the maximum number of instances to be returned.setParentActionId(Long parentActionId) Set parent action id to query parameters.setParentWorkflowId(Long parentWorkflowId) Set parent workflow instance id to query parameters.setQueryArchive(boolean queryArchive) If true, query also the archive tables if not enough results are found from the main tables.setStateVariable(String stateVariableKey, String stateVariableValue) Set state variable key and value to query parameters.
-
Constructor Details
-
Builder
public Builder()Create a workflow instance query builder. -
Builder
-
-
Method Details
-
addIds
Add identifiers to query parameters.- Parameters:
newIds- The identifiers.- Returns:
- this.
-
addTypes
Add workflow definitions types to query parameters.- Parameters:
newTypes- The types.- Returns:
- this.
-
setParentWorkflowId
Set parent workflow instance id to query parameters.- Parameters:
parentWorkflowId- The parent workflow instance id.- Returns:
- this.
-
setParentActionId
Set parent action id to query parameters.- Parameters:
parentActionId- The parent action id.- Returns:
- this.
-
addStates
Add workflow states to query parameters.- Parameters:
newStates- The state names.- Returns:
- this.
-
addStatuses
public QueryWorkflowInstances.Builder addStatuses(WorkflowInstance.WorkflowInstanceStatus... newStatuses) Add workflow statuses to query parameters.- Parameters:
newStatuses- The statuses.- Returns:
- this.
-
setBusinessKey
Set business key to query parameters.- Parameters:
businessKey- The business key.- Returns:
- this.
-
setExternalId
Set external identifier to query parameters.- Parameters:
externalId- The external identifier.- Returns:
- this.
-
setStateVariable
public QueryWorkflowInstances.Builder setStateVariable(String stateVariableKey, String stateVariableValue) Set state variable key and value to query parameters.- Parameters:
stateVariableKey- State variable key.stateVariableValue- State variable vaue.- Returns:
- this.
-
setIncludeActions
Set whether workflow actions should be included in the results. Default is `false`.- Parameters:
includeActions- True to include actions, false otherwise.- Returns:
- this.
-
setIncludeCurrentStateVariables
public QueryWorkflowInstances.Builder setIncludeCurrentStateVariables(boolean includeCurrentStateVariables) Set whether current workflow state variables should be included in the results. Default is `false`- Parameters:
includeCurrentStateVariables- True to include state variables, false otherwise.- Returns:
- this.
-
setIncludeActionStateVariables
public QueryWorkflowInstances.Builder setIncludeActionStateVariables(boolean includeActionStateVariables) Set whether state variables for workflow actions should be included in the results. Default is `false`.- Parameters:
includeActionStateVariables- True to include state variables, false otherwise.- Returns:
- this.
-
setIncludeChildWorkflows
Set whether child workflow IDs created by this instance should be included in the results. Default is `false`.- Parameters:
includeChildWorkflows- True to include child workflows, false otherwise.- Returns:
- this.
-
setMaxResults
Set the maximum number of instances to be returned. The maximum value is limited by `nflow.workflow.instance.query.max.results` configuration property. If the value is not set, the value of `nflow.workflow.instance.query.max.results.default` configuration property is used instead.- Parameters:
maxResults- The maximum number of instances to be returned.- Returns:
- this.
-
setMaxActions
Set the maximum number of actions returned for each instance. The maximum value is limited by `nflow.workflow.instance.query.max.actions` configuration property. If the value is not set, the value of `nflow.workflow.instance.query.max.actions.default` configuration property is used instead.- Parameters:
maxActions- The maximum number of actions to be returned.- Returns:
- this.
-
setQueryArchive
If true, query also the archive tables if not enough results are found from the main tables.- Parameters:
queryArchive- True if archive tables should also be queried.- Returns:
- this.
-
build
Create the workflow instance query object.- Returns:
- Workflow instance query.
-