Class BpmnDeploymentHelper


  • public class BpmnDeploymentHelper
    extends java.lang.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.
    • Constructor Detail

      • BpmnDeploymentHelper

        public BpmnDeploymentHelper()
    • Method Detail

      • verifyProcessDefinitionsDoNotShareKeys

        public void verifyProcessDefinitionsDoNotShareKeys​(java.util.Collection<ProcessDefinitionEntity> processDefinitions)
        Verifies that no two process definitions share the same key, to prevent database unique index violation.
        Throws:
        ActivitiException - if any two processes have the same key
      • copyDeploymentValuesToProcessDefinitions

        public void copyDeploymentValuesToProcessDefinitions​(DeploymentEntity deployment,
                                                             java.util.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.
      • 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​(org.activiti.bpmn.model.Process process,
                                                             ProcessDefinitionEntity processDefinition)
        Parameters:
        processDefinition -
      • addAuthorizationsFromIterator

        protected void addAuthorizationsFromIterator​(CommandContext commandContext,
                                                     java.util.List<java.lang.String> expressions,
                                                     ProcessDefinitionEntity processDefinition,
                                                     org.activiti.engine.impl.bpmn.deployer.BpmnDeploymentHelper.ExpressionType expressionType)
      • setTimerManager

        public void setTimerManager​(TimerManager timerManager)
      • setEventSubscriptionManager

        public void setEventSubscriptionManager​(EventSubscriptionManager eventSubscriptionManager)