Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.0.0.CR4-Pre1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jbpm.process.instance
Class ProcessRuntimeImpl

    java.lang.Object
      org.jbpm.process.instance.ProcessRuntimeImpl

All Implemented Interfaces:
  org.drools.core.runtime.process.InternalProcessRuntime, ProcessEventManager, ProcessRuntime, org.kie.internal.process.CorrelationAwareProcessRuntime

    public class ProcessRuntimeImpl

extends Object
implements InternalProcessRuntime

Nested Class Summary
`static class` | `ProcessRuntimeImpl.RegisterStartTimerAction`

Constructor Summary
`ProcessRuntimeImpl(org.drools.core.common.AbstractWorkingMemory workingMemory)`
`ProcessRuntimeImpl(org.drools.core.common.InternalKnowledgeRuntime kruntime)`

Method Summary
`void` | `abortProcessInstance(long processInstanceId)` Aborts the process instance with the given id.
`void` | `addEventListener(ProcessEventListener listener)` Add a process event listener.
`void` | `clearProcessInstances()`
`void` | `clearProcessInstancesState()`
`ProcessInstance` | `createProcessInstance(String processId, org.kie.internal.process.CorrelationKey correlationKey, Map<String,Object> parameters)`
`ProcessInstance` | `createProcessInstance(String processId, Map<String,Object> parameters)` Creates a new process instance (but does not yet start it).
`void` | `dispose()`
`List<ProcessEventListener>` | `getProcessEventListeners()` Returns all event listeners.
`org.drools.core.event.ProcessEventSupport` | `getProcessEventSupport()`
`ProcessInstance` | `getProcessInstance(org.kie.internal.process.CorrelationKey correlationKey)`
`ProcessInstance` | `getProcessInstance(long id)` Returns the process instance with the given id.
`ProcessInstance` | `getProcessInstance(long id, boolean readOnly)` Returns the process instance with the given id.
`ProcessInstanceManager` | `getProcessInstanceManager()`
`Collection<ProcessInstance>` | `getProcessInstances()` Returns a collection of currently active process instances.
`SignalManager` | `getSignalManager()`
`TimerManager` | `getTimerManager()`
`WorkItemManager` | `getWorkItemManager()` Returns the `WorkItemManager` related to this session.
`void` | `removeEventListener(ProcessEventListener listener)` Remove a process event listener.
`void` | `removeProcessInstance(ProcessInstance processInstance)`
`void` | `setProcessEventSupport(org.drools.core.event.ProcessEventSupport processEventSupport)`
`void` | `signalEvent(String type, Object event)` Signals the engine that an event has occurred.
`void` | `signalEvent(String type, Object event, long processInstanceId)` Signals the process instance that an event has occurred.
`ProcessInstance` | `startProcess(String processId)` Start a new process instance.
`ProcessInstance` | `startProcess(String processId, org.kie.internal.process.CorrelationKey correlationKey, Map<String,Object> parameters)`
`ProcessInstance` | `startProcess(String processId, Map<String,Object> parameters)` Start a new process instance.
`ProcessInstance` | `startProcessInstance(long processInstanceId)` Starts the given process instance (which was created by using createProcesInstance but not yet started).

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

Constructor Detail

### ProcessRuntimeImpl

    public ProcessRuntimeImpl(org.drools.core.common.InternalKnowledgeRuntime kruntime)

### ProcessRuntimeImpl

    public ProcessRuntimeImpl(org.drools.core.common.AbstractWorkingMemory workingMemory)

Method Detail

### startProcess

    public ProcessInstance startProcess(String processId)

  Description copied from interface: `ProcessRuntime`
  Start a new process instance. The process (definition) that should be used is referenced by the given process id.

  Specified by:
    `startProcess` in interface `ProcessRuntime`
  Parameters:
    `processId` - The id of the process that should be started
  Returns:
    the `ProcessInstance` that represents the instance of the process that was started

