Class BpmnDeployer
java.lang.Object
org.activiti.engine.impl.bpmn.deployer.BpmnDeployer
- All Implemented Interfaces:
Deployer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BpmnDeploymentHelperprotected CachingAndArtifactsManagerprotected IdGeneratorprotected ParsedDeploymentBuilderFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreateLocalizationValues(String processDefinitionId, Process process) voiddeploy(DeploymentEntity deployment, Map<String, Object> deploymentSettings) protected voiddispatchProcessDefinitionEntityInitializedEvent(ParsedDeployment parsedDeployment) protected StringgetIdForNewProcessDefinition(ProcessDefinitionEntity processDefinition) Returns the ID to use for a new process definition; subclasses may override this to provide their own identification scheme.protected Map<ProcessDefinitionEntity,ProcessDefinitionEntity> getPreviousVersionsOfProcessDefinitions(ParsedDeployment parsedDeployment) Constructs a map from new ProcessDefinitionEntities to the previous version by key and tenant.protected booleanisEqualToCurrentLocalizationValue(String language, String id, String propertyName, String propertyValue, com.fasterxml.jackson.databind.node.ObjectNode infoNode) protected booleanlocalizeDataObjectElements(List<ValuedDataObject> dataObjects, com.fasterxml.jackson.databind.node.ObjectNode infoNode) protected booleanlocalizeFlowElements(Collection<FlowElement> flowElements, com.fasterxml.jackson.databind.node.ObjectNode infoNode) protected voidmakeProcessDefinitionsConsistentWithPersistedVersions(ParsedDeployment parsedDeployment) Loads the persisted version of each process definition and set values on the in-memory version to be consistent.protected voidpersistProcessDefinitionsAndAuthorizations(ParsedDeployment parsedDeployment) Saves each process definition.voidsetBpmnDeploymentHelper(BpmnDeploymentHelper bpmnDeploymentHelper) voidvoidsetIdGenerator(IdGenerator idGenerator) voidsetParsedDeploymentBuilderFactory(ParsedDeploymentBuilderFactory parsedDeploymentBuilderFactory) protected voidsetProcessDefinitionDiagramNames(ParsedDeployment parsedDeployment) Updates all the process definition entities to have the correct diagram resource name.protected voidsetProcessDefinitionVersionsAndIds(ParsedDeployment parsedDeployment, Map<ProcessDefinitionEntity, ProcessDefinitionEntity> mapNewToOldProcessDefinitions) Sets the version on each process definition entity, and the identifier.protected voidupdateTimersAndEvents(ParsedDeployment parsedDeployment, Map<ProcessDefinitionEntity, ProcessDefinitionEntity> mapNewToOldProcessDefinitions)
-
Field Details
-
idGenerator
-
parsedDeploymentBuilderFactory
-
bpmnDeploymentHelper
-
cachingAndArtifactsManager
-
-
Constructor Details
-
BpmnDeployer
public BpmnDeployer()
-
-
Method Details
-
deploy
-
setProcessDefinitionDiagramNames
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. -
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. -
persistProcessDefinitionsAndAuthorizations
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
-
getIdForNewProcessDefinition
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
-
localizeFlowElements
protected boolean localizeFlowElements(Collection<FlowElement> flowElements, com.fasterxml.jackson.databind.node.ObjectNode infoNode) -
isEqualToCurrentLocalizationValue
-
localizeDataObjectElements
protected boolean localizeDataObjectElements(List<ValuedDataObject> dataObjects, com.fasterxml.jackson.databind.node.ObjectNode infoNode) -
getIdGenerator
-
setIdGenerator
-
getExParsedDeploymentBuilderFactory
-
setParsedDeploymentBuilderFactory
public void setParsedDeploymentBuilderFactory(ParsedDeploymentBuilderFactory parsedDeploymentBuilderFactory) -
getBpmnDeploymentHelper
-
setBpmnDeploymentHelper
-
getCachingAndArtifcatsManager
-
setCachingAndArtifactsManager
-