Class BpmnDeploymentHelper

java.lang.Object
org.flowable.engine.impl.bpmn.deployer.BpmnDeploymentHelper

public class BpmnDeploymentHelper extends Object
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 Details

  • Constructor Details

    • BpmnDeploymentHelper

      public BpmnDeploymentHelper()
  • Method Details

    • verifyProcessDefinitionsDoNotShareKeys

      public void verifyProcessDefinitionsDoNotShareKeys(Collection<ProcessDefinitionEntity> processDefinitions)
      Verifies that no two process definitions share the same key, to prevent database unique index violation.
      Throws:
      FlowableException - if any two processes have the same key
    • 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

      public void setResourceNamesOnProcessDefinitions(ParsedDeployment parsedDeployment)
      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 from getMostRecentVersionOfProcessDefinition(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

      public TimerManager getTimerManager()
    • setTimerManager

      public void setTimerManager(TimerManager timerManager)
    • getEventSubscriptionManager

      public EventSubscriptionManager getEventSubscriptionManager()
    • setEventSubscriptionManager

      public void setEventSubscriptionManager(EventSubscriptionManager eventSubscriptionManager)