Class FormDefinitionDeploymentHelper
- java.lang.Object
-
- org.flowable.form.engine.impl.deployer.FormDefinitionDeploymentHelper
-
public class FormDefinitionDeploymentHelper extends Object
Methods for working with deployments. Much of the actual work ofFormDefinitionDeployeris 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 Constructor Description FormDefinitionDeploymentHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopyDeploymentValuesToForms(FormDeploymentEntity deployment, List<FormDefinitionEntity> formDefinitions)Updates all the decision table entities to match the deployment's values for tenant, engine version, and deployment id.FormDefinitionEntitygetMostRecentVersionOfForm(FormDefinitionEntity formDefinition)Gets the most recent persisted decision table that matches this one for tenant and key.FormDefinitionEntitygetPersistedInstanceOfFormDefinition(FormDefinitionEntity formDefinition)Gets the persisted version of the already-deployed form.voidsetResourceNamesOnFormDefinitions(ParsedDeployment parsedDeployment)Updates all the decision table entities to have the correct resource names.voidverifyFormsDoNotShareKeys(Collection<FormDefinitionEntity> forms)Verifies that no two decision tables share the same key, to prevent database unique index violation.
-
-
-
Method Detail
-
verifyFormsDoNotShareKeys
public void verifyFormsDoNotShareKeys(Collection<FormDefinitionEntity> forms)
Verifies that no two decision tables share the same key, to prevent database unique index violation.- Throws:
FlowableException- if any two decision tables have the same key
-
copyDeploymentValuesToForms
public void copyDeploymentValuesToForms(FormDeploymentEntity deployment, List<FormDefinitionEntity> formDefinitions)
Updates all the decision table entities to match the deployment's values for tenant, engine version, and deployment id.
-
setResourceNamesOnFormDefinitions
public void setResourceNamesOnFormDefinitions(ParsedDeployment parsedDeployment)
Updates all the decision table entities to have the correct resource names.
-
getMostRecentVersionOfForm
public FormDefinitionEntity getMostRecentVersionOfForm(FormDefinitionEntity formDefinition)
Gets the most recent persisted decision table 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 table entity.
-
getPersistedInstanceOfFormDefinition
public FormDefinitionEntity getPersistedInstanceOfFormDefinition(FormDefinitionEntity formDefinition)
Gets the persisted version of the already-deployed form. Note that this is different fromgetMostRecentVersionOfForm(org.flowable.form.engine.impl.persistence.entity.FormDefinitionEntity)as it looks specifically for a form that is already persisted and attached to a particular deployment, rather than the latest version across all deployments.
-
-