Class BpmnDeployer

  • All Implemented Interfaces:
    Deployer

    public class BpmnDeployer
    extends java.lang.Object
    implements Deployer
    • Constructor Detail

      • BpmnDeployer

        public BpmnDeployer()
    • Method Detail

      • deploy

        public void deploy​(DeploymentEntity deployment,
                           java.util.Map<java.lang.String,​java.lang.Object> deploymentSettings)
        Specified by:
        deploy in interface Deployer
      • 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 java.util.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.
      • setProcessDefinitionVersionsAndIds

        protected void setProcessDefinitionVersionsAndIds​(ParsedDeployment parsedDeployment,
                                                          java.util.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.
      • 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.
      • dispatchProcessDefinitionEntityInitializedEvent

        protected void dispatchProcessDefinitionEntityInitializedEvent​(ParsedDeployment parsedDeployment)
      • getIdForNewProcessDefinition

        protected java.lang.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 accross 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​(java.lang.String processDefinitionId,
                                                org.activiti.bpmn.model.Process process)
      • localizeFlowElements

        protected boolean localizeFlowElements​(java.util.Collection<org.activiti.bpmn.model.FlowElement> flowElements,
                                               com.fasterxml.jackson.databind.node.ObjectNode infoNode)
      • isEqualToCurrentLocalizationValue

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

        protected boolean localizeDataObjectElements​(java.util.List<org.activiti.bpmn.model.ValuedDataObject> dataObjects,
                                                     com.fasterxml.jackson.databind.node.ObjectNode infoNode)
      • setIdGenerator

        public void setIdGenerator​(IdGenerator idGenerator)
      • setParsedDeploymentBuilderFactory

        public void setParsedDeploymentBuilderFactory​(ParsedDeploymentBuilderFactory parsedDeploymentBuilderFactory)
      • setBpmnDeploymentHelper

        public void setBpmnDeploymentHelper​(BpmnDeploymentHelper bpmnDeploymentHelper)