### startProcess

    public ProcessInstance startProcess(String processId,
                                        Map<String,Object> parameters)

  Description copied from interface: `ProcessRuntime`
  Start a new process instance. The process (definition) that should be used is referenced by the given process id. Parameters can be passed to the process instance (as name-value pairs), and these will be set as variables of the process instance.

  Specified by:
    `startProcess` in interface `ProcessRuntime`
  Parameters:
    `processId` - the id of the process that should be started
    `parameters` - the process variables that should be set when starting the process instance
  Returns:
    the `ProcessInstance` that represents the instance of the process that was started

### createProcessInstance

    public ProcessInstance createProcessInstance(String processId,
                                                 Map<String,Object> parameters)

  Description copied from interface: `ProcessRuntime`
  Creates a new process instance (but does not yet start it). The process (definition) that should be used is referenced by the given process id. Parameters can be passed to the process instance (as name-value pairs), and these will be set as variables of the process instance. You should only use this method if you need a reference to the process instance before actually starting it. Otherwise, use startProcess.

  Specified by:
    `createProcessInstance` in interface `ProcessRuntime`
  Parameters:
    `processId` - the id of the process that should be started
    `parameters` - the process variables that should be set when creating the process instance
  Returns:
    the `ProcessInstance` that represents the instance of the process that was created (but not yet started)

### startProcessInstance

    public ProcessInstance startProcessInstance(long processInstanceId)

  Description copied from interface: `ProcessRuntime`
  Starts the given process instance (which was created by using createProcesInstance but not yet started). This method can only be called once for each process instance. You should only use this method if you need a reference to the process instance before actually starting it. Otherwise, use startProcess.

  Specified by:
    `startProcessInstance` in interface `ProcessRuntime`
  Parameters:
    `processInstanceId` - the id of the process instance that needs to be started
  Returns:
    the `ProcessInstance` that represents the instance of the process that was started

### startProcess

    public ProcessInstance startProcess(String processId,
                                        org.kie.internal.process.CorrelationKey correlationKey,
                                        Map<String,Object> parameters)

  Specified by:
    `startProcess` in interface `org.kie.internal.process.CorrelationAwareProcessRuntime`

### createProcessInstance

    public ProcessInstance createProcessInstance(String processId,
                                                 org.kie.internal.process.CorrelationKey correlationKey,
                                                 Map<String,Object> parameters)

  Specified by:
    `createProcessInstance` in interface `org.kie.internal.process.CorrelationAwareProcessRuntime`

### getProcessInstance

    public ProcessInstance getProcessInstance(org.kie.internal.process.CorrelationKey correlationKey)

  Specified by:
    `getProcessInstance` in interface `org.kie.internal.process.CorrelationAwareProcessRuntime`

### getProcessInstanceManager

    public ProcessInstanceManager getProcessInstanceManager()

### getTimerManager

    public TimerManager getTimerManager()

### getSignalManager

    public SignalManager getSignalManager()

### getProcessInstances

    public Collection<ProcessInstance> getProcessInstances()

  Description copied from interface: `ProcessRuntime`
  Returns a collection of currently active process instances. Note that only process instances that are currently loaded and active inside the engine will be returned. When using persistence, it is likely not all running process instances will be loaded as their state will be stored persistently. It is recommended not to use this method to collect information about the state of your process instances but to use a history log for that purpose.

  Specified by:
    `getProcessInstances` in interface `ProcessRuntime`
  Returns:
    a collection of process instances currently active in the session

### getProcessInstance

    public ProcessInstance getProcessInstance(long id)

  Description copied from interface: `ProcessRuntime`
  Returns the process instance with the given id. Note that only active process instances will be returned. If a process instance has been completed already, this method will return `null`.

  Specified by:
    `getProcessInstance` in interface `ProcessRuntime`
  Parameters:
    `id` - the id of the process instance
  Returns:
    the process instance with the given id or `null` if it cannot be found

### getProcessInstance

    public ProcessInstance getProcessInstance(long id,
                                              boolean readOnly)

  Description copied from interface: `ProcessRuntime`
  Returns the process instance with the given id. Note that only active process instances will be returned. If a process instance has been completed already, this method will return `null`.

  Specified by:
    `getProcessInstance` in interface `ProcessRuntime`
  Parameters:
    `id` - the id of the process instance
    `readOnly` - if this is true and when using persistence, this process instance will not be tracked and updated by the engine
  Returns:
    the process instance with the given id or `null` if it cannot be found

