|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jbpm.graph.def.GraphElement
org.jbpm.graph.def.ProcessDefinition
public class ProcessDefinition
| Field Summary | |
|---|---|
protected Map |
actions
|
protected Map |
definitions
|
protected boolean |
isTerminationImplicit
|
protected List |
nodes
|
protected Node |
startState
|
static String[] |
supportedEventTypes
Deprecated. arrays are mutable and thus vulnerable to external manipulation. use getSupportedEventTypes() instead |
protected int |
version
|
| Fields inherited from class org.jbpm.graph.def.GraphElement |
|---|
description, events, exceptionHandlers, name, processDefinition |
| Constructor Summary | |
|---|---|
ProcessDefinition()
|
|
ProcessDefinition(String name)
|
|
ProcessDefinition(String[] nodes,
String[] transitions)
|
|
| Method Summary | |
|---|---|
Action |
addAction(Action action)
creates a bidirectional relation between this process definition and the given action. |
ModuleDefinition |
addDefinition(ModuleDefinition moduleDefinition)
|
Node |
addNode(Node node)
adds the given node to this node-collection. |
Object |
createInstance()
|
static ProcessDefinition |
createNewProcessDefinition()
|
ProcessInstance |
createProcessInstance()
|
ProcessInstance |
createProcessInstance(Map variables)
|
ProcessInstance |
createProcessInstance(Map variables,
String businessKey)
|
boolean |
equals(Object o)
Tells whether this process definition is equal to the given object. |
static Node |
findNode(NodeCollection nodeCollection,
String hierarchicalName)
|
Node |
findNode(String hierarchicalName)
finds the node by the given hierarchical name. |
String |
generateNodeName()
generates a new name for a node to be added to this collection. |
static String |
generateNodeName(List nodes)
|
Action |
getAction(String name)
|
Map |
getActions()
|
ContextDefinition |
getContextDefinition()
|
ModuleDefinition |
getDefinition(Class clazz)
|
Map |
getDefinitions()
|
FileDefinition |
getFileDefinition()
|
Node |
getNode(String name)
retrieves a node by name. |
List |
getNodes()
is the ordered list of nodes. |
Map |
getNodesMap()
maps node-names to nodes. |
GraphElement |
getParent()
|
Node |
getStartState()
|
String[] |
getSupportedEventTypes()
indicative set of event types supported by this graph element. |
TaskMgmtDefinition |
getTaskMgmtDefinition()
|
int |
getVersion()
|
boolean |
hasActions()
|
int |
hashCode()
Computes the hash code for this process definition. |
boolean |
hasNode(String name)
is true if this node-collection contains a node with the given name, false otherwise. |
boolean |
isTerminationImplicit()
|
static ProcessDefinition |
parseParResource(String parResource)
parse a process definition from a process archive resource. |
static ProcessDefinition |
parseParZipInputStream(ZipInputStream zipInputStream)
parse a process definition from a process archive zip-stream. |
static ProcessDefinition |
parseXmlInputStream(InputStream inputStream)
parse a process definition from an xml input stream. |
static ProcessDefinition |
parseXmlReader(Reader reader)
parse a process definition from an xml reader. |
static ProcessDefinition |
parseXmlResource(String xmlResource)
parse a process definition from an xml resource file. |
static ProcessDefinition |
parseXmlString(String xml)
parse a process definition from an xml string. |
void |
removeAction(Action action)
removes the bidirectional relation between this process definition and the given action. |
ModuleDefinition |
removeDefinition(ModuleDefinition moduleDefinition)
|
Node |
removeNode(Node node)
removes the given node from this node-collection. |
void |
reorderNode(int oldIndex,
int newIndex)
changes the order of the nodes : the node on oldIndex is removed and inserted in the newIndex. |
void |
setDefinitions(Map definitions)
|
void |
setProcessDefinition(ProcessDefinition processDefinition)
|
void |
setStartState(Node startState)
|
void |
setStartState(StartState startState)
|
void |
setTerminationImplicit(boolean isTerminationImplicit)
|
void |
setVersion(int version)
Sets the version of this process. |
| Methods inherited from class org.jbpm.graph.def.GraphElement |
|---|
addEvent, addExceptionHandler, createAsyncActionExecutionJob, executeAction, findExceptionHandler, fireAndPropagateEvent, fireEvent, getDescription, getEvent, getEvents, getExceptionHandlers, getId, getName, getParentChain, getParents, getProcessDefinition, hasEvent, hasEvents, raiseException, removeEvent, removeExceptionHandler, reorderExceptionHandler, setDescription, setName, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int version
protected boolean isTerminationImplicit
protected Node startState
protected List nodes
protected Map actions
protected Map definitions
public static final String[] supportedEventTypes
getSupportedEventTypes() instead| Constructor Detail |
|---|
public ProcessDefinition()
public ProcessDefinition(String name)
public ProcessDefinition(String[] nodes,
String[] transitions)
| Method Detail |
|---|
public String[] getSupportedEventTypes()
GraphElement
getSupportedEventTypes in class GraphElementpublic static ProcessDefinition createNewProcessDefinition()
public ProcessInstance createProcessInstance()
public ProcessInstance createProcessInstance(Map variables)
public ProcessInstance createProcessInstance(Map variables,
String businessKey)
public void setProcessDefinition(ProcessDefinition processDefinition)
setProcessDefinition in class GraphElementpublic boolean equals(Object o)
equals in class GraphElementpublic int hashCode()
hashCode in class GraphElementpublic static ProcessDefinition parseXmlString(String xml)
JpdlException - if parsing reported an error.public static ProcessDefinition parseXmlResource(String xmlResource)
JpdlException - if parsing reported an error.public static ProcessDefinition parseXmlInputStream(InputStream inputStream)
JpdlException - if parsing reported an error.public static ProcessDefinition parseXmlReader(Reader reader)
JpdlException - if parsing reported an error.
public static ProcessDefinition parseParZipInputStream(ZipInputStream zipInputStream)
throws IOException
JpdlException - if parsing reported an error.
IOException
public static ProcessDefinition parseParResource(String parResource)
throws IOException
JpdlException - if parsing reported an error.
IOExceptionpublic List getNodes()
NodeCollection
getNodes in interface NodeCollectionpublic Map getNodesMap()
NodeCollection
getNodesMap in interface NodeCollectionpublic Node getNode(String name)
NodeCollection
getNode in interface NodeCollectionpublic boolean hasNode(String name)
NodeCollection
hasNode in interface NodeCollectionpublic Node addNode(Node node)
NodeCollection
addNode in interface NodeCollectionpublic Node removeNode(Node node)
NodeCollection
removeNode in interface NodeCollection
public void reorderNode(int oldIndex,
int newIndex)
NodeCollection
reorderNode in interface NodeCollectionpublic String generateNodeName()
NodeCollection
generateNodeName in interface NodeCollectionpublic Node findNode(String hierarchicalName)
NodeCollection
findNode in interface NodeCollectionpublic static String generateNodeName(List nodes)
public static Node findNode(NodeCollection nodeCollection,
String hierarchicalName)
public void setStartState(StartState startState)
public GraphElement getParent()
getParent in class GraphElementpublic Action addAction(Action action)
IllegalArgumentException - if action is null or if action.getName() is null.public void removeAction(Action action)
IllegalArgumentException - if action is null or if the action was not present in the
actions of this process definition.public Action getAction(String name)
public Map getActions()
public boolean hasActions()
public Object createInstance()
public ModuleDefinition addDefinition(ModuleDefinition moduleDefinition)
public ModuleDefinition removeDefinition(ModuleDefinition moduleDefinition)
public ModuleDefinition getDefinition(Class clazz)
public ContextDefinition getContextDefinition()
public FileDefinition getFileDefinition()
public TaskMgmtDefinition getTaskMgmtDefinition()
public Map getDefinitions()
public void setDefinitions(Map definitions)
public int getVersion()
public void setVersion(int version)
version - the version to assign. Automatic versioning starts from 1. Any negative
value is regarded as an unknown or null version. The meaning of version 0 is
undefined.public Node getStartState()
public void setStartState(Node startState)
public boolean isTerminationImplicit()
public void setTerminationImplicit(boolean isTerminationImplicit)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||