Class VariableUtil
- java.lang.Object
-
- com.flowable.platform.service.util.VariableUtil
-
public class VariableUtil extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
VariableUtil.TempContentItemInfoHolder
-
Field Summary
Fields Modifier and Type Field Description static List<String>
EXCLUDE_TYPES
static List<String>
PRIMITIVE_VARIABLE_TYPES
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addCaseInstanceVariables(CaseInstance caseInstance, Map<String,Object> variableMap, RuntimeService runtimeService, CmmnRuntimeService cmmnRuntimeService, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
protected static void
addCaseVariableValues(CaseInstance caseInstance, boolean useRootLevelOnly, Map<String,Object> variableMap, CmmnRuntimeService cmmnRuntimeService, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
static void
addHistoricCaseInstanceVariables(HistoricCaseInstance caseInstance, Map<String,Object> variableMap, HistoryService historyService, CmmnHistoryService cmmnHistoryService, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
protected static void
addHistoricCaseVariableValues(HistoricCaseInstance caseInstance, boolean useRootLevelOnly, Map<String,Object> variableMap, CmmnHistoryService cmmnHistoryService, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
static void
addHistoricProcessInstanceVariables(HistoricProcessInstance processInstance, Map<String,Object> variableMap, HistoryService historyService, CmmnHistoryService cmmnHistoryService, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
protected static void
addHistoricProcessVariableValues(HistoricProcessInstance processInstance, boolean useRootLevelOnly, Map<String,Object> variableMap, HistoryService historyService, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
protected static void
addParentVariableValues(String id, String name, String businessKey, String businessStatus, Date startTime, String startUserId, Date endTime, Map<String,Object> variableMap, Map<String,Object> parentVariableMap)
protected static void
addParentVariableValues(EntityLink parentEntityLink, Map<String,Object> variableMap, RuntimeService runtimeService, CmmnRuntimeService cmmnRuntimeService, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
protected static void
addParentVariableValues(HistoricEntityLink parentEntityLink, Map<String,Object> variableMap, HistoryService historyService, CmmnHistoryService cmmnHistoryService, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
static void
addProcessInstanceVariables(ProcessInstance processInstance, Map<String,Object> variableMap, RuntimeService runtimeService, CmmnRuntimeService cmmnRuntimeService, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
protected static void
addProcessVariableValues(ProcessInstance processInstance, boolean useRootLevelOnly, Map<String,Object> variableMap, RuntimeService runtimeService, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
protected static void
addScopeVariablesValues(String id, String name, String businessKey, String businessStatus, Date startTime, String startUserId, Date endTime, boolean useScopeLevelOnly, Map<String,Object> variableMap, Map<String,Object> scopeVariables)
static void
addTaskVariables(HistoricTaskInstance task, Map<String,Object> variableMap, HistoryService historyService, PlatformRestVariableTransformer variableTransformer, CoreContentService contentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
static void
addTaskVariables(Task task, Map<String,Object> variableMap, TaskService taskService, PlatformRestVariableTransformer variableTransformer, CoreContentService contentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
protected static void
addToMapIfNotEmpty(String value, String name, Map<String,Object> variableMap)
protected static boolean
containsScopedVariable(String scopedName, List<String> valuesList)
protected static void
copyCmmnExtensionElementValuesToList(List<ExtensionElement> extensionElements, List<String> values)
protected static void
copyExtensionElementValuesToList(List<ExtensionElement> extensionElements, List<String> values)
static void
createFlowableDatabasePayloadObject(Map<String,Object> variableMap, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
protected static ObjectInputStream
createObjectInputStream(InputStream is)
protected static String
createRegexMatchExpression(String inputValue)
protected static VariableUtil.TempContentItemInfoHolder
createTempContentItem(ValueFields valueFields, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
protected static void
deepCopyJsonVariables(Map<String,Object> variableMap)
static Object
deserialize(byte[] bytes, ValueFields valueFields)
protected static void
fillPrefixValues(List<String> prefixList, Map<String,Object> inputMap)
protected static void
fillScopedVariableInMap(String scopedValue, Map<String,Object> scopedVariablesMap)
protected static void
fillScopedVariablesInMap(List<String> scopedValues, Map<String,Object> scopedVariablesMap)
protected static void
filterAllowedScopedVariables(Object variableObject, Map<String,Object> allowedInputMap, String fullVariableName, boolean variableNameMatched)
protected static void
filterBlockedScopedVariables(Object variableObject, Map<String,Object> blockedInputMap, String fullVariableName, boolean variableNameMatched)
static void
filterCasePageFormVariablesWithInputMapping(Map<String,Object> variableMap, String caseDefinitionId, String planItemDefinitionId, CmmnRuntimeService cmmnRuntimeService, CmmnRepositoryService cmmnRepositoryService)
static void
filterCaseWorkFormVariablesWithInputMapping(Map<String,Object> variableMap, String caseInstanceId, CmmnRuntimeService cmmnRuntimeService, CmmnRepositoryService cmmnRepositoryService)
static void
filterProcessWorkFormVariablesWithInputMapping(Map<String,Object> variableMap, String processInstanceId, RuntimeService runtimeService, RepositoryService repositoryService)
static void
filterTaskFormVariablesWithInputMapping(Map<String,Object> variableMap, Task task, RuntimeService runtimeService, RepositoryService repositoryService, CmmnRuntimeService cmmnRuntimeService, CmmnRepositoryService cmmnRepositoryService)
static Map<String,Object>
filterVariableMap(List<HistoricVariableInstance> variableInstances, PlatformRestVariableTransformer variableTransformer, CoreContentService contentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
static Map<String,Object>
filterVariableMap(Map<String,VariableInstance> variableInstances, CmmnRuntimeService cmmnRuntimeService, PlatformRestVariableTransformer variableTransformer, CoreContentService contentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
static Map<String,Object>
filterVariableMap(Map<String,VariableInstance> variableInstances, RuntimeService runtimeService, PlatformRestVariableTransformer variableTransformer, CoreContentService contentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
static Map<String,Object>
filterVariableMap(Map<String,VariableInstance> variableInstances, RuntimeService runtimeService, CmmnRuntimeService cmmnRuntimeService, TaskService taskService, PlatformRestVariableTransformer variableTransformer, CoreContentService contentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
static Map<String,Object>
filterVariableMap(Map<String,VariableInstance> variableInstances, TaskService taskService, PlatformRestVariableTransformer variableTransformer, CoreContentService contentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
protected static void
filterVariablesWithInputMapping(Map<String,Object> variableMap, Map<String,Object> allowedInputMap, Map<String,Object> blockedInputMap)
protected static List<String>
getCmmnExtensionElementValues(List<ExtensionElement> extensionElements)
protected static List<String>
getExtensionElementValues(List<ExtensionElement> extensionElements)
protected static Map<String,Object>
getHistoricCaseVariableMap(CmmnHistoryService cmmnHistoryService, String caseInstanceId, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
protected static Map<String,Object>
getHistoricProcessVariableMap(HistoryService historyService, String processInstanceId, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
protected static Map<String,Object>
getRuntimeCaseVariableMap(CmmnRuntimeService cmmnRuntimeService, String caseInstanceId, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
protected static Map<String,Object>
getRuntimeProcessVariableMap(RuntimeService runtimeService, String processInstanceId, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
protected static void
handlePotentialContentItems(Map<String,Object> variables, PlatformContentItemService contentService)
protected static boolean
hasMatchingAllowedScope(Object variableObject, String fullVariableName, String fullAllowedInput)
protected static Object
transformToRestValue(Object value)
-
-
-
Method Detail
-
addProcessInstanceVariables
public static void addProcessInstanceVariables(ProcessInstance processInstance, Map<String,Object> variableMap, RuntimeService runtimeService, CmmnRuntimeService cmmnRuntimeService, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
addCaseInstanceVariables
public static void addCaseInstanceVariables(CaseInstance caseInstance, Map<String,Object> variableMap, RuntimeService runtimeService, CmmnRuntimeService cmmnRuntimeService, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
addHistoricProcessInstanceVariables
public static void addHistoricProcessInstanceVariables(HistoricProcessInstance processInstance, Map<String,Object> variableMap, HistoryService historyService, CmmnHistoryService cmmnHistoryService, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
addHistoricCaseInstanceVariables
public static void addHistoricCaseInstanceVariables(HistoricCaseInstance caseInstance, Map<String,Object> variableMap, HistoryService historyService, CmmnHistoryService cmmnHistoryService, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
addTaskVariables
public static void addTaskVariables(Task task, Map<String,Object> variableMap, TaskService taskService, PlatformRestVariableTransformer variableTransformer, CoreContentService contentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
addTaskVariables
public static void addTaskVariables(HistoricTaskInstance task, Map<String,Object> variableMap, HistoryService historyService, PlatformRestVariableTransformer variableTransformer, CoreContentService contentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
filterProcessWorkFormVariablesWithInputMapping
public static void filterProcessWorkFormVariablesWithInputMapping(Map<String,Object> variableMap, String processInstanceId, RuntimeService runtimeService, RepositoryService repositoryService)
-
filterCaseWorkFormVariablesWithInputMapping
public static void filterCaseWorkFormVariablesWithInputMapping(Map<String,Object> variableMap, String caseInstanceId, CmmnRuntimeService cmmnRuntimeService, CmmnRepositoryService cmmnRepositoryService)
-
filterTaskFormVariablesWithInputMapping
public static void filterTaskFormVariablesWithInputMapping(Map<String,Object> variableMap, Task task, RuntimeService runtimeService, RepositoryService repositoryService, CmmnRuntimeService cmmnRuntimeService, CmmnRepositoryService cmmnRepositoryService)
-
filterCasePageFormVariablesWithInputMapping
public static void filterCasePageFormVariablesWithInputMapping(Map<String,Object> variableMap, String caseDefinitionId, String planItemDefinitionId, CmmnRuntimeService cmmnRuntimeService, CmmnRepositoryService cmmnRepositoryService)
-
filterVariablesWithInputMapping
protected static void filterVariablesWithInputMapping(Map<String,Object> variableMap, Map<String,Object> allowedInputMap, Map<String,Object> blockedInputMap)
-
createFlowableDatabasePayloadObject
public static void createFlowableDatabasePayloadObject(Map<String,Object> variableMap, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
fillPrefixValues
protected static void fillPrefixValues(List<String> prefixList, Map<String,Object> inputMap)
-
addCaseVariableValues
protected static void addCaseVariableValues(CaseInstance caseInstance, boolean useRootLevelOnly, Map<String,Object> variableMap, CmmnRuntimeService cmmnRuntimeService, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
addProcessVariableValues
protected static void addProcessVariableValues(ProcessInstance processInstance, boolean useRootLevelOnly, Map<String,Object> variableMap, RuntimeService runtimeService, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
addHistoricCaseVariableValues
protected static void addHistoricCaseVariableValues(HistoricCaseInstance caseInstance, boolean useRootLevelOnly, Map<String,Object> variableMap, CmmnHistoryService cmmnHistoryService, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
addHistoricProcessVariableValues
protected static void addHistoricProcessVariableValues(HistoricProcessInstance processInstance, boolean useRootLevelOnly, Map<String,Object> variableMap, HistoryService historyService, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
addParentVariableValues
protected static void addParentVariableValues(EntityLink parentEntityLink, Map<String,Object> variableMap, RuntimeService runtimeService, CmmnRuntimeService cmmnRuntimeService, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
addParentVariableValues
protected static void addParentVariableValues(HistoricEntityLink parentEntityLink, Map<String,Object> variableMap, HistoryService historyService, CmmnHistoryService cmmnHistoryService, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
addParentVariableValues
protected static void addParentVariableValues(String id, String name, String businessKey, String businessStatus, Date startTime, String startUserId, Date endTime, Map<String,Object> variableMap, Map<String,Object> parentVariableMap)
-
addScopeVariablesValues
protected static void addScopeVariablesValues(String id, String name, String businessKey, String businessStatus, Date startTime, String startUserId, Date endTime, boolean useScopeLevelOnly, Map<String,Object> variableMap, Map<String,Object> scopeVariables)
-
getRuntimeCaseVariableMap
protected static Map<String,Object> getRuntimeCaseVariableMap(CmmnRuntimeService cmmnRuntimeService, String caseInstanceId, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
getHistoricCaseVariableMap
protected static Map<String,Object> getHistoricCaseVariableMap(CmmnHistoryService cmmnHistoryService, String caseInstanceId, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
getRuntimeProcessVariableMap
protected static Map<String,Object> getRuntimeProcessVariableMap(RuntimeService runtimeService, String processInstanceId, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
getHistoricProcessVariableMap
protected static Map<String,Object> getHistoricProcessVariableMap(HistoryService historyService, String processInstanceId, PlatformContentItemService contentService, PlatformRestVariableTransformer variableTransformer, CoreContentService coreContentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
filterVariableMap
public static Map<String,Object> filterVariableMap(List<HistoricVariableInstance> variableInstances, PlatformRestVariableTransformer variableTransformer, CoreContentService contentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
filterVariableMap
public static Map<String,Object> filterVariableMap(Map<String,VariableInstance> variableInstances, RuntimeService runtimeService, PlatformRestVariableTransformer variableTransformer, CoreContentService contentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
filterVariableMap
public static Map<String,Object> filterVariableMap(Map<String,VariableInstance> variableInstances, CmmnRuntimeService cmmnRuntimeService, PlatformRestVariableTransformer variableTransformer, CoreContentService contentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
filterVariableMap
public static Map<String,Object> filterVariableMap(Map<String,VariableInstance> variableInstances, TaskService taskService, PlatformRestVariableTransformer variableTransformer, CoreContentService contentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
filterVariableMap
public static Map<String,Object> filterVariableMap(Map<String,VariableInstance> variableInstances, RuntimeService runtimeService, CmmnRuntimeService cmmnRuntimeService, TaskService taskService, PlatformRestVariableTransformer variableTransformer, CoreContentService contentService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
handlePotentialContentItems
protected static void handlePotentialContentItems(Map<String,Object> variables, PlatformContentItemService contentService)
-
filterAllowedScopedVariables
protected static void filterAllowedScopedVariables(Object variableObject, Map<String,Object> allowedInputMap, String fullVariableName, boolean variableNameMatched)
-
hasMatchingAllowedScope
protected static boolean hasMatchingAllowedScope(Object variableObject, String fullVariableName, String fullAllowedInput)
-
filterBlockedScopedVariables
protected static void filterBlockedScopedVariables(Object variableObject, Map<String,Object> blockedInputMap, String fullVariableName, boolean variableNameMatched)
-
containsScopedVariable
protected static boolean containsScopedVariable(String scopedName, List<String> valuesList)
-
fillScopedVariablesInMap
protected static void fillScopedVariablesInMap(List<String> scopedValues, Map<String,Object> scopedVariablesMap)
-
fillScopedVariableInMap
protected static void fillScopedVariableInMap(String scopedValue, Map<String,Object> scopedVariablesMap)
-
addToMapIfNotEmpty
protected static void addToMapIfNotEmpty(String value, String name, Map<String,Object> variableMap)
-
copyExtensionElementValuesToList
protected static void copyExtensionElementValuesToList(List<ExtensionElement> extensionElements, List<String> values)
-
getExtensionElementValues
protected static List<String> getExtensionElementValues(List<ExtensionElement> extensionElements)
-
copyCmmnExtensionElementValuesToList
protected static void copyCmmnExtensionElementValuesToList(List<ExtensionElement> extensionElements, List<String> values)
-
getCmmnExtensionElementValues
protected static List<String> getCmmnExtensionElementValues(List<ExtensionElement> extensionElements)
-
createTempContentItem
protected static VariableUtil.TempContentItemInfoHolder createTempContentItem(ValueFields valueFields, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
deserialize
public static Object deserialize(byte[] bytes, ValueFields valueFields)
-
createObjectInputStream
protected static ObjectInputStream createObjectInputStream(InputStream is) throws IOException
- Throws:
IOException
-
-