Class BpmnDeployer

java.lang.Object
org.flowable.engine.impl.bpmn.deployer.BpmnDeployer
All Implemented Interfaces:
EngineDeployer

public class BpmnDeployer extends Object implements EngineDeployer
Author:
Joram Barrez, Tijs Rademakers
  • Field Details

  • Constructor Details

    • BpmnDeployer

      public BpmnDeployer()
  • Method Details

    • deploy

      public void deploy(EngineDeployment deployment, Map<String,Object> deploymentSettings)
      Specified by:
      deploy in interface EngineDeployer
    • createAndPersistNewDiagramsIfNeeded

      protected void createAndPersistNewDiagramsIfNeeded(ParsedDeployment parsedDeployment)
      Creates new diagrams for process definitions if the deployment is new, the process definition in question supports it, and the engine is configured to make new diagrams. When this method creates a new diagram, it also persists it via the ResourceEntityManager and adds it to the resources of the deployment.
    • setProcessDefinitionDiagramNames

      protected void setProcessDefinitionDiagramNames(ParsedDeployment parsedDeployment)
      Updates all the process definition entities to have the correct diagram resource name. Must be called after createAndPersistNewDiagramsAsNeeded to ensure that any newly-created diagrams already have their resources attached to the deployment.
    • getPreviousVersionsOfProcessDefinitions

      protected Map<ProcessDefinitionEntity,ProcessDefinitionEntity> getPreviousVersionsOfProcessDefinitions(ParsedDeployment parsedDeployment)
      Constructs a map from new ProcessDefinitionEntities to the previous version by key and tenant. If no previous version exists, no map entry is created.
    • getPreviousDerivedFromVersionsOfProcessDefinitions

      protected Map<ProcessDefinitionEntity,ProcessDefinitionEntity> getPreviousDerivedFromVersionsOfProcessDefinitions(ParsedDeployment parsedDeployment)
      Constructs a map from new ProcessDefinitionEntities to the previous derived from version by key and tenant. If no previous version exists, no map entry is created.
    • setProcessDefinitionVersionsAndIds

      protected void setProcessDefinitionVersionsAndIds(ParsedDeployment parsedDeployment, Map<ProcessDefinitionEntity,ProcessDefinitionEntity> mapNewToOldProcessDefinitions)
      Sets the version on each process definition entity, and the identifier. If the map contains an older version for a process definition, then the version is set to that older entity's version plus one; otherwise it is set to 1. Also dispatches an ENTITY_CREATED event.
    • setDerivedProcessDefinitionVersionsAndIds

      protected void setDerivedProcessDefinitionVersionsAndIds(ParsedDeployment parsedDeployment, Map<ProcessDefinitionEntity,ProcessDefinitionEntity> mapNewToOldProcessDefinitions, Map<String,Object> deploymentSettings)
    • persistProcessDefinitionsAndAuthorizations

      protected void persistProcessDefinitionsAndAuthorizations(ParsedDeployment parsedDeployment)
      Saves each process definition. It is assumed that the deployment is new, the definitions have never been saved before, and that they have all their values properly set up.
    • updateTimersAndEvents

      protected void updateTimersAndEvents(ParsedDeployment parsedDeployment, Map<ProcessDefinitionEntity,ProcessDefinitionEntity> mapNewToOldProcessDefinitions)
    • dispatchProcessDefinitionEntityInitializedEvent

      protected void dispatchProcessDefinitionEntityInitializedEvent(ParsedDeployment parsedDeployment)
    • getIdForNewProcessDefinition

      protected String getIdForNewProcessDefinition(ProcessDefinitionEntity processDefinition)
      Returns the ID to use for a new process definition; subclasses may override this to provide their own identification scheme. Process definition ids NEED to be unique across the whole engine!
    • makeProcessDefinitionsConsistentWithPersistedVersions

      protected void makeProcessDefinitionsConsistentWithPersistedVersions(ParsedDeployment parsedDeployment)
      Loads the persisted version of each process definition and set values on the in-memory version to be consistent.
    • createLocalizationValues

      protected void createLocalizationValues(String processDefinitionId, Process process)
    • localizeFlowElements

      protected boolean localizeFlowElements(Collection<FlowElement> flowElements, com.fasterxml.jackson.databind.node.ObjectNode infoNode)
    • isEqualToCurrentLocalizationValue

      protected boolean isEqualToCurrentLocalizationValue(String language, String id, String propertyName, String propertyValue, com.fasterxml.jackson.databind.node.ObjectNode infoNode)
    • localizeDataObjectElements

      protected boolean localizeDataObjectElements(List<ValuedDataObject> dataObjects, com.fasterxml.jackson.databind.node.ObjectNode infoNode)
    • getIdGenerator

      public IdGenerator getIdGenerator()
    • setIdGenerator

      public void setIdGenerator(IdGenerator idGenerator)
    • getExParsedDeploymentBuilderFactory

      public ParsedDeploymentBuilderFactory getExParsedDeploymentBuilderFactory()
    • setParsedDeploymentBuilderFactory

      public void setParsedDeploymentBuilderFactory(ParsedDeploymentBuilderFactory parsedDeploymentBuilderFactory)
    • getBpmnDeploymentHelper

      public BpmnDeploymentHelper getBpmnDeploymentHelper()
    • setBpmnDeploymentHelper

      public void setBpmnDeploymentHelper(BpmnDeploymentHelper bpmnDeploymentHelper)
    • getCachingAndArtifcatsManager

      public CachingAndArtifactsManager getCachingAndArtifcatsManager()
    • setCachingAndArtifactsManager

      public void setCachingAndArtifactsManager(CachingAndArtifactsManager manager)
    • getProcessDefinitionDiagramHelper

      public ProcessDefinitionDiagramHelper getProcessDefinitionDiagramHelper()
    • setProcessDefinitionDiagramHelper

      public void setProcessDefinitionDiagramHelper(ProcessDefinitionDiagramHelper processDefinitionDiagramHelper)
    • isUsePrefixId

      public boolean isUsePrefixId()
    • setUsePrefixId

      public void setUsePrefixId(boolean usePrefixId)