Class DefaultContextAssociationManager
java.lang.Object
org.camunda.bpm.engine.cdi.impl.context.DefaultContextAssociationManager
- All Implemented Interfaces:
Serializable
,ContextAssociationManager
public class DefaultContextAssociationManager
extends Object
implements ContextAssociationManager, Serializable
Default implementation of the business process association manager. Uses a
fallback-strategy to associate the process instance with the "broadest"
active scope, starting with the conversation.
Subclass in order to implement custom association schemes and association
with custom scopes.
- Author:
- Daniel Meyer
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Disassociates the current process instance with a context / scopeprotected void
void
allows to flush the cached variables.protected List<Class<? extends ScopedAssociation>>
Override to add different / additional contexts.protected Class<? extends ScopedAssociation>
get the current executionprotected ExecutionEntity
protected ScopedAssociation
getTask()
get the current taskgetVariable
(String variableName) get a process variablegetVariableLocal
(String variableName) get a local process variablevoid
setExecution
(Execution execution) associate with the provided executionvoid
set a current taskvoid
setVariable
(String variableName, Object value) set a process variablevoid
setVariableLocal
(String variableName, Object value) set a local process variable
-
Field Details
-
log
-
-
Constructor Details
-
DefaultContextAssociationManager
public DefaultContextAssociationManager()
-
-
Method Details
-
getBroadestActiveContext
-
getAvailableScopedAssociationClasses
Override to add different / additional contexts.- Returns:
- a list of
Scope
-types, which are used in the given order to resolve the broadest active context (@link #getBroadestActiveContext()})
-
getScopedAssociation
-
setExecution
Description copied from interface:ContextAssociationManager
associate with the provided execution- Specified by:
setExecution
in interfaceContextAssociationManager
-
disAssociate
public void disAssociate()Description copied from interface:ContextAssociationManager
Disassociates the current process instance with a context / scope- Specified by:
disAssociate
in interfaceContextAssociationManager
-
getExecutionId
- Specified by:
getExecutionId
in interfaceContextAssociationManager
- Returns:
- the id of the execution currently associated or null
-
getExecution
Description copied from interface:ContextAssociationManager
get the current execution- Specified by:
getExecution
in interfaceContextAssociationManager
-
getVariable
Description copied from interface:ContextAssociationManager
get a process variable- Specified by:
getVariable
in interfaceContextAssociationManager
-
setVariable
Description copied from interface:ContextAssociationManager
set a process variable- Specified by:
setVariable
in interfaceContextAssociationManager
-
getVariableLocal
Description copied from interface:ContextAssociationManager
get a local process variable- Specified by:
getVariableLocal
in interfaceContextAssociationManager
-
setVariableLocal
Description copied from interface:ContextAssociationManager
set a local process variable- Specified by:
setVariableLocal
in interfaceContextAssociationManager
-
getExecutionFromContext
-
getTask
Description copied from interface:ContextAssociationManager
get the current task- Specified by:
getTask
in interfaceContextAssociationManager
-
setTask
Description copied from interface:ContextAssociationManager
set a current task- Specified by:
setTask
in interfaceContextAssociationManager
-
getCachedVariables
- Specified by:
getCachedVariables
in interfaceContextAssociationManager
- Returns:
- a
VariableMap
of process variables cached between flushes
-
getCachedLocalVariables
- Specified by:
getCachedLocalVariables
in interfaceContextAssociationManager
- Returns:
- a
VariableMap
of local process variables cached between flushes
-
flushVariableCache
public void flushVariableCache()Description copied from interface:ContextAssociationManager
allows to flush the cached variables.- Specified by:
flushVariableCache
in interfaceContextAssociationManager
-
ensureCommandContextNotActive
protected void ensureCommandContextNotActive()
-