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.db
Class GraphSession

    java.lang.Object
      org.jbpm.db.GraphSession

    public class GraphSession

extends java.lang.Object

are the graph related database operations.

Nested Class Summary
`static class` | `GraphSession.AverageNodeTimeEntry`

Constructor Summary
`GraphSession(JbpmSession jbpmSession)`
`GraphSession(org.hibernate.Session session)`

Method Summary
`java.util.List` | `calculateAverageTimeByNode(long processDefinitionId, long minumumDurationMillis)`
`void` | `deleteProcessDefinition(long processDefinitionId)`
`void` | `deleteProcessDefinition(ProcessDefinition processDefinition)`
`void` | `deleteProcessInstance(long processInstanceId)`
`void` | `deleteProcessInstance(ProcessInstance processInstance)`
`void` | `deleteProcessInstance(ProcessInstance processInstance, boolean includeTasks, boolean includeJobs)`
`void` | `deployProcessDefinition(ProcessDefinition processDefinition)`
`java.util.List` | `findActiveNodesByProcessInstance(ProcessInstance processInstance)`
`java.util.List` | `findAllProcessDefinitions()` queries the database for all process definitions, ordered by name (ascending), then by version (descending).
`java.util.List` | `findAllProcessDefinitionVersions(java.lang.String name)` queries the database for all versions of process definitions with the given name, ordered by version (descending).
`ProcessDefinition` | `findLatestProcessDefinition(java.lang.String name)` queries the database for the latest version of a process definition with the given name.
`java.util.List` | `findLatestProcessDefinitions()` queries the database for the latest version of each process definition.
`ProcessDefinition` | `findProcessDefinition(java.lang.String name, int version)` queries the database for a process definition with the given name and version.
`java.util.List` | `findProcessInstances(long processDefinitionId)` fetches all processInstances for the given process definition from the database.
`ProcessDefinition` | `getProcessDefinition(long processDefinitionId)` gets a process definition from the database by the identifier.
`ProcessInstance` | `getProcessInstance(long processInstanceId)` gets a process instance from the database by the identifier.
`ProcessInstance` | `getProcessInstance(ProcessDefinition processDefinition, java.lang.String key)`
`Token` | `getToken(long tokenId)` gets a token from the database by the identifier.
`ProcessDefinition` | `loadProcessDefinition(long processDefinitionId)` loads a process definition from the database by the identifier.
`ProcessInstance` | `loadProcessInstance(long processInstanceId)` loads a process instance from the database by the identifier.
`ProcessInstance` | `loadProcessInstance(ProcessDefinition processDefinition, java.lang.String key)`
`Token` | `loadToken(long tokenId)` loads a token from the database by the identifier.
`void` | `lockProcessInstance(long processInstanceId)` locks a process instance in the database.
`void` | `lockProcessInstance(ProcessInstance processInstance)` locks a process instance in the database.
`void` | `saveProcessDefinition(ProcessDefinition processDefinition)` saves the process definitions.
`void` | `saveProcessInstance(ProcessInstance processInstance)` Deprecated. use `JbpmContext.save(ProcessInstance)` instead.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### GraphSession

    public GraphSession(JbpmSession jbpmSession)

### GraphSession

    public GraphSession(org.hibernate.Session session)

Method Detail

### deployProcessDefinition

    public void deployProcessDefinition(ProcessDefinition processDefinition)

### saveProcessDefinition

    public void saveProcessDefinition(ProcessDefinition processDefinition)

  saves the process definitions. this method does not assign a version number. that is the responsibility of the `org.jbpm.jpdl.par.ProcessArchiveDeployer`.

### loadProcessDefinition

    public ProcessDefinition loadProcessDefinition(long processDefinitionId)

  loads a process definition from the database by the identifier.

  Throws:
    `JbpmException` - in case the referenced process definition doesn't exist.

### getProcessDefinition

    public ProcessDefinition getProcessDefinition(long processDefinitionId)

  gets a process definition from the database by the identifier.

  Returns:
    the referenced process definition or null in case it doesn't exist.

### findProcessDefinition

    public ProcessDefinition findProcessDefinition(java.lang.String name,
                                                   int version)

  queries the database for a process definition with the given name and version.

### findLatestProcessDefinition

    public ProcessDefinition findLatestProcessDefinition(java.lang.String name)

  queries the database for the latest version of a process definition with the given name.

### findLatestProcessDefinitions

    public java.util.List findLatestProcessDefinitions()

  queries the database for the latest version of each process definition. Process definitions are distinct by name.

### findAllProcessDefinitions

    public java.util.List findAllProcessDefinitions()

  queries the database for all process definitions, ordered by name (ascending), then by version (descending).

### findAllProcessDefinitionVersions

    public java.util.List findAllProcessDefinitionVersions(java.lang.String name)

  queries the database for all versions of process definitions with the given name, ordered by version (descending).

### deleteProcessDefinition

    public void deleteProcessDefinition(long processDefinitionId)

### deleteProcessDefinition

    public void deleteProcessDefinition(ProcessDefinition processDefinition)

### saveProcessInstance

    public void saveProcessInstance(ProcessInstance processInstance)

  Deprecated. use `JbpmContext.save(ProcessInstance)` instead.

  Throws:
    `java.lang.UnsupportedOperationException`

### loadProcessInstance

    public ProcessInstance loadProcessInstance(long processInstanceId)

  loads a process instance from the database by the identifier. This throws an exception in case the process instance doesn't exist.

  Throws:
    `JbpmException` - in case the process instance doesn't exist.
  See Also:
    `getProcessInstance(long)`

### getProcessInstance

    public ProcessInstance getProcessInstance(long processInstanceId)

  gets a process instance from the database by the identifier. This method returns null in case the given process instance doesn't exist.

### loadToken

    public Token loadToken(long tokenId)

  loads a token from the database by the identifier.

  Returns:
    the token.
  Throws:
    `JbpmException` - in case the referenced token doesn't exist.

### getToken

    public Token getToken(long tokenId)

  gets a token from the database by the identifier.

  Returns:
    the token or null in case the token doesn't exist.

### lockProcessInstance

    public void lockProcessInstance(long processInstanceId)

  locks a process instance in the database.

### lockProcessInstance

    public void lockProcessInstance(ProcessInstance processInstance)

  locks a process instance in the database.

### findProcessInstances

    public java.util.List findProcessInstances(long processDefinitionId)

  fetches all processInstances for the given process definition from the database. The returned list of process instances is sorted start date, youngest first.

### deleteProcessInstance

    public void deleteProcessInstance(long processInstanceId)

### deleteProcessInstance

    public void deleteProcessInstance(ProcessInstance processInstance)

### deleteProcessInstance

    public void deleteProcessInstance(ProcessInstance processInstance,
                                      boolean includeTasks,
                                      boolean includeJobs)

### calculateAverageTimeByNode

    public java.util.List calculateAverageTimeByNode(long processDefinitionId,
                                                     long minumumDurationMillis)

### findActiveNodesByProcessInstance

    public java.util.List findActiveNodesByProcessInstance(ProcessInstance processInstance)

### getProcessInstance

    public ProcessInstance getProcessInstance(ProcessDefinition processDefinition,
                                              java.lang.String key)

### loadProcessInstance

    public ProcessInstance loadProcessInstance(ProcessDefinition processDefinition,
                                               java.lang.String key)

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