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 | Class and Description |
---|---|
protected static class |
ProcessDataContext.ProcessDataSections |
protected static class |
ProcessDataContext.ProcessDataStack |
Modifier and Type | Field and Description |
---|---|
protected ProcessDataContext.ProcessDataStack |
activityIdStack |
protected boolean |
handleMdc |
protected Map<String,ProcessDataContext.ProcessDataStack> |
mdcDataStacks
All data stacks we need to keep for MDC logging
|
protected String |
mdcPropertyActivityId |
protected String |
mdcPropertyApplicationName |
protected String |
mdcPropertyBusinessKey |
protected String |
mdcPropertyDefinitionId |
protected String |
mdcPropertyInstanceId |
protected String |
mdcPropertyTenantId |
protected static String |
NULL_VALUE |
protected ProcessDataContext.ProcessDataSections |
sections |
Constructor and Description |
---|
ProcessDataContext(ProcessEngineConfigurationImpl configuration) |
ProcessDataContext(ProcessEngineConfigurationImpl configuration,
boolean initFromCurrentMdc) |
Modifier and Type | Method and Description |
---|---|
protected void |
addToStack(ProcessDataContext.ProcessDataStack stack,
String value) |
protected void |
addToStack(String value,
String property) |
void |
clearMdc()
Remove all logging context properties from the MDC
|
String |
getLatestActivityId() |
protected boolean |
hasNoMdcValues() |
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.
|
void |
updateMdcFromCurrentValues()
Update the MDC with the current values of this logging context
|
protected static boolean |
valuesEqual(String val1,
String val2) |
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 ProcessDataContext.ProcessDataStack activityIdStack
protected Map<String,ProcessDataContext.ProcessDataStack> mdcDataStacks
protected ProcessDataContext.ProcessDataSections sections
public ProcessDataContext(ProcessEngineConfigurationImpl configuration)
public ProcessDataContext(ProcessEngineConfigurationImpl configuration, boolean initFromCurrentMdc)
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()
protected boolean hasNoMdcValues()
public void popSection()
public void clearMdc()
public void updateMdcFromCurrentValues()
public String getLatestActivityId()
null
otherwiseprotected void addToStack(ProcessDataContext.ProcessDataStack stack, String value)
protected static boolean isNotBlank(String property)
protected static boolean isNull(String value)
Copyright © 2022. All rights reserved.