public class CaseInstanceBuilderImpl extends Object implements CaseInstanceBuilder
| Modifier and Type | Field and Description |
|---|---|
protected String |
businessKey |
protected String |
caseDefinitionId |
protected String |
caseDefinitionKey |
protected String |
caseDefinitionTenantId |
protected CommandContext |
commandContext |
protected CommandExecutor |
commandExecutor |
protected boolean |
isTenantIdSet |
protected org.camunda.bpm.engine.variable.VariableMap |
variables |
| Constructor and Description |
|---|
CaseInstanceBuilderImpl(CommandContext commandContext,
String caseDefinitionKey,
String caseDefinitionId) |
CaseInstanceBuilderImpl(CommandExecutor commandExecutor,
String caseDefinitionKey,
String caseDefinitionId) |
| Modifier and Type | Method and Description |
|---|---|
CaseInstanceBuilder |
businessKey(String businessKey)
A business key can be provided to associate the case instance with a
certain identifier that has a clear business meaning.
|
CaseInstanceBuilder |
caseDefinitionTenantId(String tenantId)
Specify the id of the tenant the case definition belongs to.
|
CaseInstanceBuilder |
caseDefinitionWithoutTenantId()
Specify that the case definition belongs to no tenant.
|
CaseInstance |
create()
Creates a new
CaseInstance, which will be in the ACTIVE state. |
String |
getBusinessKey() |
String |
getCaseDefinitionId() |
String |
getCaseDefinitionKey() |
String |
getCaseDefinitionTenantId() |
org.camunda.bpm.engine.variable.VariableMap |
getVariables() |
boolean |
isTenantIdSet() |
CaseInstanceBuilder |
setVariable(String variableName,
Object variableValue)
Pass a variable to the case instance.
|
CaseInstanceBuilder |
setVariables(Map<String,Object> variables)
Pass a map of variables to the case instance.
|
protected CommandExecutor commandExecutor
protected CommandContext commandContext
protected String caseDefinitionKey
protected String caseDefinitionId
protected String businessKey
protected org.camunda.bpm.engine.variable.VariableMap variables
protected String caseDefinitionTenantId
protected boolean isTenantIdSet
public CaseInstanceBuilderImpl(CommandExecutor commandExecutor, String caseDefinitionKey, String caseDefinitionId)
public CaseInstanceBuilderImpl(CommandContext commandContext, String caseDefinitionKey, String caseDefinitionId)
public CaseInstanceBuilder businessKey(String businessKey)
CaseInstanceBuilderA business key can be provided to associate the case instance with a
certain identifier that has a clear business meaning. This business key can
then be used to easily look up that case instance, see
CaseInstanceQuery.caseInstanceBusinessKey(String). Providing such a
business key is definitely a best practice.
Note that a business key MUST be unique for the given case definition WHEN you have added a database constraint for it. In this case, only case instance from different case definition are allowed to have the same business key and the combination of caseDefinitionKey-businessKey must be unique.
businessKey in interface CaseInstanceBuilderbusinessKey - a key that uniquely identifies the case instance in the context
of the given case definition.public CaseInstanceBuilder caseDefinitionTenantId(String tenantId)
CaseInstanceBuilderkey and not by id.caseDefinitionTenantId in interface CaseInstanceBuilderpublic CaseInstanceBuilder caseDefinitionWithoutTenantId()
CaseInstanceBuilderkey and not by id.caseDefinitionWithoutTenantId in interface CaseInstanceBuilderpublic CaseInstanceBuilder setVariable(String variableName, Object variableValue)
CaseInstanceBuilderPass a variable to the case instance.
Invoking this method multiple times allows passing multiple variables.
setVariable in interface CaseInstanceBuildervariableName - the name of the variable to setvariableValue - the value of the variable to setpublic CaseInstanceBuilder setVariables(Map<String,Object> variables)
CaseInstanceBuilderPass a map of variables to the case instance.
Invoking this method multiple times allows passing multiple variables.
setVariables in interface CaseInstanceBuildervariables - the map of variablespublic CaseInstance create()
CaseInstanceBuilderCreates a new CaseInstance, which will be in the ACTIVE state.
create in interface CaseInstanceBuilderpublic String getCaseDefinitionKey()
public String getCaseDefinitionId()
public String getBusinessKey()
public org.camunda.bpm.engine.variable.VariableMap getVariables()
public String getCaseDefinitionTenantId()
public boolean isTenantIdSet()
Copyright © 2018. All rights reserved.