Class DefaultContextAssociationManager
- java.lang.Object
- 
- org.camunda.bpm.engine.cdi.impl.context.DefaultContextAssociationManager
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- ContextAssociationManager
 
 public class DefaultContextAssociationManager extends java.lang.Object implements ContextAssociationManager, java.io.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:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected static java.util.logging.Loggerlog
 - 
Constructor SummaryConstructors Constructor Description DefaultContextAssociationManager()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddisAssociate()Disassociates the current process instance with a context / scopeprotected voidensureCommandContextNotActive()voidflushVariableCache()allows to flush the cached variables.protected java.util.List<java.lang.Class<? extends ScopedAssociation>>getAvailableScopedAssociationClasses()Override to add different / additional contexts.protected java.lang.Class<? extends ScopedAssociation>getBroadestActiveContext()VariableMapgetCachedLocalVariables()VariableMapgetCachedVariables()ExecutiongetExecution()get the current executionprotected ExecutionEntitygetExecutionFromContext()java.lang.StringgetExecutionId()protected ScopedAssociationgetScopedAssociation()TaskgetTask()get the current taskTypedValuegetVariable(java.lang.String variableName)get a process variableTypedValuegetVariableLocal(java.lang.String variableName)get a local process variablevoidsetExecution(Execution execution)associate with the provided executionvoidsetTask(Task task)set a current taskvoidsetVariable(java.lang.String variableName, java.lang.Object value)set a process variablevoidsetVariableLocal(java.lang.String variableName, java.lang.Object value)set a local process variable
 
- 
- 
- 
Method Detail- 
getBroadestActiveContextprotected java.lang.Class<? extends ScopedAssociation> getBroadestActiveContext() 
 - 
getAvailableScopedAssociationClassesprotected java.util.List<java.lang.Class<? extends ScopedAssociation>> getAvailableScopedAssociationClasses() Override to add different / additional contexts.
 - 
getScopedAssociationprotected ScopedAssociation getScopedAssociation() 
 - 
setExecutionpublic void setExecution(Execution execution) Description copied from interface:ContextAssociationManagerassociate with the provided execution- Specified by:
- setExecutionin interface- ContextAssociationManager
 
 - 
disAssociatepublic void disAssociate() Description copied from interface:ContextAssociationManagerDisassociates the current process instance with a context / scope- Specified by:
- disAssociatein interface- ContextAssociationManager
 
 - 
getExecutionIdpublic java.lang.String getExecutionId() - Specified by:
- getExecutionIdin interface- ContextAssociationManager
- Returns:
- the id of the execution currently associated or null
 
 - 
getExecutionpublic Execution getExecution() Description copied from interface:ContextAssociationManagerget the current execution- Specified by:
- getExecutionin interface- ContextAssociationManager
 
 - 
getVariablepublic TypedValue getVariable(java.lang.String variableName) Description copied from interface:ContextAssociationManagerget a process variable- Specified by:
- getVariablein interface- ContextAssociationManager
 
 - 
setVariablepublic void setVariable(java.lang.String variableName, java.lang.Object value)Description copied from interface:ContextAssociationManagerset a process variable- Specified by:
- setVariablein interface- ContextAssociationManager
 
 - 
getVariableLocalpublic TypedValue getVariableLocal(java.lang.String variableName) Description copied from interface:ContextAssociationManagerget a local process variable- Specified by:
- getVariableLocalin interface- ContextAssociationManager
 
 - 
setVariableLocalpublic void setVariableLocal(java.lang.String variableName, java.lang.Object value)Description copied from interface:ContextAssociationManagerset a local process variable- Specified by:
- setVariableLocalin interface- ContextAssociationManager
 
 - 
getExecutionFromContextprotected ExecutionEntity getExecutionFromContext() 
 - 
getTaskpublic Task getTask() Description copied from interface:ContextAssociationManagerget the current task- Specified by:
- getTaskin interface- ContextAssociationManager
 
 - 
setTaskpublic void setTask(Task task) Description copied from interface:ContextAssociationManagerset a current task- Specified by:
- setTaskin interface- ContextAssociationManager
 
 - 
getCachedVariablespublic VariableMap getCachedVariables() - Specified by:
- getCachedVariablesin interface- ContextAssociationManager
- Returns:
- a VariableMapof process variables cached between flushes
 
 - 
getCachedLocalVariablespublic VariableMap getCachedLocalVariables() - Specified by:
- getCachedLocalVariablesin interface- ContextAssociationManager
- Returns:
- a VariableMapof local process variables cached between flushes
 
 - 
flushVariableCachepublic void flushVariableCache() Description copied from interface:ContextAssociationManagerallows to flush the cached variables.- Specified by:
- flushVariableCachein interface- ContextAssociationManager
 
 - 
ensureCommandContextNotActiveprotected void ensureCommandContextNotActive() 
 
- 
 
-