Class WorkObjectDefinitionDeploymentHelper
java.lang.Object
com.flowable.workobject.engine.impl.deployer.WorkObjectDefinitionDeploymentHelper
public class WorkObjectDefinitionDeploymentHelper
extends java.lang.Object
Methods for working with deployments. Much of the actual work of
WorkObjectDefinitionDeployer
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 Constructor Description WorkObjectDefinitionDeploymentHelper()
-
Method Summary
Modifier and Type Method Description void
copyDeploymentValuesToWorkObjectDefinitions(WorkObjectDeploymentEntity deployment, java.util.List<WorkObjectDefinitionEntity> workObjectDefinitions)
Updates all the work object definition entities to match the deployment's values for tenant, engine version, and deployment id.WorkObjectDefinitionEntity
getMostRecentVersionOfWorkObjectDefinition(WorkObjectDefinitionEntity workObjectDefinition)
Gets the most recent persisted work object that matches this one for tenant and key.WorkObjectDefinitionEntity
getPersistedInstanceOfWorkObjectDefinition(WorkObjectDefinitionEntity definition)
Gets the persisted version of the already-deployed form.void
setResourceNamesOnWorkObjectDefinitions(ParsedDeployment parsedDeployment)
Updates all the work object definitions entities to have the correct resource names.void
verifyDefinitionsDoNotShareKeys(java.util.Collection<WorkObjectDefinitionEntity> definitions)
Verifies that no two work object definitions share the same key, to prevent database unique index violation.
-
Constructor Details
-
WorkObjectDefinitionDeploymentHelper
public WorkObjectDefinitionDeploymentHelper()
-
-
Method Details
-
verifyDefinitionsDoNotShareKeys
public void verifyDefinitionsDoNotShareKeys(java.util.Collection<WorkObjectDefinitionEntity> definitions)Verifies that no two work object definitions share the same key, to prevent database unique index violation.- Throws:
org.flowable.common.engine.api.FlowableException
- if any two decision tables have the same key
-
copyDeploymentValuesToWorkObjectDefinitions
public void copyDeploymentValuesToWorkObjectDefinitions(WorkObjectDeploymentEntity deployment, java.util.List<WorkObjectDefinitionEntity> workObjectDefinitions)Updates all the work object definition entities to match the deployment's values for tenant, engine version, and deployment id. -
setResourceNamesOnWorkObjectDefinitions
Updates all the work object definitions entities to have the correct resource names. -
getMostRecentVersionOfWorkObjectDefinition
public WorkObjectDefinitionEntity getMostRecentVersionOfWorkObjectDefinition(WorkObjectDefinitionEntity workObjectDefinition)Gets the most recent persisted work object 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 work object entity. -
getPersistedInstanceOfWorkObjectDefinition
public WorkObjectDefinitionEntity getPersistedInstanceOfWorkObjectDefinition(WorkObjectDefinitionEntity definition)Gets the persisted version of the already-deployed form. Note that this is different fromgetMostRecentVersionOfWorkObjectDefinition(com.flowable.workobject.engine.impl.persistence.entity.WorkObjectDefinitionEntity)
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.
-