org.jbpm.kie.services.impl.admin

## Class ProcessInstanceAdminServiceImpl

- java.lang.Object
- - org.jbpm.kie.services.impl.admin.ProcessInstanceAdminServiceImpl

- All Implemented Interfaces:
    ProcessInstanceAdminService

      public class ProcessInstanceAdminServiceImpl
      extends Object
      implements ProcessInstanceAdminService

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProcessInstanceAdminServiceImpl()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `cancelNodeInstance(long processInstanceId, long nodeInstanceId)` Cancels node instance with given id within given process instance.
    `Collection<NodeInstanceDesc>` | `getActiveNodeInstances(long processInstanceId)` Returns all active node instances in given process instance;
    `Collection<ProcessNode>` | `getProcessNodes(long processInstanceId)` Returns all process nodes found in given process instance.
    `Collection<TimerInstance>` | `getTimerInstances(long processInstanceId)` Returns active timers for given process instance.
    `void` | `retriggerNodeInstance(long processInstanceId, long nodeInstanceId)` Retriggers (which includes cancel) node instance given with node instance id within process instance.
    `void` | `setProcessService(ProcessService processService)`
    `void` | `setRuntimeDataService(RuntimeDataService runtimeDataService)`
    `void` | `triggerNode(long processInstanceId, long nodeId)` Triggers node to create new node instance with node id within process instance.
    `void` | `updateTimer(long processInstanceId, long timerId, long delay, long period, int repeatLimit)` Updates active timer identified by timer id with delay that is given in seconds.
    `void` | `updateTimerRelative(long processInstanceId, long timerId, long delay, long period, int repeatLimit)` Updates active timer identified by timer id with delay that is given in seconds and is relative to current time.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ProcessInstanceAdminServiceImpl

          public ProcessInstanceAdminServiceImpl()

  - ### Method Detail

    - #### setProcessService

          public void setProcessService(ProcessService processService)

    - #### setRuntimeDataService

          public void setRuntimeDataService(RuntimeDataService runtimeDataService)

    - #### getProcessNodes

          public Collection<ProcessNode> getProcessNodes(long processInstanceId)
                                                  throws ProcessInstanceNotFoundException

      Description copied from interface: `ProcessInstanceAdminService`
      Returns all process nodes found in given process instance.
      Specified by:
        `getProcessNodes` in interface `ProcessInstanceAdminService`
      Parameters:
        `processInstanceId` - unique id of process instance
      Returns:
        list of process nodes in process instance
      Throws:
        `ProcessInstanceNotFoundException` - in case process instance id with given id was not found

    - #### cancelNodeInstance

          public void cancelNodeInstance(long processInstanceId,
                                         long nodeInstanceId)
                                  throws NodeInstanceNotFoundException,
                                         ProcessInstanceNotFoundException

      Description copied from interface: `ProcessInstanceAdminService`
      Cancels node instance with given id within given process instance.
      Specified by:
        `cancelNodeInstance` in interface `ProcessInstanceAdminService`
      Parameters:
        `processInstanceId` - unique id of process instance
        `nodeInstanceId` - node instance id within given process instance to be canceled
      Throws:
        `NodeInstanceNotFoundException` - in case node instance with given id is not active
        `ProcessInstanceNotFoundException` - in case process instance id with given id was not found

    - #### retriggerNodeInstance

          public void retriggerNodeInstance(long processInstanceId,
                                            long nodeInstanceId)
                                     throws NodeInstanceNotFoundException,
                                            ProcessInstanceNotFoundException

      Description copied from interface: `ProcessInstanceAdminService`
      Retriggers (which includes cancel) node instance given with node instance id within process instance.
      Specified by:
        `retriggerNodeInstance` in interface `ProcessInstanceAdminService`
      Parameters:
        `processInstanceId` - unique id of process instance
        `nodeInstanceId` - node instance id within given process instance to be retriggered
      Throws:
        `NodeInstanceNotFoundException` - in case node instance with given id is not active
        `ProcessInstanceNotFoundException` - in case process instance id with given id was not found

    - #### updateTimer

          public void updateTimer(long processInstanceId,
                                  long timerId,
                                  long delay,
                                  long period,
                                  int repeatLimit)
                           throws NodeInstanceNotFoundException,
                                  ProcessInstanceNotFoundException

      Description copied from interface: `ProcessInstanceAdminService`
      Updates active timer identified by timer id with delay that is given in seconds. Delay is absolute meaning it is as it would be set when timer was created.
      Example:
      In case timer was initially created with delay of 1 hour and after 30 min we decide to update it to 2 hours it will then expire in 1,5 hour from the time it was updated.
      Specified by:
        `updateTimer` in interface `ProcessInstanceAdminService`
      Parameters:
        `processInstanceId` - unique id of process instance
        `timerId` - timer id that should be updated
        `delay` - absolute delay in seconds
        `period` - in case of repeatable timer how often it should repeat in milliseconds - if not applicable should be set to -1
        `repeatLimit` - in case of repeatable timer how many times it should trigger - if not applicable should be set to -1
      Throws:
        `NodeInstanceNotFoundException` - in case node instance with given id is not active
        `ProcessInstanceNotFoundException` - in case process instance id with given id was not found

    - #### updateTimerRelative

          public void updateTimerRelative(long processInstanceId,
                                          long timerId,
                                          long delay,
                                          long period,
                                          int repeatLimit)
                                   throws NodeInstanceNotFoundException,
                                          ProcessInstanceNotFoundException

      Description copied from interface: `ProcessInstanceAdminService`
      Updates active timer identified by timer id with delay that is given in seconds and is relative to current time.
      Example:
      In case timer was initially created with delay of 1 hour and after 30 min we decide to update it to 2 hours it will then expire in 2 hours from the time it was updated.
      Specified by:
        `updateTimerRelative` in interface `ProcessInstanceAdminService`
      Parameters:
        `processInstanceId` - unique id of process instance
        `timerId` - timer id that should be updated
        `delay` - absolute delay in seconds
        `period` - in case of repeatable timer how often it should repeat in milliseconds - if not applicable should be set to -1
        `repeatLimit` - in case of repeatable timer how many times it should trigger - if not applicable should be set to -1
      Throws:
        `NodeInstanceNotFoundException` - in case node instance with given id is not active
        `ProcessInstanceNotFoundException` - in case process instance id with given id was not found

    - #### getTimerInstances

          public Collection<TimerInstance> getTimerInstances(long processInstanceId)
                                                      throws ProcessInstanceNotFoundException

      Description copied from interface: `ProcessInstanceAdminService`
      Returns active timers for given process instance.
      Specified by:
        `getTimerInstances` in interface `ProcessInstanceAdminService`
      Parameters:
        `processInstanceId` - unique id of process instance
      Returns:
        list of timer found for given process instance
      Throws:
        `ProcessInstanceNotFoundException` - in case process instance id with given id was not found

    - #### triggerNode

          public void triggerNode(long processInstanceId,
                                  long nodeId)
                           throws NodeNotFoundException,
                                  ProcessInstanceNotFoundException

      Description copied from interface: `ProcessInstanceAdminService`
      Triggers node to create new node instance with node id within process instance. This results in new instance of a task within process instance.
      Specified by:
        `triggerNode` in interface `ProcessInstanceAdminService`
      Parameters:
        `processInstanceId` - unique id of process instance
        `nodeId` - node id to be triggered (new instance of that node to be created)
      Throws:
        `NodeNotFoundException` - in case node with given id does not exist in process instance
        `ProcessInstanceNotFoundException` - in case process instance id with given id was not found

    - #### getActiveNodeInstances

          public Collection<NodeInstanceDesc> getActiveNodeInstances(long processInstanceId)
                                                              throws ProcessInstanceNotFoundException

      Description copied from interface: `ProcessInstanceAdminService`
      Returns all active node instances in given process instance;
      Specified by:
        `getActiveNodeInstances` in interface `ProcessInstanceAdminService`
      Parameters:
        `processInstanceId` - unique id of process instance
      Returns:
        found active node instances
      Throws:
        `ProcessInstanceNotFoundException` - in case process instance id with given id was not found

Copyright © 2001–2016 JBoss by Red Hat. All rights reserved.