Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jbpm.graph.def
Class ProcessDefinition

    java.lang.Object
      org.jbpm.graph.def.GraphElement
          org.jbpm.graph.def.ProcessDefinition

All Implemented Interfaces:
  java.io.Serializable, NodeCollection

    public class ProcessDefinition

extends GraphElement
implements NodeCollection

See Also:
  Serialized Form

Field Summary
`protected java.util.Map` | `actions`
`protected java.util.Map` | `definitions`
`protected boolean` | `isTerminationImplicit`
`protected java.util.List` | `nodes`
`protected Node` | `startState`
`static java.lang.String[]` | `supportedEventTypes`
`protected int` | `version`

Fields inherited from class org.jbpm.graph.def.GraphElement
`description, events, exceptionHandlers, name, processDefinition`

Constructor Summary
`ProcessDefinition()`
`ProcessDefinition(java.lang.String name)`
`ProcessDefinition(java.lang.String[] nodes, java.lang.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.
`java.lang.Object` | `createInstance()`
`static ProcessDefinition` | `createNewProcessDefinition()`
`ProcessInstance` | `createProcessInstance()`
`static Node` | `findNode(NodeCollection nodeCollection, java.lang.String hierarchicalName)`
`Node` | `findNode(java.lang.String hierarchicalName)` finds the node by the given hierarchical name.
`java.lang.String` | `generateNodeName()` generates a new name for a node to be added to this collection.
`static java.lang.String` | `generateNodeName(java.util.List nodes)`
`Action` | `getAction(java.lang.String name)`
`java.util.Map` | `getActions()`
`ContextDefinition` | `getContextDefinition()`
`ModuleDefinition` | `getDefinition(java.lang.Class clazz)`
`java.util.Map` | `getDefinitions()`
`FileDefinition` | `getFileDefinition()`
`Node` | `getNode(java.lang.String name)` retrieves a node by name.
`java.util.List` | `getNodes()` is the ordered list of nodes.
`java.util.Map` | `getNodesMap()` maps node-names to nodes.
`GraphElement` | `getParent()`
`Node` | `getStartState()`
`java.lang.String[]` | `getSupportedEventTypes()` indicative set of event types supported by this graph element.
`TaskMgmtDefinition` | `getTaskMgmtDefinition()`
`int` | `getVersion()`
`boolean` | `hasActions()`
`boolean` | `hasNode(java.lang.String name)` is true if this node-collection contains a node with the given name, false otherwise.
`boolean` | `isTerminationImplicit()`
`static ProcessDefinition` | `parseParResource(java.lang.String parResource)` parse a process definition from a process archive resource.
`static ProcessDefinition` | `parseParZipInputStream(java.util.zip.ZipInputStream zipInputStream)` parse a process definition from a process archive zip-stream.
`static ProcessDefinition` | `parseXmlInputStream(java.io.InputStream inputStream)` parse a process definition from an xml input stream.
`static ProcessDefinition` | `parseXmlReader(java.io.Reader reader)` parse a process definition from an xml reader.
`static ProcessDefinition` | `parseXmlResource(java.lang.String xmlResource)` parse a process definition from an xml resource file.
`static ProcessDefinition` | `parseXmlString(java.lang.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(java.util.Map definitions)`
`void` | `setProcessDefinition(ProcessDefinition processDefinition)`
`void` | `setStartState(Node startState)`
`void` | `setStartState(StartState startState)`
`void` | `setTerminationImplicit(boolean isTerminationImplicit)`
`void` | `setVersion(int version)`

Methods inherited from class org.jbpm.graph.def.GraphElement
`addEvent, addExceptionHandler, createAsyncActionExecutionJob, equals, 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, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### version

    protected int version

### isTerminationImplicit

    protected boolean isTerminationImplicit

### startState

    protected Node startState

### nodes

    protected java.util.List nodes

### actions

    protected java.util.Map actions

### definitions

    protected java.util.Map definitions

### supportedEventTypes

    public static final java.lang.String[] supportedEventTypes

Constructor Detail

### ProcessDefinition

    public ProcessDefinition()

### ProcessDefinition

    public ProcessDefinition(java.lang.String name)

### ProcessDefinition

    public ProcessDefinition(java.lang.String[] nodes,
                             java.lang.String[] transitions)

Method Detail

### getSupportedEventTypes

    public java.lang.String[] getSupportedEventTypes()

  Description copied from class: `GraphElement`
  indicative set of event types supported by this graph element. this is currently only used by the process designer to know which event types to show on a given graph element. in process definitions and at runtime, there are no contstraints on the event-types.

  Specified by:
    `getSupportedEventTypes` in class `GraphElement`

### createNewProcessDefinition

    public static ProcessDefinition createNewProcessDefinition()

### createProcessInstance

    public ProcessInstance createProcessInstance()

### setProcessDefinition

    public void setProcessDefinition(ProcessDefinition processDefinition)

  Overrides:
    `setProcessDefinition` in class `GraphElement`

### parseXmlString

    public static ProcessDefinition parseXmlString(java.lang.String xml)

  parse a process definition from an xml string.

  Throws:
    `JpdlException` - if parsing reported an error.

### parseXmlResource

    public static ProcessDefinition parseXmlResource(java.lang.String xmlResource)

  parse a process definition from an xml resource file.

  Throws:
    `JpdlException` - if parsing reported an error.

### parseXmlInputStream

    public static ProcessDefinition parseXmlInputStream(java.io.InputStream inputStream)

  parse a process definition from an xml input stream.

  Throws:
    `JpdlException` - if parsing reported an error.

### parseXmlReader

    public static ProcessDefinition parseXmlReader(java.io.Reader reader)

  parse a process definition from an xml reader.

  Throws:
    `JpdlException` - if parsing reported an error.

### parseParZipInputStream

    public static ProcessDefinition parseParZipInputStream(java.util.zip.ZipInputStream zipInputStream)

  parse a process definition from a process archive zip-stream.

  Throws:
    `JpdlException` - if parsing reported an error.

### parseParResource

    public static ProcessDefinition parseParResource(java.lang.String parResource)

  parse a process definition from a process archive resource.

  Throws:
    `JpdlException` - if parsing reported an error.

### getNodes

    public java.util.List getNodes()

  Description copied from interface: `NodeCollection`
  is the ordered list of nodes.

  Specified by:
    `getNodes` in interface `NodeCollection`

### getNodesMap

    public java.util.Map getNodesMap()

  Description copied from interface: `NodeCollection`
  maps node-names to nodes. returns an empty map if no nodes are contained.

  Specified by:
    `getNodesMap` in interface `NodeCollection`

### getNode

    public Node getNode(java.lang.String name)

  Description copied from interface: `NodeCollection`
  retrieves a node by name.

  Specified by:
    `getNode` in interface `NodeCollection`
  Returns:
    the node or null if no such node is present.

### hasNode

    public boolean hasNode(java.lang.String name)

  Description copied from interface: `NodeCollection`
  is true if this node-collection contains a node with the given name, false otherwise.

  Specified by:
    `hasNode` in interface `NodeCollection`

### addNode

    public Node addNode(Node node)

  Description copied from interface: `NodeCollection`
  adds the given node to this node-collection.

  Specified by:
    `addNode` in interface `NodeCollection`
  Returns:
    the added node.

### removeNode

    public Node removeNode(Node node)

  Description copied from interface: `NodeCollection`
  removes the given node from this node-collection.

  Specified by:
    `removeNode` in interface `NodeCollection`
  Returns:
    the removed node or null if the node was not present in this collection.

### reorderNode

    public void reorderNode(int oldIndex,
                            int newIndex)

  Description copied from interface: `NodeCollection`
  changes the order of the nodes : the node on oldIndex is removed and inserted in the newIndex. All nodes inbetween the old and the new index shift one index position.

  Specified by:
    `reorderNode` in interface `NodeCollection`

### generateNodeName

    public java.lang.String generateNodeName()

  Description copied from interface: `NodeCollection`
  generates a new name for a node to be added to this collection.

  Specified by:
    `generateNodeName` in interface `NodeCollection`

### findNode

    public Node findNode(java.lang.String hierarchicalName)

  Description copied from interface: `NodeCollection`
  finds the node by the given hierarchical name. use .. for the parent, use slashes '/' to separate the node names.

  Specified by:
    `findNode` in interface `NodeCollection`

### generateNodeName

    public static java.lang.String generateNodeName(java.util.List nodes)

### findNode

    public static Node findNode(NodeCollection nodeCollection,
                                java.lang.String hierarchicalName)

### setStartState

    public void setStartState(StartState startState)

### getParent

    public GraphElement getParent()

  Overrides:
    `getParent` in class `GraphElement`

### addAction

    public Action addAction(Action action)

  creates a bidirectional relation between this process definition and the given action.

  Throws:
    `java.lang.IllegalArgumentException` - if action is null or if action.getName() is null.

### removeAction

    public void removeAction(Action action)

  removes the bidirectional relation between this process definition and the given action.

  Throws:
    `java.lang.IllegalArgumentException` - if action is null or if the action was not present in the actions of this process definition.

### getAction

    public Action getAction(java.lang.String name)

### getActions

    public java.util.Map getActions()

### hasActions

    public boolean hasActions()

### createInstance

    public java.lang.Object createInstance()

### addDefinition

    public ModuleDefinition addDefinition(ModuleDefinition moduleDefinition)

### removeDefinition

    public ModuleDefinition removeDefinition(ModuleDefinition moduleDefinition)

### getDefinition

    public ModuleDefinition getDefinition(java.lang.Class clazz)

### getContextDefinition

    public ContextDefinition getContextDefinition()

### getFileDefinition

    public FileDefinition getFileDefinition()

### getTaskMgmtDefinition

    public TaskMgmtDefinition getTaskMgmtDefinition()

### getDefinitions

    public java.util.Map getDefinitions()

### setDefinitions

    public void setDefinitions(java.util.Map definitions)

### getVersion

    public int getVersion()

### setVersion

    public void setVersion(int version)

### getStartState

    public Node getStartState()

### setStartState

    public void setStartState(Node startState)

### isTerminationImplicit

    public boolean isTerminationImplicit()

### setTerminationImplicit

    public void setTerminationImplicit(boolean isTerminationImplicit)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD