org.jbpm.pvm.internal.model
Class ProcessDefinitionImpl

java.lang.Object
  extended by org.jbpm.pvm.internal.model.ProcessElementImpl
      extended by org.jbpm.pvm.internal.model.ObservableElementImpl
          extended by org.jbpm.pvm.internal.model.ScopeElementImpl
              extended by org.jbpm.pvm.internal.model.CompositeElementImpl
                  extended by org.jbpm.pvm.internal.model.ProcessDefinitionImpl
All Implemented Interfaces:
java.io.Serializable, ProcessDefinition, ClientProcessDefinition, CompositeElement, ObservableElement, OpenProcessDefinition
Direct Known Subclasses:
LifeCycle

public class ProcessDefinitionImpl
extends CompositeElementImpl
implements OpenProcessDefinition, ClientProcessDefinition

Author:
Tom Baeyens
See Also:
Serialized Form

Field Summary
protected  long deploymentDbid
          ref to the deployment
protected  java.util.Date deploymentTime
          time this process was deployed
protected  java.lang.String id
          the unique id (e.g. combination of name and versionnumber) for this process definition.
protected  java.lang.String imageResourceName
           
protected  ActivityImpl initial
          the activity which is executed when the process starts
protected  boolean isSuspended
          propagated from deployment to process definition during deploy
protected  java.lang.String key
          user provided short reference for the process definition that has the same scope as the name.
protected  java.lang.String packageName
          optional package name similar to the Java package name.
protected  java.util.Map<java.lang.String,TaskDefinitionImpl> taskDefinitions
           
static int UNASSIGNED_VERSION
           
protected  int version
          the version number of the process definitions with the same name.
 
Fields inherited from class org.jbpm.pvm.internal.model.CompositeElementImpl
activities, activitiesMap
 
Fields inherited from class org.jbpm.pvm.internal.model.ScopeElementImpl
timerDefinitions, variableDefinitions
 
Fields inherited from class org.jbpm.pvm.internal.model.ObservableElementImpl
description, events, name
 
Fields inherited from class org.jbpm.pvm.internal.model.ProcessElementImpl
dbid, dbversion, exceptionHandlers, processDefinition, properties
 
Constructor Summary
ProcessDefinitionImpl()
           
 
Method Summary
 void addTaskDefinitionImpl(TaskDefinitionImpl taskDefinition)
           
 ClientProcessInstance createProcessInstance()
          creates a new process instances.
 ClientProcessInstance createProcessInstance(java.lang.String key)
          creates a new process instances with a given key.
 ClientProcessInstance createProcessInstance(java.lang.String key, Execution superProcessExecution)
          creates a new process instances with a given key.
 java.lang.String getDeploymentId()
           
 java.util.Date getDeploymentTime()
           
 java.lang.String getId()
           
 java.lang.String getImageResourceName()
           
 ActivityImpl getInitial()
          the initial activity of this process definition
 java.lang.String getKey()
           
 java.lang.String getPackageName()
           
 TaskDefinitionImpl getTaskDefinition(java.lang.String name)
           
 int getVersion()
           
 boolean isSuspended()
           
protected  ExecutionImpl newProcessInstance()
           
 void setDeploymentDbid(long deploymentDbid)
           
 void setDeploymentTime(java.util.Date deploymentTime)
           
 void setId(java.lang.String id)
           
 void setImageResourceName(java.lang.String imageResourceName)
           
 void setInitial(ActivityImpl initial)
           
 void setKey(java.lang.String key)
           
 void setPackageName(java.lang.String packageName)
           
 void setSuspended(boolean isSuspended)
           
 void setVersion(int version)
           
 ClientProcessInstance startProcessInstance()
          creates the process instance and immediately start its execution.
 ClientProcessInstance startProcessInstance(java.lang.String key)
          creates the process instance with the given key and immediately start its execution.
 java.lang.String toString()
           
 
Methods inherited from class org.jbpm.pvm.internal.model.CompositeElementImpl
addActivity, createActivity, createActivity, findActivity, getActivities, getActivitiesMap, getActivity, hasActivities, hasActivity, removeActivity
 
Methods inherited from class org.jbpm.pvm.internal.model.ScopeElementImpl
addTimerDefinition, createTimerDefinition, createVariableDefinition, getTimerDefinitions, getVariableDefinitions, hasTimerDefinitions, hasVariableDefinitions, isLocalScope
 
Methods inherited from class org.jbpm.pvm.internal.model.ObservableElementImpl
addEvent, createEvent, getDescription, getEvent, getEvents, getName, getParent, hasEvent, setDescription, setName
 
Methods inherited from class org.jbpm.pvm.internal.model.ProcessElementImpl
addExceptionHandler, addProperty, createExceptionHandler, getDbid, getExceptionHandlers, getProcessDefinition, getProperties, getProperty, getPropertyKeys, setExceptionHandlers, setProcessDefinition, setProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jbpm.api.ProcessDefinition
getDescription, getName
 
Methods inherited from interface org.jbpm.pvm.internal.model.CompositeElement
findActivity, getActivities, getActivitiesMap, getActivity, hasActivities, hasActivity
 
