org.camunda.bpm.engine.impl.cmmn
Class CaseInstanceBuilderImpl

java.lang.Object
  extended by org.camunda.bpm.engine.impl.cmmn.CaseInstanceBuilderImpl
All Implemented Interfaces:
CaseInstanceBuilder

public class CaseInstanceBuilderImpl
extends Object
implements CaseInstanceBuilder

Author:
Roman Smirnov

Field Summary
protected  String businessKey
           
protected  String caseDefinitionId
           
protected  String caseDefinitionKey
           
protected  CommandContext commandContext
           
protected  CommandExecutor commandExecutor
           
protected  org.camunda.bpm.engine.variable.VariableMap variables
           
 
Constructor Summary
CaseInstanceBuilderImpl(CommandContext commandContext, String caseDefinitionKey, String caseDefinitionId)
           
CaseInstanceBuilderImpl(CommandExecutor commandExecutor, String caseDefinitionKey, String caseDefinitionId)
           
 
Method Summary
 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.
 CaseInstance create()
          Creates a new CaseInstance, which will be in the ACTIVE state.
 String getBusinessKey()
           
 String getCaseDefinitionId()
           
 String getCaseDefinitionKey()
           
 org.camunda.bpm.engine.variable.VariableMap getVariables()
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commandExecutor

protected CommandExecutor commandExecutor

commandContext

protected CommandContext commandContext

caseDefinitionKey

protected String caseDefinitionKey

caseDefinitionId

protected String caseDefinitionId

businessKey

protected String businessKey

variables

protected org.camunda.bpm.engine.variable.VariableMap variables
Constructor Detail

CaseInstanceBuilderImpl

public CaseInstanceBuilderImpl(CommandExecutor commandExecutor,
                               String caseDefinitionKey,
                               String caseDefinitionId)

CaseInstanceBuilderImpl

public CaseInstanceBuilderImpl(CommandContext commandContext,
                               String caseDefinitionKey,
                               String caseDefinitionId)
Method Detail

businessKey

public CaseInstanceBuilder businessKey(String businessKey)
Description copied from interface: CaseInstanceBuilder

A 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.

Specified by:
businessKey in interface CaseInstanceBuilder
Parameters:
businessKey - a key that uniquely identifies the case instance in the context of the given case definition.
Returns:
the builder

setVariable

public CaseInstanceBuilder setVariable(String variableName,
                                       Object variableValue)
Description copied from interface: CaseInstanceBuilder

Pass a variable to the case instance.

Invoking this method multiple times allows passing multiple variables.

Specified by:
setVariable in interface CaseInstanceBuilder
Parameters:
variableName - the name of the variable to set
variableValue - the value of the variable to set
Returns:
the builder

setVariables

public CaseInstanceBuilder setVariables(Map<String,Object> variables)
Description copied from interface: CaseInstanceBuilder

Pass a map of variables to the case instance.

Invoking this method multiple times allows passing multiple variables.

Specified by:
setVariables in interface CaseInstanceBuilder
Parameters:
variables - the map of variables
Returns:
the builder

create

public CaseInstance create()
Description copied from interface: CaseInstanceBuilder

Creates a new CaseInstance, which will be in the ACTIVE state.

Specified by:
create in interface CaseInstanceBuilder

getCaseDefinitionKey

public String getCaseDefinitionKey()

getCaseDefinitionId

public String getCaseDefinitionId()

getBusinessKey

public String getBusinessKey()

getVariables

public org.camunda.bpm.engine.variable.VariableMap getVariables()


Copyright © 2016 camunda services GmbH. All rights reserved.