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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDisassociates the current process instance with a context / scopeprotected voidvoidallows to flush the cached variables.protected List<Class<? extends ScopedAssociation>>Override to add different / additional contexts.protected Class<? extends ScopedAssociation>get the current executionprotected ExecutionEntityprotected ScopedAssociationgetTask()get the current taskgetVariable(String variableName) get a process variablegetVariableLocal(String variableName) get a local process variablevoidsetExecution(Execution execution) associate with the provided executionvoidset a current taskvoidsetVariable(String variableName, Object value) set a process variablevoidsetVariableLocal(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. -
getScopedAssociation
-
setExecution
Description copied from interface:ContextAssociationManagerassociate with the provided execution- Specified by:
setExecutionin interfaceContextAssociationManager
-
disAssociate
public void disAssociate()Description copied from interface:ContextAssociationManagerDisassociates the current process instance with a context / scope- Specified by:
disAssociatein interfaceContextAssociationManager
-
getExecutionId
- Specified by:
getExecutionIdin interfaceContextAssociationManager- Returns:
- the id of the execution currently associated or null
-
getExecution
Description copied from interface:ContextAssociationManagerget the current execution- Specified by:
getExecutionin interfaceContextAssociationManager
-
getVariable
Description copied from interface:ContextAssociationManagerget a process variable- Specified by:
getVariablein interfaceContextAssociationManager
-
setVariable
Description copied from interface:ContextAssociationManagerset a process variable- Specified by:
setVariablein interfaceContextAssociationManager
-
getVariableLocal
Description copied from interface:ContextAssociationManagerget a local process variable- Specified by:
getVariableLocalin interfaceContextAssociationManager
-
setVariableLocal
Description copied from interface:ContextAssociationManagerset a local process variable- Specified by:
setVariableLocalin interfaceContextAssociationManager
-
getExecutionFromContext
-
getTask
Description copied from interface:ContextAssociationManagerget the current task- Specified by:
getTaskin interfaceContextAssociationManager
-
setTask
Description copied from interface:ContextAssociationManagerset a current task- Specified by:
setTaskin interfaceContextAssociationManager
-
getCachedVariables
- Specified by:
getCachedVariablesin interfaceContextAssociationManager- Returns:
- a
VariableMapof process variables cached between flushes
-
getCachedLocalVariables
- Specified by:
getCachedLocalVariablesin interfaceContextAssociationManager- Returns:
- a
VariableMapof local process variables cached between flushes
-
flushVariableCache
public void flushVariableCache()Description copied from interface:ContextAssociationManagerallows to flush the cached variables.- Specified by:
flushVariableCachein interfaceContextAssociationManager
-
ensureCommandContextNotActive
protected void ensureCommandContextNotActive()
-