Class EventDefinitionDeploymentHelper

java.lang.Object
org.flowable.eventregistry.impl.deployer.EventDefinitionDeploymentHelper

public class EventDefinitionDeploymentHelper extends Object
Methods for working with deployments. Much of the actual work of EventDefinitionDeployer 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 Details

    • EventDefinitionDeploymentHelper

      public EventDefinitionDeploymentHelper()
  • Method Details

    • verifyEventDefinitionsDoNotShareKeys

      public void verifyEventDefinitionsDoNotShareKeys(Collection<EventDefinitionEntity> eventDefinitions)
      Verifies that no two event definitions share the same key, to prevent database unique index violation.
      Throws:
      FlowableException - if any two event definitions have the same key
    • copyDeploymentValuesToEventDefinitions

      public void copyDeploymentValuesToEventDefinitions(EventDeploymentEntity deployment, List<EventDefinitionEntity> eventDefinitions)
      Updates all the event definition entities to match the deployment's values for tenant, engine version, and deployment id.
    • setResourceNamesOnEventDefinitions

      public void setResourceNamesOnEventDefinitions(ParsedDeployment parsedDeployment)
      Updates all the decision table entities to have the correct resource names.
    • getMostRecentVersionOfEventDefinition

      public EventDefinitionEntity getMostRecentVersionOfEventDefinition(EventDefinitionEntity eventDefinition)
      Gets the persisted event 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 event definition entity.
    • getPersistedInstanceOfEventDefinition

      public EventDefinitionEntity getPersistedInstanceOfEventDefinition(EventDefinitionEntity eventDefinition)
      Gets the persisted version of the already-deployed event definition.