org.camunda.bpm.engine.impl.persistence.entity
Class ProcessDefinitionEntity

java.lang.Object
  extended by org.camunda.bpm.engine.impl.core.model.CoreModelElement
      extended by org.camunda.bpm.engine.impl.core.model.CoreActivity
          extended by org.camunda.bpm.engine.impl.pvm.process.ScopeImpl
              extended by org.camunda.bpm.engine.impl.pvm.process.ProcessDefinitionImpl
                  extended by 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
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  String key
           
protected static EnginePersistenceLogger LOG
           
protected  String previousProcessDefinitionId
           
protected  String resourceName
           
protected  int revision
           
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
ProcessDefinitionEntity()
           
 
Method Summary
 void addCandidateStarterGroupIdExpression(Expression groupId)
           
 void addCandidateStarterUserIdExpression(Expression userId)
           
 IdentityLinkEntity addIdentityLink(String userId, String groupId)
           
 ExecutionEntity createProcessInstance()
           
 ExecutionEntity createProcessInstance(String businessKey)
           
 ExecutionEntity createProcessInstance(String businessKey, ActivityImpl initial)
           
 ExecutionEntity createProcessInstance(String businessKey, String caseInstanceId)
           
 ExecutionEntity createProcessInstance(String businessKey, String caseInstanceId, 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 element
 String getDeploymentId()
          The deployment in which this definition is contained.
 String getDescription()
          description of this process
 String getDiagramResourceName()
          The diagram resource name for this definition if exist
 boolean getHasStartFormKey()
           
 Integer getHistoryLevel()
           
 Integer getHistoryTimeToLive()
          History time to live.
 List<IdentityLinkEntity> getIdentityLinks()
           
 String getKey()
          unique name for all versions this definition
 Object getPersistentState()
          Returns a representation of the object, as would be stored in the database.
 ProcessDefinitionEntity getPreviousDefinition()
           
protected  String getPreviousProcessDefinitionId()
           
 String getResourceName()
          name of the resource of this definition
 int getRevision()
           
 int getRevisionNext()
           
 StartFormHandler getStartFormHandler()
           
 int getSuspensionState()
           
 Map<String,TaskDefinition> getTaskDefinitions()
           
 String getTenantId()
          The id of the tenant this definition belongs to.
 int getVersion()
          version of this definition
 String getVersionTag()
          Version tag of the process definition.
 boolean hasStartFormKey()
          Does this process definition has a start form key.
 boolean isGraphicalNotationDefined()
           
 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 case
protected  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 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.repository.ResourceDefinitionEntity
setName
 
Methods inherited from interface org.camunda.bpm.engine.repository.ResourceDefinition
getId, getName
 
Methods inherited from interface org.camunda.bpm.engine.impl.db.DbEntity
getId
 
Methods inherited from interface org.camunda.bpm.engine.impl.pvm.ReadOnlyProcessDefinition
getName
 
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.PvmProcessElement
getId, getProcessDefinition, getProperties, getProperty
 

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

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

firstVersion

protected boolean firstVersion

previousProcessDefinitionId

protected String previousProcessDefinitionId
Constructor Detail

ProcessDefinitionEntity

public ProcessDefinitionEntity()
Method Detail

ensureNotSuspended

protected void ensureNotSuspended()

createProcessInstance

public ExecutionEntity createProcessInstance()
Specified by:
createProcessInstance in interface PvmProcessDefinition
Overrides:
createProcessInstance in class ProcessDefinitionImpl

createProcessInstance

public ExecutionEntity createProcessInstance(String businessKey)
Specified by:
createProcessInstance in interface PvmProcessDefinition
Overrides:
createProcessInstance in class ProcessDefinitionImpl

createProcessInstance

public ExecutionEntity createProcessInstance(String businessKey,
                                             String caseInstanceId)
Specified by:
createProcessInstance in interface PvmProcessDefinition
Overrides:
createProcessInstance in class ProcessDefinitionImpl

createProcessInstance

public ExecutionEntity createProcessInstance(String businessKey,
                                             ActivityImpl initial)
Overrides:
createProcessInstance in class ProcessDefinitionImpl

newProcessInstance

protected PvmExecutionImpl newProcessInstance()
Overrides:
newProcessInstance in class ProcessDefinitionImpl

createProcessInstance

public ExecutionEntity createProcessInstance(String businessKey,
                                             String caseInstanceId,
                                             ActivityImpl initial)
Overrides:
createProcessInstance in class ProcessDefinitionImpl

addIdentityLink

public IdentityLinkEntity addIdentityLink(String userId,
                                          String groupId)

deleteIdentityLink

public void deleteIdentityLink(String userId,
                               String groupId)

getIdentityLinks

public List<IdentityLinkEntity> getIdentityLinks()

toString

public String toString()
Overrides:
toString in class ProcessDefinitionImpl

updateModifiableFieldsFromEntity

public void updateModifiableFieldsFromEntity(ProcessDefinitionEntity updatingProcessDefinition)
Updates all modifiable fields from another process definition entity.

Specified by:
updateModifiableFieldsFromEntity in interface ResourceDefinitionEntity<ProcessDefinitionEntity>
Parameters:
updatingProcessDefinition -

getPreviousDefinition

public ProcessDefinitionEntity getPreviousDefinition()
Specified by:
getPreviousDefinition in interface ResourceDefinitionEntity<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

protected 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 interface DbEntity

getKey

public String getKey()
Description copied from interface: ResourceDefinition
unique name for all versions this definition

Specified by:
getKey in interface ResourceDefinition

setKey

public void setKey(String key)
Specified by:
setKey in interface ResourceDefinitionEntity<ProcessDefinitionEntity>

getDescription

public String getDescription()
Description copied from interface: ProcessDefinition
description of this process

Specified by:
getDescription in interface ReadOnlyProcessDefinition
Specified by:
getDescription in interface ProcessDefinition
Overrides:
getDescription in class ProcessDefinitionImpl

getDeploymentId

public String getDeploymentId()
Description copied from interface: ResourceDefinition
The deployment in which this definition is contained.

Specified by:
getDeploymentId in interface PvmProcessDefinition
Specified by:
getDeploymentId in interface ResourceDefinition
Overrides:
getDeploymentId in class ProcessDefinitionImpl

setDeploymentId

public void setDeploymentId(String deploymentId)
Specified by:
setDeploymentId in interface ResourceDefinitionEntity<ProcessDefinitionEntity>

getVersion

public int getVersion()
Description copied from interface: ResourceDefinition
version of this definition

Specified by:
getVersion in interface ResourceDefinition

setVersion

public void setVersion(int version)
Specified by:
setVersion in interface ResourceDefinitionEntity<ProcessDefinitionEntity>

setId

public void setId(String id)
Specified by:
setId in interface DbEntity
Specified by:
setId in interface ResourceDefinitionEntity<ProcessDefinitionEntity>
Overrides:
setId in class CoreModelElement

getResourceName

public String getResourceName()
Description copied from interface: ResourceDefinition
name of the resource of this definition

Specified by:
getResourceName in interface ResourceDefinition

setResourceName

public void setResourceName(String resourceName)
Specified by:
setResourceName in interface ResourceDefinitionEntity<ProcessDefinitionEntity>

getHistoryLevel

public Integer getHistoryLevel()

setHistoryLevel

public void setHistoryLevel(Integer historyLevel)

getStartFormHandler

public StartFormHandler getStartFormHandler()

setStartFormHandler

public void setStartFormHandler(StartFormHandler startFormHandler)

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 interface ResourceDefinition

setCategory

public void setCategory(String category)
Specified by:
setCategory in interface ResourceDefinitionEntity<ProcessDefinitionEntity>

getDiagramResourceName

public String getDiagramResourceName()
Description copied from interface: ResourceDefinition
The diagram resource name for this definition if exist

Specified by:
getDiagramResourceName in interface ReadOnlyProcessDefinition
Specified by:
getDiagramResourceName in interface ResourceDefinition
Overrides:
getDiagramResourceName in class ProcessDefinitionImpl

setDiagramResourceName

public void setDiagramResourceName(String diagramResourceName)
Specified by:
setDiagramResourceName in interface ResourceDefinitionEntity<ProcessDefinitionEntity>

hasStartFormKey

public boolean hasStartFormKey()
Description copied from interface: ProcessDefinition
Does this process definition has a start form key.

Specified by:
hasStartFormKey in interface ProcessDefinition

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 interface HasDbRevision

setRevision

public void setRevision(int revision)
Specified by:
setRevision in interface HasDbRevision

getRevisionNext

public int getRevisionNext()
Specified by:
getRevisionNext in interface HasDbRevision

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 interface ProcessDefinition

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 be null if the definition belongs to no single tenant.

Specified by:
getTenantId in interface ResourceDefinition

setTenantId

public void setTenantId(String tenantId)
Specified by:
setTenantId in interface ResourceDefinitionEntity<ProcessDefinitionEntity>

getVersionTag

public String getVersionTag()
Description copied from interface: ProcessDefinition
Version tag of the process definition.

Specified by:
getVersionTag in interface ProcessDefinition

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 interface ResourceDefinition

setHistoryTimeToLive

public void setHistoryTimeToLive(Integer historyTimeToLive)


Copyright © 2017 camunda services GmbH. All rights reserved.