Class BaseBpmnJsonConverter

java.lang.Object
org.flowable.editor.language.json.converter.BaseBpmnJsonConverter
All Implemented Interfaces:
EditorJsonConstants, StencilConstants
Direct Known Subclasses:
AdhocSubProcessJsonConverter, AssociationJsonConverter, BoundaryEventJsonConverter, BusinessRuleTaskJsonConverter, CallActivityJsonConverter, CamelTaskJsonConverter, CatchEventJsonConverter, DataStoreJsonConverter, DecisionTaskJsonConverter, EndEventJsonConverter, EventGatewayJsonConverter, EventSubProcessJsonConverter, ExclusiveGatewayJsonConverter, ExternalWorkerServiceTaskJsonConverter, HttpTaskJsonConverter, InclusiveGatewayJsonConverter, MailTaskJsonConverter, ManualTaskJsonConverter, MessageFlowJsonConverter, MuleTaskJsonConverter, ParallelGatewayJsonConverter, ReceiveTaskJsonConverter, ScriptTaskJsonConverter, SendEventTaskJsonConverter, SendTaskJsonConverter, SequenceFlowJsonConverter, ServiceTaskJsonConverter, ShellTaskJsonConverter, StartEventJsonConverter, SubProcessJsonConverter, TextAnnotationJsonConverter, ThrowEventJsonConverter, UserTaskJsonConverter

