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:
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 Set<Expression>
candidateStarterGroupIdExpressions
protected Set<Expression>
candidateStarterUserIdExpressions
protected String
category
protected List<IdentityLinkEntity>
definitionIdentityLinkEntities
protected String
deploymentId
protected String
diagramResourceName
protected boolean
firstVersion
protected boolean
hasStartFormKey
protected Integer
historyLevel
protected Integer
historyTimeToLive
protected boolean
isGraphicalNotationDefined
protected boolean
isIdentityLinksInitialized
protected boolean
isStartableInTasklist
protected String
key
protected static EnginePersistenceLogger
LOG
protected String
previousProcessDefinitionId
protected String
resourceName
protected int
revision
protected FormDefinition
startFormDefinition
protected StartFormHandler
startFormHandler
protected int
suspensionState
protected Map<String,TaskDefinition>
taskDefinitions
protected String
tenantId
protected int
version
protected 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(String userId, String groupId)
ExecutionEntity
createProcessInstance()
ExecutionEntity
createProcessInstance(String businessKey)
ExecutionEntity
createProcessInstance(String businessKey, String caseInstanceId)
ExecutionEntity
createProcessInstance(String businessKey, String caseInstanceId, ActivityImpl initial)
ExecutionEntity
createProcessInstance(String businessKey, ActivityImpl initial)
void
deleteIdentityLink(String userId, String groupId)
protected void
ensureNotSuspended()
protected void
ensurePreviousProcessDefinitionIdInitialized()
Set<Expression>
getCandidateStarterGroupIdExpressions()
Set<Expression>
getCandidateStarterUserIdExpressions()
String
getCategory()
category name which is derived from the targetNamespace attribute in the definitions elementString
getDeploymentId()
The deployment in which this definition is contained.String
getDescription()
description of this processString
getDiagramResourceName()
The diagram resource name for this definition if existboolean
getHasStartFormKey()
Integer
getHistoryLevel()
Integer
getHistoryTimeToLive()
History time to live.List<IdentityLinkEntity>
getIdentityLinks()
String
getKey()
unique name for all versions this definitionObject
getPersistentState()
Returns a representation of the object, as would be stored in the database.ProcessDefinitionEntity
getPreviousDefinition()
String
getPreviousProcessDefinitionId()
String
getResourceName()
name ofthe resource
of this definitionint
getRevision()
int
getRevisionNext()
FormDefinition
getStartFormDefinition()
StartFormHandler
getStartFormHandler()
int
getSuspensionState()
Map<String,TaskDefinition>
getTaskDefinitions()
String
getTenantId()
The id of the tenant this definition belongs to.int
getVersion()
version of this definitionString
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(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(String category)
void
setDeploymentId(String deploymentId)
void
setDiagramResourceName(String diagramResourceName)
void
setGraphicalNotationDefined(boolean isGraphicalNotationDefined)
void
setHasStartFormKey(boolean hasStartFormKey)
void
setHistoryLevel(Integer historyLevel)
void
setHistoryTimeToLive(Integer historyTimeToLive)
void
setId(String id)
void
setKey(String key)
protected void
setPreviousProcessDefinitionId(String previousProcessDefinitionId)
void
setResourceName(String resourceName)
void
setRevision(int revision)
void
setStartableInTasklist(boolean isStartableInTasklist)
void
setStartFormDefinition(FormDefinition startFormDefinition)
void
setStartFormHandler(StartFormHandler startFormHandler)
void
setStartFormKey(boolean hasStartFormKey)
void
setSuspensionState(int suspensionState)
void
setTaskDefinitions(Map<String,TaskDefinition> taskDefinitions)
void
setTenantId(String tenantId)
void
setVersion(int version)
void
setVersionTag(String versionTag)
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 String key
-
revision
protected int revision
-
version
protected int version
-
category
protected String category
-
deploymentId
protected String deploymentId
-
resourceName
protected String resourceName
-
historyLevel
protected Integer historyLevel
-
startFormHandler
protected StartFormHandler startFormHandler
-
startFormDefinition
protected FormDefinition startFormDefinition
-
diagramResourceName
protected String diagramResourceName
-
isGraphicalNotationDefined
protected boolean isGraphicalNotationDefined
-
taskDefinitions
protected Map<String,TaskDefinition> taskDefinitions
-
hasStartFormKey
protected boolean hasStartFormKey
-
suspensionState
protected int suspensionState
-
tenantId
protected String tenantId
-
versionTag
protected String versionTag
-
historyTimeToLive
protected Integer historyTimeToLive
-
isIdentityLinksInitialized
protected boolean isIdentityLinksInitialized
-
definitionIdentityLinkEntities
protected List<IdentityLinkEntity> definitionIdentityLinkEntities
-
candidateStarterUserIdExpressions
protected Set<Expression> candidateStarterUserIdExpressions
-
candidateStarterGroupIdExpressions
protected Set<Expression> candidateStarterGroupIdExpressions
-
isStartableInTasklist
protected boolean isStartableInTasklist
-
firstVersion
protected boolean firstVersion
-
previousProcessDefinitionId
protected 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(String businessKey)
- Specified by:
createProcessInstance
in interfacePvmProcessDefinition
- Overrides:
createProcessInstance
in classProcessDefinitionImpl
-
createProcessInstance
public ExecutionEntity createProcessInstance(String businessKey, String caseInstanceId)
- Specified by:
createProcessInstance
in interfacePvmProcessDefinition
- Overrides:
createProcessInstance
in classProcessDefinitionImpl
-
createProcessInstance
public ExecutionEntity createProcessInstance(String businessKey, ActivityImpl initial)
- Overrides:
createProcessInstance
in classProcessDefinitionImpl
-
newProcessInstance
protected PvmExecutionImpl newProcessInstance()
- Overrides:
newProcessInstance
in classProcessDefinitionImpl
-
createProcessInstance
public ExecutionEntity createProcessInstance(String businessKey, String caseInstanceId, ActivityImpl initial)
- Overrides:
createProcessInstance
in classProcessDefinitionImpl
-
addIdentityLink
public IdentityLinkEntity addIdentityLink(String userId, String groupId)
-
getIdentityLinks
public List<IdentityLinkEntity> getIdentityLinks()
-
toString
public 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(String processDefinitionId)
Returns the cached version if exists; does not update the entity from the database in that case
-
getPreviousProcessDefinitionId
public String getPreviousProcessDefinitionId()
-
resetPreviousProcessDefinitionId
protected void resetPreviousProcessDefinitionId()
-
setPreviousProcessDefinitionId
protected void setPreviousProcessDefinitionId(String previousProcessDefinitionId)
-
ensurePreviousProcessDefinitionIdInitialized
protected void ensurePreviousProcessDefinitionIdInitialized()
-
getPersistentState
public 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 String getKey()
Description copied from interface:ResourceDefinition
unique name for all versions this definition- Specified by:
getKey
in interfaceResourceDefinition
-
setKey
public void setKey(String key)
- Specified by:
setKey
in interfaceResourceDefinitionEntity<ProcessDefinitionEntity>
-
getDescription
public 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 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(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(String id)
- Specified by:
setId
in interfaceDbEntity
- Specified by:
setId
in interfaceResourceDefinitionEntity<ProcessDefinitionEntity>
- Overrides:
setId
in classCoreModelElement
-
getResourceName
public String getResourceName()
Description copied from interface:ResourceDefinition
name ofthe resource
of this definition- Specified by:
getResourceName
in interfaceResourceDefinition
-
setResourceName
public void setResourceName(String resourceName)
- Specified by:
setResourceName
in interfaceResourceDefinitionEntity<ProcessDefinitionEntity>
-
getHistoryLevel
public Integer getHistoryLevel()
-
setHistoryLevel
public void setHistoryLevel(Integer historyLevel)
-
getStartFormHandler
public StartFormHandler getStartFormHandler()
-
setStartFormHandler
public void setStartFormHandler(StartFormHandler startFormHandler)
-
getStartFormDefinition
public FormDefinition getStartFormDefinition()
-
setStartFormDefinition
public void setStartFormDefinition(FormDefinition startFormDefinition)
-
getTaskDefinitions
public Map<String,TaskDefinition> getTaskDefinitions()
-
setTaskDefinitions
public void setTaskDefinitions(Map<String,TaskDefinition> taskDefinitions)
-
getCategory
public 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(String category)
- Specified by:
setCategory
in interfaceResourceDefinitionEntity<ProcessDefinitionEntity>
-
getDiagramResourceName
public 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(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 Set<Expression> getCandidateStarterUserIdExpressions()
-
addCandidateStarterUserIdExpression
public void addCandidateStarterUserIdExpression(Expression userId)
-
getCandidateStarterGroupIdExpressions
public Set<Expression> getCandidateStarterGroupIdExpressions()
-
addCandidateStarterGroupIdExpression
public void addCandidateStarterGroupIdExpression(Expression groupId)
-
getTenantId
public 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(String tenantId)
- Specified by:
setTenantId
in interfaceResourceDefinitionEntity<ProcessDefinitionEntity>
-
getVersionTag
public String getVersionTag()
Description copied from interface:ProcessDefinition
Version tag of the process definition.- Specified by:
getVersionTag
in interfaceProcessDefinition
-
setVersionTag
public void setVersionTag(String versionTag)
-
getHistoryTimeToLive
public 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(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)
-
-