Class ProcessDefinitionEntity
- java.lang.Object
-
- org.camunda.bpm.engine.impl.core.model.CoreModelElement
-
- org.camunda.bpm.engine.impl.core.model.CoreActivity
-
- org.camunda.bpm.engine.impl.pvm.process.ScopeImpl
-
- org.camunda.bpm.engine.impl.pvm.process.ProcessDefinitionImpl
-
- org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity
-
- All Implemented Interfaces:
java.io.Serializable
,DbEntity
,HasDbRevision
,PvmProcessDefinition
,PvmProcessElement
,PvmScope
,ReadOnlyProcessDefinition
,ResourceDefinitionEntity<ProcessDefinitionEntity>
,ProcessDefinition
,ResourceDefinition
- Direct Known Subclasses:
ProcessDefinitionStatisticsEntity
public class ProcessDefinitionEntity extends ProcessDefinitionImpl implements ProcessDefinition, ResourceDefinitionEntity<ProcessDefinitionEntity>, DbEntity, HasDbRevision
- Author:
- Tom Baeyens, Daniel Meyer
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.camunda.bpm.engine.impl.pvm.process.ScopeImpl
ScopeImpl.BacklogErrorCallback
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<Expression>
candidateStarterGroupIdExpressions
protected java.util.Set<Expression>
candidateStarterUserIdExpressions
protected java.lang.String
category
protected java.util.List<IdentityLinkEntity>
definitionIdentityLinkEntities
protected java.lang.String
deploymentId
protected java.lang.String
diagramResourceName
protected boolean
firstVersion
protected boolean
hasStartFormKey
protected java.lang.Integer
historyLevel
protected java.lang.Integer
historyTimeToLive
protected boolean
isGraphicalNotationDefined
protected boolean
isIdentityLinksInitialized
protected boolean
isStartableInTasklist
protected java.lang.String
key
protected static EnginePersistenceLogger
LOG
protected java.lang.String
previousProcessDefinitionId
protected java.lang.String
resourceName
protected int
revision
protected StartFormHandler
startFormHandler
protected int
suspensionState
protected java.util.Map<java.lang.String,TaskDefinition>
taskDefinitions
protected java.lang.String
tenantId
protected int
version
protected java.lang.String
versionTag
-
Fields inherited from class org.camunda.bpm.engine.impl.pvm.process.ProcessDefinitionImpl
description, initial, initialActivityStacks, laneSets, name, participantProcess
-
Fields inherited from class org.camunda.bpm.engine.impl.pvm.process.ScopeImpl
BACKLOG, eventActivities, flowActivities, isSubProcessScope, namedFlowActivities, processDefinition
-
Fields inherited from class org.camunda.bpm.engine.impl.core.model.CoreActivity
ioMapping
-
Fields inherited from class org.camunda.bpm.engine.impl.core.model.CoreModelElement
builtInListeners, builtInVariableListeners, id, listeners, properties, variableListeners
-
-
Constructor Summary
Constructors Constructor Description ProcessDefinitionEntity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCandidateStarterGroupIdExpression(Expression groupId)
void
addCandidateStarterUserIdExpression(Expression userId)
IdentityLinkEntity
addIdentityLink(java.lang.String userId, java.lang.String groupId)
ExecutionEntity
createProcessInstance()
ExecutionEntity
createProcessInstance(java.lang.String businessKey)
ExecutionEntity
createProcessInstance(java.lang.String businessKey, java.lang.String caseInstanceId)
ExecutionEntity
createProcessInstance(java.lang.String businessKey, java.lang.String caseInstanceId, ActivityImpl initial)
ExecutionEntity
createProcessInstance(java.lang.String businessKey, ActivityImpl initial)
void
deleteIdentityLink(java.lang.String userId, java.lang.String groupId)
protected void
ensureNotSuspended()
protected void
ensurePreviousProcessDefinitionIdInitialized()
java.util.Set<Expression>
getCandidateStarterGroupIdExpressions()
java.util.Set<Expression>
getCandidateStarterUserIdExpressions()
java.lang.String
getCategory()
category name which is derived from the targetNamespace attribute in the definitions elementjava.lang.String
getDeploymentId()
The deployment in which this definition is contained.java.lang.String
getDescription()
description of this processjava.lang.String
getDiagramResourceName()
The diagram resource name for this definition if existboolean
getHasStartFormKey()
java.lang.Integer
getHistoryLevel()
java.lang.Integer
getHistoryTimeToLive()
History time to live.java.util.List<IdentityLinkEntity>
getIdentityLinks()
java.lang.String
getKey()
unique name for all versions this definitionjava.lang.Object
getPersistentState()
Returns a representation of the object, as would be stored in the database.ProcessDefinitionEntity
getPreviousDefinition()
java.lang.String
getPreviousProcessDefinitionId()
java.lang.String
getResourceName()
name ofthe resource
of this definitionint
getRevision()
int
getRevisionNext()
StartFormHandler
getStartFormHandler()
int
getSuspensionState()
java.util.Map<java.lang.String,TaskDefinition>
getTaskDefinitions()
java.lang.String
getTenantId()
The id of the tenant this definition belongs to.int
getVersion()
version of this definitionjava.lang.String
getVersionTag()
Version tag of the process definition.boolean
hasStartFormKey()
Does this process definition has astart form key
.boolean
isGraphicalNotationDefined()
boolean
isStartableInTasklist()
Returns true if the process definition is startable in Tasklist.boolean
isSuspended()
Returns true if the process definition is in suspended state.protected ProcessDefinitionEntity
loadProcessDefinition(java.lang.String processDefinitionId)
Returns the cached version if exists; does not update the entity from the database in that caseprotected PvmExecutionImpl
newProcessInstance()
protected void
resetPreviousProcessDefinitionId()
void
setCategory(java.lang.String category)
void
setDeploymentId(java.lang.String deploymentId)
void
setDiagramResourceName(java.lang.String diagramResourceName)
void
setGraphicalNotationDefined(boolean isGraphicalNotationDefined)
void
setHasStartFormKey(boolean hasStartFormKey)
void
setHistoryLevel(java.lang.Integer historyLevel)
void
setHistoryTimeToLive(java.lang.Integer historyTimeToLive)
void
setId(java.lang.String id)
void
setKey(java.lang.String key)
protected void
setPreviousProcessDefinitionId(java.lang.String previousProcessDefinitionId)
void
setResourceName(java.lang.String resourceName)
void
setRevision(int revision)
void
setStartableInTasklist(boolean isStartableInTasklist)
void
setStartFormHandler(StartFormHandler startFormHandler)
void
setStartFormKey(boolean hasStartFormKey)
void
setSuspensionState(int suspensionState)
void
setTaskDefinitions(java.util.Map<java.lang.String,TaskDefinition> taskDefinitions)
void
setTenantId(java.lang.String tenantId)
void
setVersion(int version)
void
setVersionTag(java.lang.String versionTag)
java.lang.String
toString()
void
updateModifiableFieldsFromEntity(ProcessDefinitionEntity updatingProcessDefinition)
Updates all modifiable fields from another process definition entity.-
Methods inherited from class org.camunda.bpm.engine.impl.pvm.process.ProcessDefinitionImpl
addLaneSet, createProcessInstanceForInitial, ensureDefaultInitialExists, getActivityBehavior, getEventScope, getFlowScope, getInitial, getInitialActivityStack, getInitialActivityStack, getLaneForId, getLaneSets, getLevelOfSubprocessScope, getParticipantProcess, isScope, isSubProcessScope, setInitial, setParticipantProcess
-
Methods inherited from class org.camunda.bpm.engine.impl.pvm.process.ScopeImpl
addExecutionListener, addExecutionListener, addToBacklog, contains, createActivity, findActivity, findActivityAtLevelOfSubprocess, findTransition, getActivities, getBacklogErrorCallbacks, getChildActivity, getEventActivities, getExecutionListeners, getExecutionListeners, getProcessDefinition, isAncestorFlowScopeOf, isBacklogEmpty, setSubProcessScope
-
Methods inherited from class org.camunda.bpm.engine.impl.core.model.CoreActivity
createActivity, getIoMapping, setIoMapping
-
Methods inherited from class org.camunda.bpm.engine.impl.core.model.CoreModelElement
addBuiltInListener, addBuiltInListener, addBuiltInVariableListener, addBuiltInVariableListener, addListener, addListener, addListenerToMap, addVariableListener, addVariableListener, getBuiltInListeners, getBuiltInListeners, getBuiltInVariableListeners, getBuiltInVariableListenersLocal, getId, getListeners, getListeners, getName, getProperties, getProperty, getVariableListeners, getVariableListenersLocal, setName, setProperties, setProperty
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.camunda.bpm.engine.impl.pvm.PvmProcessElement
getId, getProcessDefinition, getProperties, getProperty
-
Methods inherited from interface org.camunda.bpm.engine.impl.pvm.PvmScope
findActivity, findActivityAtLevelOfSubprocess, findTransition, getActivities
-
Methods inherited from interface org.camunda.bpm.engine.impl.pvm.ReadOnlyProcessDefinition
getName
-
Methods inherited from interface org.camunda.bpm.engine.repository.ResourceDefinition
getId, getName
-
Methods inherited from interface org.camunda.bpm.engine.impl.repository.ResourceDefinitionEntity
setName
-
-
-
-
Field Detail
-
LOG
protected static final EnginePersistenceLogger LOG
-
key
protected java.lang.String key
-
revision
protected int revision
-
version
protected int version
-
category
protected java.lang.String category
-
deploymentId
protected java.lang.String deploymentId
-
resourceName
protected java.lang.String resourceName
-
historyLevel
protected java.lang.Integer historyLevel
-
startFormHandler
protected StartFormHandler startFormHandler
-
diagramResourceName
protected java.lang.String diagramResourceName
-
isGraphicalNotationDefined
protected boolean isGraphicalNotationDefined
-
taskDefinitions
protected java.util.Map<java.lang.String,TaskDefinition> taskDefinitions
-
hasStartFormKey
protected boolean hasStartFormKey
-
suspensionState
protected int suspensionState
-
tenantId
protected java.lang.String tenantId
-
versionTag
protected java.lang.String versionTag
-
historyTimeToLive
protected java.lang.Integer historyTimeToLive
-
isIdentityLinksInitialized
protected boolean isIdentityLinksInitialized
-
definitionIdentityLinkEntities
protected java.util.List<IdentityLinkEntity> definitionIdentityLinkEntities
-
candidateStarterUserIdExpressions
protected java.util.Set<Expression> candidateStarterUserIdExpressions
-
candidateStarterGroupIdExpressions
protected java.util.Set<Expression> candidateStarterGroupIdExpressions
-
isStartableInTasklist
protected boolean isStartableInTasklist
-
firstVersion
protected boolean firstVersion
-
previousProcessDefinitionId
protected java.lang.String previousProcessDefinitionId
-
-
Method Detail
-
ensureNotSuspended
protected void ensureNotSuspended()
-
createProcessInstance
public ExecutionEntity createProcessInstance()
- Specified by:
createProcessInstance
in interfacePvmProcessDefinition
- Overrides:
createProcessInstance
in classProcessDefinitionImpl
-
createProcessInstance
public ExecutionEntity createProcessInstance(java.lang.String businessKey)
- Specified by:
createProcessInstance
in interfacePvmProcessDefinition
- Overrides:
createProcessInstance
in classProcessDefinitionImpl
-
createProcessInstance
public ExecutionEntity createProcessInstance(java.lang.String businessKey, java.lang.String caseInstanceId)
- Specified by:
createProcessInstance
in interfacePvmProcessDefinition
- Overrides:
createProcessInstance
in classProcessDefinitionImpl
-
createProcessInstance
public ExecutionEntity createProcessInstance(java.lang.String businessKey, ActivityImpl initial)
- Overrides:
createProcessInstance
in classProcessDefinitionImpl
-
newProcessInstance
protected PvmExecutionImpl newProcessInstance()
- Overrides:
newProcessInstance
in classProcessDefinitionImpl
-
createProcessInstance
public ExecutionEntity createProcessInstance(java.lang.String businessKey, java.lang.String caseInstanceId, ActivityImpl initial)
- Overrides:
createProcessInstance
in classProcessDefinitionImpl
-
addIdentityLink
public IdentityLinkEntity addIdentityLink(java.lang.String userId, java.lang.String groupId)
-
deleteIdentityLink
public void deleteIdentityLink(java.lang.String userId, java.lang.String groupId)
-
getIdentityLinks
public java.util.List<IdentityLinkEntity> getIdentityLinks()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classProcessDefinitionImpl
-
updateModifiableFieldsFromEntity
public void updateModifiableFieldsFromEntity(ProcessDefinitionEntity updatingProcessDefinition)
Updates all modifiable fields from another process definition entity.- Specified by:
updateModifiableFieldsFromEntity
in interfaceResourceDefinitionEntity<ProcessDefinitionEntity>
- Parameters:
updatingProcessDefinition
-
-
getPreviousDefinition
public ProcessDefinitionEntity getPreviousDefinition()
- Specified by:
getPreviousDefinition
in interfaceResourceDefinitionEntity<ProcessDefinitionEntity>
-
loadProcessDefinition
protected ProcessDefinitionEntity loadProcessDefinition(java.lang.String processDefinitionId)
Returns the cached version if exists; does not update the entity from the database in that case
-
getPreviousProcessDefinitionId
public java.lang.String getPreviousProcessDefinitionId()
-
resetPreviousProcessDefinitionId
protected void resetPreviousProcessDefinitionId()
-
setPreviousProcessDefinitionId
protected void setPreviousProcessDefinitionId(java.lang.String previousProcessDefinitionId)
-
ensurePreviousProcessDefinitionIdInitialized
protected void ensurePreviousProcessDefinitionIdInitialized()
-
getPersistentState
public java.lang.Object getPersistentState()
Description copied from interface:DbEntity
Returns a representation of the object, as would be stored in the database. Used when deciding if updates have occurred to the object or not since it was last loaded.- Specified by:
getPersistentState
in interfaceDbEntity
-
getKey
public java.lang.String getKey()
Description copied from interface:ResourceDefinition
unique name for all versions this definition- Specified by:
getKey
in interfaceResourceDefinition
-
setKey
public void setKey(java.lang.String key)
- Specified by:
setKey
in interfaceResourceDefinitionEntity<ProcessDefinitionEntity>
-
getDescription
public java.lang.String getDescription()
Description copied from interface:ProcessDefinition
description of this process- Specified by:
getDescription
in interfaceProcessDefinition
- Specified by:
getDescription
in interfaceReadOnlyProcessDefinition
- Overrides:
getDescription
in classProcessDefinitionImpl
-
getDeploymentId
public java.lang.String getDeploymentId()
Description copied from interface:ResourceDefinition
The deployment in which this definition is contained.- Specified by:
getDeploymentId
in interfacePvmProcessDefinition
- Specified by:
getDeploymentId
in interfaceResourceDefinition
- Overrides:
getDeploymentId
in classProcessDefinitionImpl
-
setDeploymentId
public void setDeploymentId(java.lang.String deploymentId)
- Specified by:
setDeploymentId
in interfaceResourceDefinitionEntity<ProcessDefinitionEntity>
-
getVersion
public int getVersion()
Description copied from interface:ResourceDefinition
version of this definition- Specified by:
getVersion
in interfaceResourceDefinition
-
setVersion
public void setVersion(int version)
- Specified by:
setVersion
in interfaceResourceDefinitionEntity<ProcessDefinitionEntity>
-
setId
public void setId(java.lang.String id)
- Specified by:
setId
in interfaceDbEntity
- Specified by:
setId
in interfaceResourceDefinitionEntity<ProcessDefinitionEntity>
- Overrides:
setId
in classCoreModelElement
-
getResourceName
public java.lang.String getResourceName()
Description copied from interface:ResourceDefinition
name ofthe resource
of this definition- Specified by:
getResourceName
in interfaceResourceDefinition
-
setResourceName
public void setResourceName(java.lang.String resourceName)
- Specified by:
setResourceName
in interfaceResourceDefinitionEntity<ProcessDefinitionEntity>
-
getHistoryLevel
public java.lang.Integer getHistoryLevel()
-
setHistoryLevel
public void setHistoryLevel(java.lang.Integer historyLevel)
-
getStartFormHandler
public StartFormHandler getStartFormHandler()
-
setStartFormHandler
public void setStartFormHandler(StartFormHandler startFormHandler)
-
getTaskDefinitions
public java.util.Map<java.lang.String,TaskDefinition> getTaskDefinitions()
-
setTaskDefinitions
public void setTaskDefinitions(java.util.Map<java.lang.String,TaskDefinition> taskDefinitions)
-
getCategory
public java.lang.String getCategory()
Description copied from interface:ResourceDefinition
category name which is derived from the targetNamespace attribute in the definitions element- Specified by:
getCategory
in interfaceResourceDefinition
-
setCategory
public void setCategory(java.lang.String category)
- Specified by:
setCategory
in interfaceResourceDefinitionEntity<ProcessDefinitionEntity>
-
getDiagramResourceName
public java.lang.String getDiagramResourceName()
Description copied from interface:ResourceDefinition
The diagram resource name for this definition if exist- Specified by:
getDiagramResourceName
in interfaceReadOnlyProcessDefinition
- Specified by:
getDiagramResourceName
in interfaceResourceDefinition
- Overrides:
getDiagramResourceName
in classProcessDefinitionImpl
-
setDiagramResourceName
public void setDiagramResourceName(java.lang.String diagramResourceName)
- Specified by:
setDiagramResourceName
in interfaceResourceDefinitionEntity<ProcessDefinitionEntity>
-
hasStartFormKey
public boolean hasStartFormKey()
Description copied from interface:ProcessDefinition
Does this process definition has astart form key
.- Specified by:
hasStartFormKey
in interfaceProcessDefinition
-
getHasStartFormKey
public boolean getHasStartFormKey()
-
setStartFormKey
public void setStartFormKey(boolean hasStartFormKey)
-
setHasStartFormKey
public void setHasStartFormKey(boolean hasStartFormKey)
-
isGraphicalNotationDefined
public boolean isGraphicalNotationDefined()
-
setGraphicalNotationDefined
public void setGraphicalNotationDefined(boolean isGraphicalNotationDefined)
-
getRevision
public int getRevision()
- Specified by:
getRevision
in interfaceHasDbRevision
-
setRevision
public void setRevision(int revision)
- Specified by:
setRevision
in interfaceHasDbRevision
-
getRevisionNext
public int getRevisionNext()
- Specified by:
getRevisionNext
in interfaceHasDbRevision
-
getSuspensionState
public int getSuspensionState()
-
setSuspensionState
public void setSuspensionState(int suspensionState)
-
isSuspended
public boolean isSuspended()
Description copied from interface:ProcessDefinition
Returns true if the process definition is in suspended state.- Specified by:
isSuspended
in interfaceProcessDefinition
-
getCandidateStarterUserIdExpressions
public java.util.Set<Expression> getCandidateStarterUserIdExpressions()
-
addCandidateStarterUserIdExpression
public void addCandidateStarterUserIdExpression(Expression userId)
-
getCandidateStarterGroupIdExpressions
public java.util.Set<Expression> getCandidateStarterGroupIdExpressions()
-
addCandidateStarterGroupIdExpression
public void addCandidateStarterGroupIdExpression(Expression groupId)
-
getTenantId
public java.lang.String getTenantId()
Description copied from interface:ResourceDefinition
The id of the tenant this definition belongs to. Can benull
if the definition belongs to no single tenant.- Specified by:
getTenantId
in interfaceResourceDefinition
-
setTenantId
public void setTenantId(java.lang.String tenantId)
- Specified by:
setTenantId
in interfaceResourceDefinitionEntity<ProcessDefinitionEntity>
-
getVersionTag
public java.lang.String getVersionTag()
Description copied from interface:ProcessDefinition
Version tag of the process definition.- Specified by:
getVersionTag
in interfaceProcessDefinition
-
setVersionTag
public void setVersionTag(java.lang.String versionTag)
-
getHistoryTimeToLive
public java.lang.Integer getHistoryTimeToLive()
Description copied from interface:ResourceDefinition
History time to live. Is taken into account in history cleanup.- Specified by:
getHistoryTimeToLive
in interfaceResourceDefinition
-
setHistoryTimeToLive
public void setHistoryTimeToLive(java.lang.Integer historyTimeToLive)
- Specified by:
setHistoryTimeToLive
in interfaceResourceDefinitionEntity<ProcessDefinitionEntity>
-
isStartableInTasklist
public boolean isStartableInTasklist()
Description copied from interface:ProcessDefinition
Returns true if the process definition is startable in Tasklist.- Specified by:
isStartableInTasklist
in interfaceProcessDefinition
-
setStartableInTasklist
public void setStartableInTasklist(boolean isStartableInTasklist)
-
-