public class ProcessDataContext extends Object
pushSection(ExecutionEntity)
. The section keeps track of all pushed
properties. Those can easily be cleared by popping the section with
popSection()
afterwards, e.g. after the successful execution.process engine configuration
. The following configuration options are
available:
Modifier and Type | Field and Description |
---|---|
protected Map<String,String> |
basicToMdcPropertyNames |
protected boolean |
handleMdc |
protected String |
mdcPropertyActivityId |
protected String |
mdcPropertyApplicationName |
protected String |
mdcPropertyBusinessKey |
protected String |
mdcPropertyDefinitionId |
protected String |
mdcPropertyInstanceId |
protected List<String> |
mdcPropertyNames |
protected String |
mdcPropertyTenantId |
protected static String |
NULL_VALUE |
static String |
PROPERTY_ACTIVITY_ID |
protected Map<String,Deque<String>> |
propertyValues |
protected Deque<List<String>> |
sections |
protected boolean |
startNewSection |
Constructor and Description |
---|
ProcessDataContext(ProcessEngineConfigurationImpl configuration) |
Modifier and Type | Method and Description |
---|---|
protected void |
addToCurrentSection(String property) |
protected void |
addToStack(String value,
String property) |
protected void |
addToStack(String value,
String property,
boolean updateMdc) |
void |
clearMdc()
Remove all logging context properties from the MDC
|
void |
fetchCurrentContext()
Preserve the current MDC values and store them in the context
|
protected Deque<String> |
getDeque(String property) |
String |
getLatestPropertyValue(String property) |
protected String |
getMdcProperty(String property) |
protected static boolean |
isNotBlank(String property) |
protected static boolean |
isNull(String value) |
void |
popSection()
Pop the latest section, remove all pushed properties of that section and -
if logging context properties are defined - update the MDC accordingly.
|
boolean |
pushSection(ExecutionEntity execution)
Start a new section that keeps track of the pushed properties.
|
protected void |
removeFromStack(String property) |
void |
updateMdc()
Update the MDC with the current values of this logging context
|
protected void |
updateMdc(String property) |
protected static boolean |
valuesEqual(String val1,
String val2) |
public static final String PROPERTY_ACTIVITY_ID
protected static final String NULL_VALUE
protected String mdcPropertyActivityId
protected String mdcPropertyApplicationName
protected String mdcPropertyBusinessKey
protected String mdcPropertyDefinitionId
protected String mdcPropertyInstanceId
protected String mdcPropertyTenantId
protected boolean handleMdc
protected boolean startNewSection
public ProcessDataContext(ProcessEngineConfigurationImpl configuration)
public boolean pushSection(ExecutionEntity execution)
updateMdc(String)
with the previous
logging context.execution
- the execution to retrieve the context data fromtrue
if the section contains any updates and therefore
should be popped later by popSection()
public void popSection()
public void clearMdc()
public void updateMdc()
public void fetchCurrentContext()
public String getLatestPropertyValue(String property)
property
- the property to retrieve the latest value fornull
otherwiseprotected void removeFromStack(String property)
protected void addToCurrentSection(String property)
protected void updateMdc(String property)
protected static boolean isNotBlank(String property)
protected static boolean isNull(String value)
Copyright © 2021. All rights reserved.