org.jbpm.pvm
Interface ProcessDefinition

All Superinterfaces:
CompositeElement, ObservableElement, ProcessElement, java.io.Serializable
All Known Implementing Classes:
ProcessDefinitionImpl

public interface ProcessDefinition
extends CompositeElement

a graph (or tree) structure that can be executed.

Purpose

ProcessDefinition is a base implementation that can be leveraged to build graph based execution languages. While the ProcessDefinition class is concrete and can be used as-is (e.g. by aggregation), most likely processDefinition languages will inherit from this ProcessDefinition and create more specialized implementations.

The specialized processDefinition language classes can extend this ProcessDefinition with new datastructures relevant for that perticular processDefinition language.

Structure

A processDefinition contains a set of nodes. Nodes can be connected with transitions or nodes can have nested nodes. But the transitions and nested nodes can be combined.

Execution

To create a new execution for a given processDefinition, see startExecution().

Author:
Tom Baeyens

Field Summary
static java.lang.String EVENT_PROCESS_END
           
static java.lang.String EVENT_PROCESS_START
           
 
Method Summary
 java.util.Date getDeploymentTime()
          time this process definition got deployed.
 Node getInitial()
          the initial node that will be executed when a new process starts.
 java.lang.String getPackageName()
          the package name of this process.
 java.util.List<VariableDefinition> getVariableDefinitions()
          variable declarations.
 int getVersion()
          automatically assigned during deployment of a process that represents the sequence number for process definitions with the same name.
 Execution startExecution()
          start a new main path of execution for this process definition
 Execution startExecution(java.util.Map<java.lang.String,java.lang.Object> variables)
          start a new main path of execution for this process definition.
 Execution startExecution(java.lang.String key)
          start a new main path of execution for this process definition.
 Execution startExecution(java.lang.String key, java.util.Map<java.lang.String,java.lang.Object> variables)
          start a new main path of execution for this process definition.
 
Methods inherited from interface org.jbpm.pvm.CompositeElement
findNode, getNode, getNodes, getNodesMap, hasNode, hasNodes
 
Methods inherited from interface org.jbpm.pvm.ObservableElement
getDescription, getEvent, getEvents, getName, getParent, hasEvent
 
Methods inherited from interface org.jbpm.pvm.ProcessElement
getDbid, getExceptionHandlers, getProcessDefinition, getProperty, getPropertyKeys
 

Field Detail

EVENT_PROCESS_START

static final java.lang.String EVENT_PROCESS_START
See Also:
Constant Field Values

EVENT_PROCESS_END

static final java.lang.String EVENT_PROCESS_END
See Also:
Constant Field Values
Method Detail

getPackageName

java.lang.String getPackageName()
the package name of this process. This is a similar way of grouping and creating a structure as in Java. We recommend the same conventions as with Java package names.


getVersion

int getVersion()
automatically assigned during deployment of a process that represents the sequence number for process definitions with the same name.


startExecution

Execution startExecution()
start a new main path of execution for this process definition


startExecution

Execution startExecution(java.util.Map<java.lang.String,java.lang.Object> variables)
start a new main path of execution for this process definition.

Parameters:
variables - is a set of variables that is set as process variables before the process actually starts executing.

startExecution

Execution startExecution(java.lang.String key)
start a new main path of execution for this process definition.

Parameters:
key - is a user defined identifier for this new execution which has to be unique within the scope of this process definition.

startExecution

Execution startExecution(java.lang.String key,
                         java.util.Map<java.lang.String,java.lang.Object> variables)
start a new main path of execution for this process definition.

Parameters:
key - is a user defined identifier for this new execution which has to be unique within the scope of this process definition.
variables - is a set of variables that is set as process variables before the process actually starts executing.

getInitial

Node getInitial()
the initial node that will be executed when a new process starts.


getVariableDefinitions

java.util.List<VariableDefinition> getVariableDefinitions()
variable declarations.


getDeploymentTime

java.util.Date getDeploymentTime()
time this process definition got deployed.