Package org.camunda.bpm.engine.impl
Class ConditionEvaluationBuilderImpl
- java.lang.Object
-
- org.camunda.bpm.engine.impl.ConditionEvaluationBuilderImpl
-
- All Implemented Interfaces:
ConditionEvaluationBuilder
public class ConditionEvaluationBuilderImpl extends java.lang.Object implements ConditionEvaluationBuilder
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
businessKey
protected CommandExecutor
commandExecutor
protected boolean
isTenantIdSet
protected java.lang.String
processDefinitionId
protected java.lang.String
tenantId
protected VariableMap
variables
-
Constructor Summary
Constructors Constructor Description ConditionEvaluationBuilderImpl(CommandExecutor commandExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<ProcessInstance>
evaluateStartConditions()
protected <T> T
execute(Command<T> command)
java.lang.String
getBusinessKey()
CommandExecutor
getCommandExecutor()
java.lang.String
getProcessDefinitionId()
java.lang.String
getTenantId()
VariableMap
getVariables()
boolean
isTenantIdSet()
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.
-
-
-
Field Detail
-
commandExecutor
protected CommandExecutor commandExecutor
-
businessKey
protected java.lang.String businessKey
-
processDefinitionId
protected java.lang.String processDefinitionId
-
variables
protected VariableMap variables
-
tenantId
protected java.lang.String tenantId
-
isTenantIdSet
protected boolean isTenantIdSet
-
-
Constructor Detail
-
ConditionEvaluationBuilderImpl
public ConditionEvaluationBuilderImpl(CommandExecutor commandExecutor)
-
-
Method Detail
-
getCommandExecutor
public CommandExecutor getCommandExecutor()
-
getBusinessKey
public java.lang.String getBusinessKey()
-
getProcessDefinitionId
public java.lang.String getProcessDefinitionId()
-
getVariables
public VariableMap getVariables()
-
getTenantId
public java.lang.String getTenantId()
-
isTenantIdSet
public boolean isTenantIdSet()
-
execute
protected <T> T execute(Command<T> command)
-
processInstanceBusinessKey
public ConditionEvaluationBuilder processInstanceBusinessKey(java.lang.String businessKey)
Description copied from interface:ConditionEvaluationBuilder
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
ConditionEvaluationBuilder.evaluateStartConditions()
.- Specified by:
processInstanceBusinessKey
in interfaceConditionEvaluationBuilder
- Parameters:
businessKey
- the businessKey to correlate on.- Returns:
- the builder
-
processDefinitionId
public ConditionEvaluationBuilder processDefinitionId(java.lang.String processDefinitionId)
Description copied from interface:ConditionEvaluationBuilder
Correlate the condition such that a process definition with the given id is selected. Is only supported for
ConditionEvaluationBuilder.evaluateStartConditions()
.- Specified by:
processDefinitionId
in interfaceConditionEvaluationBuilder
- Parameters:
processDefinitionId
- the id of the process definition to correlate on.- Returns:
- the builder
-
setVariable
public ConditionEvaluationBuilder setVariable(java.lang.String variableName, java.lang.Object variableValue)
Description copied from interface:ConditionEvaluationBuilder
Pass a variable to the condition.
Invoking this method multiple times allows passing multiple variables.
- Specified by:
setVariable
in interfaceConditionEvaluationBuilder
- Parameters:
variableName
- the name of the variable to setvariableValue
- the value of the variable to set- Returns:
- the builder
-
setVariables
public ConditionEvaluationBuilder setVariables(java.util.Map<java.lang.String,java.lang.Object> variables)
Description copied from interface:ConditionEvaluationBuilder
Pass a variables to the condition.
- Specified by:
setVariables
in interfaceConditionEvaluationBuilder
- Parameters:
variables
- the map of variables- Returns:
- the builder
-
tenantId
public ConditionEvaluationBuilder tenantId(java.lang.String tenantId)
Description copied from interface:ConditionEvaluationBuilder
Specify a tenant to correlate a condition to. The condition can only be correlated on process definitions which belongs to the given tenant.- Specified by:
tenantId
in interfaceConditionEvaluationBuilder
- Parameters:
tenantId
- the id of the tenant- Returns:
- the builder
-
withoutTenantId
public ConditionEvaluationBuilder withoutTenantId()
Description copied from interface:ConditionEvaluationBuilder
Specify that the condition can only be correlated on process definitions which belongs to no tenant.- Specified by:
withoutTenantId
in interfaceConditionEvaluationBuilder
- Returns:
- the builder
-
evaluateStartConditions
public java.util.List<ProcessInstance> evaluateStartConditions()
- Specified by:
evaluateStartConditions
in interfaceConditionEvaluationBuilder
- Returns:
- the list of the newly created process instances
-
-