Methods inherited from interface org.jbpm.pvm.internal.model.ObservableElement
getDbid, getName, getParent, getProcessDefinition, getProperty, getPropertyKeys, hasEvent
 

Field Detail

UNASSIGNED_VERSION

public static final int UNASSIGNED_VERSION
See Also:
Constant Field Values

key

protected java.lang.String key
user provided short reference for the process definition that has the same scope as the name. Multiple versions of the same process can have the same key. The key is used to build the globally unique execution ids.


id

protected java.lang.String id
the unique id (e.g. combination of name and versionnumber) for this process definition.


version

protected int version
the version number of the process definitions with the same name.


packageName

protected java.lang.String packageName
optional package name similar to the Java package name.


deploymentTime

protected java.util.Date deploymentTime
time this process was deployed


deploymentDbid

protected long deploymentDbid
ref to the deployment


isSuspended

protected boolean isSuspended
propagated from deployment to process definition during deploy


initial

protected ActivityImpl initial
the activity which is executed when the process starts


taskDefinitions

protected java.util.Map<java.lang.String,TaskDefinitionImpl> taskDefinitions

imageResourceName

protected java.lang.String imageResourceName
Constructor Detail

ProcessDefinitionImpl

public ProcessDefinitionImpl()
Method Detail

createProcessInstance

public ClientProcessInstance createProcessInstance()
Description copied from interface: ClientProcessDefinition
creates a new process instances. The returned process instance is not started yet. This way, variables can be set before execution is started. Invoke ClientProcessInstance.start() to start execution of the process.

Specified by:
createProcessInstance in interface ClientProcessDefinition

createProcessInstance

public ClientProcessInstance createProcessInstance(java.lang.String key)
Description copied from interface: ClientProcessDefinition
creates a new process instances with a given key. The returned process instance is not started yet. This way, variables can be set before execution is started. Invoke ClientProcessInstance.start() to start execution of the process.

Specified by:
createProcessInstance in interface ClientProcessDefinition
Parameters:
key - is a user provided reference that uniquely identifies this process instance in the scope of the process name.

createProcessInstance

public ClientProcessInstance createProcessInstance(java.lang.String key,
                                                   Execution superProcessExecution)
Description copied from interface: ClientProcessDefinition
creates a new process instances with a given key. The returned process instance is not started yet. This way, variables can be set before execution is started. Invoke ClientProcessInstance.start() to start execution of the process.

Specified by:
createProcessInstance in interface ClientProcessDefinition
Parameters:
key - is a user provided reference that uniquely identifies this process instance in the scope of the process name. key is allowed to be null.

startProcessInstance

public ClientProcessInstance startProcessInstance()
Description copied from interface: ClientProcessDefinition
creates the process instance and immediately start its execution.

Specified by:
startProcessInstance in interface ClientProcessDefinition

startProcessInstance

public ClientProcessInstance startProcessInstance(java.lang.String key)
Description copied from interface: ClientProcessDefinition
creates the process instance with the given key and immediately start its execution.

Specified by:
startProcessInstance in interface ClientProcessDefinition
Parameters:
key - is a user provided reference that uniquely identifies this process instance in the scope of the process name.

newProcessInstance

protected ExecutionImpl newProcessInstance()

addTaskDefinitionImpl

public void addTaskDefinitionImpl(TaskDefinitionImpl taskDefinition)

getTaskDefinition

public TaskDefinitionImpl getTaskDefinition(java.lang.String name)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getDeploymentId

public java.lang.String getDeploymentId()
Specified by:
getDeploymentId in interface ProcessDefinition

getInitial

public ActivityImpl getInitial()
Description copied from interface: OpenProcessDefinition
the initial activity of this process definition

Specified by:
getInitial in interface OpenProcessDefinition

setInitial

public void setInitial(ActivityImpl initial)

getVersion

public int getVersion()
Specified by:
getVersion in interface ProcessDefinition

setVersion

public void setVersion(int version)

getDeploymentTime

public java.util.Date getDeploymentTime()

setDeploymentTime

public void setDeploymentTime(java.util.Date deploymentTime)

getPackageName

public java.lang.String getPackageName()

setPackageName

public void setPackageName(java.lang.String packageName)

getKey

public java.lang.String getKey()
Specified by:
getKey in interface ProcessDefinition

setKey

public void setKey(java.lang.String key)

getId

public java.lang.String getId()
Specified by:
getId in interface ProcessDefinition

setId

public void setId(java.lang.String id)

setDeploymentDbid

public void setDeploymentDbid(long deploymentDbid)

getImageResourceName

public java.lang.String getImageResourceName()
Specified by:
getImageResourceName in interface ProcessDefinition

setImageResourceName

public void setImageResourceName(java.lang.String imageResourceName)

isSuspended

public boolean isSuspended()
Specified by:
isSuspended in interface ProcessDefinition

setSuspended

public void setSuspended(boolean isSuspended)


Copyright © 2010 JBoss Community. All Rights Reserved.