public abstract class BaseBpmnJsonConverter extends Object implements EditorJsonConstants, StencilConstants
Author:
Tijs Rademakers, Zheng Ji
  • Field Details

    • LOG

      protected static final org.slf4j.Logger LOG
    • JSON_MAPPER

      protected static final com.fasterxml.jackson.databind.json.JsonMapper JSON_MAPPER
    • processor

      protected ActivityProcessor processor
    • model

      protected org.flowable.bpmn.model.BpmnModel model
    • flowElementNode

      protected com.fasterxml.jackson.databind.node.ObjectNode flowElementNode
    • subProcessX

      protected double subProcessX
    • subProcessY

      protected double subProcessY
    • shapesArrayNode

      protected com.fasterxml.jackson.databind.node.ArrayNode shapesArrayNode
  • Constructor Details

    • BaseBpmnJsonConverter

      public BaseBpmnJsonConverter()
  • Method Details

    • getValueAsString

      protected static String getValueAsString(String name, com.fasterxml.jackson.databind.JsonNode objectNode)
    • getValueAsBoolean

      protected static boolean getValueAsBoolean(String name, com.fasterxml.jackson.databind.JsonNode objectNode)
    • getValueAsList

      protected static List<String> getValueAsList(String name, com.fasterxml.jackson.databind.JsonNode objectNode)
    • addField

      protected static void addField(String name, com.fasterxml.jackson.databind.JsonNode elementNode, org.flowable.bpmn.model.ServiceTask task)
    • addField

      protected static void addField(String name, String propertyName, String defaultValue, com.fasterxml.jackson.databind.JsonNode elementNode, org.flowable.bpmn.model.ServiceTask task)
    • convertListToCommaSeparatedString

      protected static String convertListToCommaSeparatedString(List<String> stringList)
    • addFlowableExtensionElement

      protected static org.flowable.bpmn.model.ExtensionElement addFlowableExtensionElement(String name, org.flowable.bpmn.model.FlowElement flowElement)
    • addFlowableExtensionElementWithValue

      protected static org.flowable.bpmn.model.ExtensionElement addFlowableExtensionElementWithValue(String name, String value, org.flowable.bpmn.model.FlowElement flowElement)
    • addExtensionAttribute

      public static void addExtensionAttribute(String name, String value, org.flowable.bpmn.model.ExtensionElement extensionElement)
    • createExtensionAttribute

      public static org.flowable.bpmn.model.ExtensionAttribute createExtensionAttribute(String name, String value)
    • convertToJson

      public void convertToJson(BpmnJsonConverterContext converterContext, org.flowable.bpmn.model.BaseElement baseElement, ActivityProcessor processor, org.flowable.bpmn.model.BpmnModel model, org.flowable.bpmn.model.FlowElementsContainer container, com.fasterxml.jackson.databind.node.ArrayNode shapesArrayNode, double subProcessX, double subProcessY)
    • processVariableAggregationDefinitions

      protected void processVariableAggregationDefinitions(org.flowable.bpmn.model.VariableAggregationDefinitions aggregations, com.fasterxml.jackson.databind.node.ObjectNode propertiesNode)
    • processDataStoreReferences

      protected void processDataStoreReferences(org.flowable.bpmn.model.FlowElementsContainer container, String dataStoreReferenceId, com.fasterxml.jackson.databind.node.ArrayNode outgoingArrayNode)
    • createDataAssociation

      protected void createDataAssociation(org.flowable.bpmn.model.DataAssociation dataAssociation, boolean incoming, org.flowable.bpmn.model.Activity activity)
    • convertToBpmnModel

      public void convertToBpmnModel(com.fasterxml.jackson.databind.JsonNode elementNode, com.fasterxml.jackson.databind.JsonNode modelNode, ActivityProcessor processor, org.flowable.bpmn.model.BaseElement parentElement, Map<String,com.fasterxml.jackson.databind.JsonNode> shapeMap, org.flowable.bpmn.model.BpmnModel bpmnModel, BpmnJsonConverterContext converterContext)
    • convertElementToJson

      protected abstract void convertElementToJson(com.fasterxml.jackson.databind.node.ObjectNode propertiesNode, org.flowable.bpmn.model.BaseElement baseElement, BpmnJsonConverterContext converterContext)
    • convertJsonToElement

      protected abstract org.flowable.bpmn.model.BaseElement convertJsonToElement(com.fasterxml.jackson.databind.JsonNode elementNode, com.fasterxml.jackson.databind.JsonNode modelNode, Map<String,com.fasterxml.jackson.databind.JsonNode> shapeMap, BpmnJsonConverterContext converterContext)
    • getStencilId

      protected abstract String getStencilId(org.flowable.bpmn.model.BaseElement baseElement)
    • setPropertyValue

      protected void setPropertyValue(String name, String value, com.fasterxml.jackson.databind.node.ObjectNode propertiesNode)
    • addFormProperties

      protected void addFormProperties(List<org.flowable.bpmn.model.FormProperty> formProperties, com.fasterxml.jackson.databind.node.ObjectNode propertiesNode)
    • addEventOutParameters

      protected void addEventOutParameters(List<org.flowable.bpmn.model.ExtensionElement> eventParameterElements, com.fasterxml.jackson.databind.node.ObjectNode propertiesNode)
    • addEventOutIOParameters

      protected void addEventOutIOParameters(List<org.flowable.bpmn.model.IOParameter> eventParameters, com.fasterxml.jackson.databind.node.ObjectNode propertiesNode)
    • addEventInParameters

      protected void addEventInParameters(List<org.flowable.bpmn.model.ExtensionElement> eventParameterElements, com.fasterxml.jackson.databind.node.ObjectNode propertiesNode)
    • addEventInIOParameters

      protected void addEventInIOParameters(List<org.flowable.bpmn.model.IOParameter> eventParameters, com.fasterxml.jackson.databind.node.ObjectNode propertiesNode)
    • addEventCorrelationParameters

      protected void addEventCorrelationParameters(List<org.flowable.bpmn.model.ExtensionElement> eventParameterElements, com.fasterxml.jackson.databind.node.ObjectNode propertiesNode)
    • addReceiveEventExtensionElements

      protected void addReceiveEventExtensionElements(com.fasterxml.jackson.databind.JsonNode elementNode, org.flowable.bpmn.model.FlowElement flowElement)
    • addEventRegistryProperties

      protected void addEventRegistryProperties(org.flowable.bpmn.model.FlowElement flowElement, com.fasterxml.jackson.databind.node.ObjectNode propertiesNode)
    • getExtensionValue

      protected String getExtensionValue(String name, org.flowable.bpmn.model.FlowElement flowElement)
    • addMapException

      protected void addMapException(List<org.flowable.bpmn.model.MapExceptionEntry> exceptions, com.fasterxml.jackson.databind.node.ObjectNode propertiesNode)
    • addFieldExtensions

      protected void addFieldExtensions(List<org.flowable.bpmn.model.FieldExtension> extensions, com.fasterxml.jackson.databind.node.ObjectNode propertiesNode)
    • addEventProperties

      protected void addEventProperties(org.flowable.bpmn.model.Event event, com.fasterxml.jackson.databind.node.ObjectNode propertiesNode)
    • convertJsonToFormProperties

      protected void convertJsonToFormProperties(com.fasterxml.jackson.databind.JsonNode objectNode, org.flowable.bpmn.model.BaseElement element)
    • convertJsonToTimerDefinition

      protected void convertJsonToTimerDefinition(com.fasterxml.jackson.databind.JsonNode objectNode, org.flowable.bpmn.model.Event event)
    • convertJsonToSignalDefinition

      protected void convertJsonToSignalDefinition(com.fasterxml.jackson.databind.JsonNode objectNode, org.flowable.bpmn.model.Event event)
    • convertJsonToCompensationDefinition

      protected void convertJsonToCompensationDefinition(com.fasterxml.jackson.databind.JsonNode objectNode, org.flowable.bpmn.model.Event event)
    • convertJsonToMessageDefinition

      protected void convertJsonToMessageDefinition(com.fasterxml.jackson.databind.JsonNode objectNode, org.flowable.bpmn.model.Event event)
    • convertJsonToEventOutParameters

      protected void convertJsonToEventOutParameters(com.fasterxml.jackson.databind.JsonNode objectNode, org.flowable.bpmn.model.FlowElement event)
    • convertJsonToOutIOParameters

      protected void convertJsonToOutIOParameters(com.fasterxml.jackson.databind.JsonNode objectNode, org.flowable.bpmn.model.SendEventServiceTask task)
    • convertJsonToInParameters

      protected void convertJsonToInParameters(com.fasterxml.jackson.databind.JsonNode objectNode, org.flowable.bpmn.model.Event event)
    • convertJsonToInIOParameters

      protected void convertJsonToInIOParameters(com.fasterxml.jackson.databind.JsonNode objectNode, org.flowable.bpmn.model.SendEventServiceTask task)
    • convertJsonToEventCorrelationParameters

      protected void convertJsonToEventCorrelationParameters(com.fasterxml.jackson.databind.JsonNode objectNode, String correlationPropertyName, org.flowable.bpmn.model.FlowElement flowElement)
    • convertJsonToVariableAggregationDefinitions

      protected org.flowable.bpmn.model.VariableAggregationDefinitions convertJsonToVariableAggregationDefinitions(com.fasterxml.jackson.databind.JsonNode node)
    • convertJsonToVariableListenerDefinition

      protected void convertJsonToVariableListenerDefinition(com.fasterxml.jackson.databind.JsonNode objectNode, org.flowable.bpmn.model.Event event)
    • convertJsonToConditionalDefinition

      protected void convertJsonToConditionalDefinition(com.fasterxml.jackson.databind.JsonNode objectNode, org.flowable.bpmn.model.Event event)
    • convertJsonToEscalationDefinition

      protected void convertJsonToEscalationDefinition(com.fasterxml.jackson.databind.JsonNode objectNode, org.flowable.bpmn.model.Event event)
    • convertJsonToErrorDefinition

      protected void convertJsonToErrorDefinition(com.fasterxml.jackson.databind.JsonNode objectNode, org.flowable.bpmn.model.Event event)