Package org.camunda.bpm.engine.runtime
Interface ConditionEvaluationBuilder
-
- All Known Implementing Classes:
ConditionEvaluationBuilderImpl
public interface ConditionEvaluationBuilder
A fluent builder for defining conditional start event correlation
- Author:
- Yana Vasileva
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<ProcessInstance>
evaluateStartConditions()
ConditionEvaluationBuilder
processDefinitionId(java.lang.String processDefinitionId)
Correlate the condition such that a process definition with the given id is selected.ConditionEvaluationBuilder
processInstanceBusinessKey(java.lang.String businessKey)
Correlate the condition such that the process instance has a business key with the given name.ConditionEvaluationBuilder
setVariable(java.lang.String variableName, java.lang.Object variableValue)
Pass a variable to the condition.ConditionEvaluationBuilder
setVariables(java.util.Map<java.lang.String,java.lang.Object> variables)
Pass a variables to the condition.ConditionEvaluationBuilder
tenantId(java.lang.String tenantId)
Specify a tenant to correlate a condition to.ConditionEvaluationBuilder
withoutTenantId()
Specify that the condition can only be correlated on process definitions which belongs to no tenant.
-
-
-
Method Detail
-
processInstanceBusinessKey
ConditionEvaluationBuilder processInstanceBusinessKey(java.lang.String businessKey)
Correlate the condition such that the process instance has a business key with the given name. If the condition is correlated to a conditional start event then the given business key is set on the created process instance. Is only supported for
evaluateStartConditions()
.- Parameters:
businessKey
- the businessKey to correlate on.- Returns:
- the builder
-
processDefinitionId
ConditionEvaluationBuilder processDefinitionId(java.lang.String processDefinitionId)
Correlate the condition such that a process definition with the given id is selected. Is only supported for
evaluateStartConditions()
.- Parameters:
processDefinitionId
- the id of the process definition to correlate on.- Returns:
- the builder
-
setVariable
ConditionEvaluationBuilder setVariable(java.lang.String variableName, java.lang.Object variableValue)
Pass a variable to the condition.
Invoking this method multiple times allows passing multiple variables.
- Parameters:
variableName
- the name of the variable to setvariableValue
- the value of the variable to set- Returns:
- the builder
-
setVariables
ConditionEvaluationBuilder setVariables(java.util.Map<java.lang.String,java.lang.Object> variables)
Pass a variables to the condition.
- Parameters:
variables
- the map of variables- Returns:
- the builder
-
tenantId
ConditionEvaluationBuilder tenantId(java.lang.String tenantId)
Specify a tenant to correlate a condition to. The condition can only be correlated on process definitions which belongs to the given tenant.- Parameters:
tenantId
- the id of the tenant- Returns:
- the builder
-
withoutTenantId
ConditionEvaluationBuilder withoutTenantId()
Specify that the condition can only be correlated on process definitions which belongs to no tenant.- Returns:
- the builder
-
evaluateStartConditions
java.util.List<ProcessInstance> evaluateStartConditions()
- Returns:
- the list of the newly created process instances
-
-