Class BpmnDeploymentHelper
java.lang.Object
org.flowable.engine.impl.bpmn.deployer.BpmnDeploymentHelper
Methods for working with deployments. Much of the actual work of
BpmnDeployer
is done by orchestrating the different pieces of work this class does; by having them here, we allow other
deployers to make use of them.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAuthorizationsForNewProcessDefinition
(Process process, ProcessDefinitionEntity processDefinition) protected void
addAuthorizationsFromIterator
(CommandContext commandContext, List<String> expressions, ProcessDefinitionEntity processDefinition, org.flowable.engine.impl.bpmn.deployer.BpmnDeploymentHelper.ExpressionType expressionType) void
copyDeploymentValuesToProcessDefinitions
(DeploymentEntity deployment, List<ProcessDefinitionEntity> processDefinitions) Updates all the process definition entities to match the deployment's values for tenant, engine version, and deployment id.getMostRecentDerivedVersionOfProcessDefinition
(ProcessDefinitionEntity processDefinition) Gets the most recent persisted derived process definition that matches this one for tenant and key.getMostRecentVersionOfProcessDefinition
(ProcessDefinitionEntity processDefinition) Gets the most recent persisted process definition that matches this one for tenant and key.getPersistedInstanceOfProcessDefinition
(ProcessDefinitionEntity processDefinition) Gets the persisted version of the already-deployed process definition.void
setEventSubscriptionManager
(EventSubscriptionManager eventSubscriptionManager) void
setResourceNamesOnProcessDefinitions
(ParsedDeployment parsedDeployment) Updates all the process definition entities to have the correct resource names.void
setTimerManager
(TimerManager timerManager) void
updateTimersAndEvents
(ProcessDefinitionEntity processDefinition, ProcessDefinitionEntity previousProcessDefinition, ParsedDeployment parsedDeployment) Updates all timers and events for the process definition.void
verifyProcessDefinitionsDoNotShareKeys
(Collection<ProcessDefinitionEntity> processDefinitions) Verifies that no two process definitions share the same key, to prevent database unique index violation.
-
Field Details
-
timerManager
-
eventSubscriptionManager
-
-
Constructor Details
-
BpmnDeploymentHelper
public BpmnDeploymentHelper()
-
-
Method Details
-
copyDeploymentValuesToProcessDefinitions
public void copyDeploymentValuesToProcessDefinitions(DeploymentEntity deployment, List<ProcessDefinitionEntity> processDefinitions) Updates all the process definition entities to match the deployment's values for tenant, engine version, and deployment id. -
setResourceNamesOnProcessDefinitions
Updates all the process definition entities to have the correct resource names. -
getMostRecentVersionOfProcessDefinition
public ProcessDefinitionEntity getMostRecentVersionOfProcessDefinition(ProcessDefinitionEntity processDefinition) Gets the most recent persisted process definition that matches this one for tenant and key. If none is found, returns null. This method assumes that the tenant and key are properly set on the process definition entity. -
getMostRecentDerivedVersionOfProcessDefinition
public ProcessDefinitionEntity getMostRecentDerivedVersionOfProcessDefinition(ProcessDefinitionEntity processDefinition) Gets the most recent persisted derived process definition that matches this one for tenant and key. If none is found, returns null. This method assumes that the tenant and key are properly set on the process definition entity. -
getPersistedInstanceOfProcessDefinition
public ProcessDefinitionEntity getPersistedInstanceOfProcessDefinition(ProcessDefinitionEntity processDefinition) Gets the persisted version of the already-deployed process definition. Note that this is different fromgetMostRecentVersionOfProcessDefinition(org.flowable.engine.impl.persistence.entity.ProcessDefinitionEntity)
as it looks specifically for a process definition that is already persisted and attached to a particular deployment, rather than the latest version across all deployments. -
updateTimersAndEvents
public void updateTimersAndEvents(ProcessDefinitionEntity processDefinition, ProcessDefinitionEntity previousProcessDefinition, ParsedDeployment parsedDeployment) Updates all timers and events for the process definition. This removes obsolete message and signal subscriptions and timers, and adds new ones. -
addAuthorizationsForNewProcessDefinition
public void addAuthorizationsForNewProcessDefinition(Process process, ProcessDefinitionEntity processDefinition) - Parameters:
processDefinition
-
-
addAuthorizationsFromIterator
protected void addAuthorizationsFromIterator(CommandContext commandContext, List<String> expressions, ProcessDefinitionEntity processDefinition, org.flowable.engine.impl.bpmn.deployer.BpmnDeploymentHelper.ExpressionType expressionType) -
getTimerManager
-
setTimerManager
-
getEventSubscriptionManager
-
setEventSubscriptionManager