Class DmnDeploymentHelper
java.lang.Object
org.flowable.dmn.engine.impl.deployer.DmnDeploymentHelper
Methods for working with deployments. Much of the actual work of
DmnDeployer
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
copyDeploymentValuesToDecisions
(DmnDeploymentEntity deployment, List<DecisionEntity> decisions) Updates all the decision entities to match the deployment's values for tenant, engine version, and deployment id.void
createAndPersistNewDiagramsIfNeeded
(ParsedDeployment parsedDeployment, DecisionRequirementsDiagramHelper decisionRequirementsDiagramHelper) Creates new diagrams for decisions if the deployment is new, the decision in question supports it, and the engine is configured to make new diagrams.getMostRecentVersionOfDecision
(DecisionEntity decision) Gets the most recent persisted decision that matches this one for tenant and key.getPersistedInstanceOfDecision
(DecisionEntity decision) Gets the persisted version of the already-deployed decision.protected void
setDecisionDefinitionDiagramNames
(ParsedDeployment parsedDeployment) Updates all the decision entities to have the correct diagram resource name.void
setResourceNamesOnDecisions
(ParsedDeployment parsedDeployment) Updates all the decision entities to have the correct resource names.void
verifyDecisionTablesDoNotShareKeys
(Collection<DecisionEntity> decisionTables) Verifies that no two decisions share the same key, to prevent database unique index violation.
-
Constructor Details
-
DmnDeploymentHelper
public DmnDeploymentHelper()
-
-
Method Details
-
copyDeploymentValuesToDecisions
public void copyDeploymentValuesToDecisions(DmnDeploymentEntity deployment, List<DecisionEntity> decisions) Updates all the decision entities to match the deployment's values for tenant, engine version, and deployment id. -
setResourceNamesOnDecisions
Updates all the decision entities to have the correct resource names. -
getMostRecentVersionOfDecision
Gets the most recent persisted decision 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 decision entity. -
getPersistedInstanceOfDecision
Gets the persisted version of the already-deployed decision. Note that this is different fromgetMostRecentVersionOfDecision(org.flowable.dmn.engine.impl.persistence.entity.DecisionEntity)
as it looks specifically for a decision that is already persisted and attached to a particular deployment, rather than the latest version across all deployments. -
createAndPersistNewDiagramsIfNeeded
public void createAndPersistNewDiagramsIfNeeded(ParsedDeployment parsedDeployment, DecisionRequirementsDiagramHelper decisionRequirementsDiagramHelper) Creates new diagrams for decisions if the deployment is new, the decision in question supports it, and the engine is configured to make new diagrams. When this method creates a new diagram, it also persists it via the ResourceEntityManager and adds it to the resources of the deployment. -
setDecisionDefinitionDiagramNames
Updates all the decision 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.