Class FormDefinitionDeploymentHelper
java.lang.Object
com.flowable.form.engine.impl.deployer.FormDefinitionDeploymentHelper
Methods for working with deployments. Much of the actual work of
FormDefinitionDeployer
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
copyDeploymentValuesToForms
(FormDeploymentEntity deployment, List<FormDefinitionEntity> formDefinitions) Updates all the form entities to match the deployment's values for tenant, engine version, and deployment id.getMostRecentVersionOfForm
(FormDefinitionEntity formDefinition) Gets the most recent persisted form that matches this one for tenant and key.getPersistedInstanceOfFormDefinition
(FormDefinitionEntity formDefinition) Gets the persisted version of the already-deployed form.void
setResourceNamesOnFormDefinitions
(ParsedDeployment parsedDeployment) Updates all the form entities to have the correct resource names.void
Verifies that no two forms share the same key, to prevent database unique index violation.
-
Constructor Details
-
FormDefinitionDeploymentHelper
public FormDefinitionDeploymentHelper()
-
-
Method Details
-
copyDeploymentValuesToForms
public void copyDeploymentValuesToForms(FormDeploymentEntity deployment, List<FormDefinitionEntity> formDefinitions) Updates all the form entities to match the deployment's values for tenant, engine version, and deployment id. -
setResourceNamesOnFormDefinitions
Updates all the form entities to have the correct resource names. -
getMostRecentVersionOfForm
Gets the most recent persisted form 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 form entity. -
getPersistedInstanceOfFormDefinition
public FormDefinitionEntity getPersistedInstanceOfFormDefinition(FormDefinitionEntity formDefinition) Gets the persisted version of the already-deployed form. Note that this is different fromgetMostRecentVersionOfForm(com.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.