### removeProcessInstance

    public void removeProcessInstance(ProcessInstance processInstance)

### getProcessEventSupport

    public org.drools.core.event.ProcessEventSupport getProcessEventSupport()

### addEventListener

    public void addEventListener(ProcessEventListener listener)

  Description copied from interface: `ProcessEventManager`
  Add a process event listener.

  Specified by:
    `addEventListener` in interface `ProcessEventManager`
  Parameters:
    `listener` - the listener to add.

### removeEventListener

    public void removeEventListener(ProcessEventListener listener)

  Description copied from interface: `ProcessEventManager`
  Remove a process event listener.

  Specified by:
    `removeEventListener` in interface `ProcessEventManager`
  Parameters:
    `listener` - the listener to remove

### getProcessEventListeners

    public List<ProcessEventListener> getProcessEventListeners()

  Description copied from interface: `ProcessEventManager`
  Returns all event listeners.

  Specified by:
    `getProcessEventListeners` in interface `ProcessEventManager`
  Returns:
    listeners the listeners

### abortProcessInstance

    public void abortProcessInstance(long processInstanceId)

  Description copied from interface: `ProcessRuntime`
  Aborts the process instance with the given id. If the process instance has been completed (or aborted), or the process instance cannot be found, this method will throw an `IllegalArgumentException`.

  Specified by:
    `abortProcessInstance` in interface `ProcessRuntime`
  Parameters:
    `processInstanceId` - the id of the process instance

### getWorkItemManager

    public WorkItemManager getWorkItemManager()

  Description copied from interface: `ProcessRuntime`
  Returns the `WorkItemManager` related to this session. This can be used to register new `WorkItemHandler`s or to complete (or abort) `WorkItem`s.

  Specified by:
    `getWorkItemManager` in interface `ProcessRuntime`
  Returns:
    the `WorkItemManager` related to this session

### signalEvent

    public void signalEvent(String type,
                            Object event)

  Description copied from interface: `ProcessRuntime`
  Signals the engine that an event has occurred. The type parameter defines which type of event and the event parameter can contain additional information related to the event. All process instances that are listening to this type of (external) event will be notified. For performance reasons, this type of event signaling should only be used if one process instance should be able to notify other process instances. For internal event within one process instance, use the signalEvent method that also include the processInstanceId of the process instance in question.

  Specified by:
    `signalEvent` in interface `ProcessRuntime`
  Parameters:
    `type` - the type of event
    `event` - the data associated with this event

### signalEvent

    public void signalEvent(String type,
                            Object event,
                            long processInstanceId)

  Description copied from interface: `ProcessRuntime`
  Signals the process instance that an event has occurred. The type parameter defines which type of event and the event parameter can contain additional information related to the event. All node instances inside the given process instance that are listening to this type of (internal) event will be notified. Note that the event will only be processed inside the given process instance. All other process instances waiting for this type of event will not be notified.

  Specified by:
    `signalEvent` in interface `ProcessRuntime`
  Parameters:
    `type` - the type of event
    `event` - the data associated with this event
    `processInstanceId` - the id of the process instance that should be signaled

### setProcessEventSupport

    public void setProcessEventSupport(org.drools.core.event.ProcessEventSupport processEventSupport)

  Specified by:
    `setProcessEventSupport` in interface `org.drools.core.runtime.process.InternalProcessRuntime`

### dispose

    public void dispose()

  Specified by:
    `dispose` in interface `org.drools.core.runtime.process.InternalProcessRuntime`

### clearProcessInstances

    public void clearProcessInstances()

  Specified by:
    `clearProcessInstances` in interface `org.drools.core.runtime.process.InternalProcessRuntime`

### clearProcessInstancesState

    public void clearProcessInstancesState()

  Specified by:
    `clearProcessInstancesState` in interface `org.drools.core.runtime.process.InternalProcessRuntime`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.0.0.CR4-Pre1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.