org.kie.api.executor

## Interface ExecutorQueryService

-     public interface ExecutorQueryService

  Executor query interface that provides runtime access to data.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<ErrorInfo>` | `getAllErrors(QueryContext queryContext)` Returns all errors.
    `List<RequestInfo>` | `getAllRequests(QueryContext queryContext)` Returns all requests
    `List<RequestInfo>` | `getCancelledRequests(QueryContext queryContext)` Returns all requests that were cancelled
    `List<RequestInfo>` | `getCompletedRequests(QueryContext queryContext)` Returns all comleted requests.
    `List<ErrorInfo>` | `getErrorsByRequestId(Long id)` Returns all errors (if any) for given request
    `List<RequestInfo>` | `getFutureQueuedRequests(QueryContext queryContext)` Returns requests queued for future execution
    `List<RequestInfo>` | `getInErrorRequests(QueryContext queryContext)` Returns all requests that have errors.
    `List<RequestInfo>` | `getPendingRequestById(Long id)` Returns given pending request identified by `id`
    `List<RequestInfo>` | `getPendingRequests(QueryContext queryContext)` Returns list of pending execution requests.
    `List<RequestInfo>` | `getQueuedRequests(QueryContext queryContext)` Returns all queued requests
    `List<RequestInfo>` | `getRequestByBusinessKey(String businessKey, QueryContext queryContext)` Returns requests identified by `businessKey` usually it should be only one with given business key but it does not have to as same business key requests can be processed sequentially and thus might be in different statuses.
    `List<RequestInfo>` | `getRequestByCommand(String command, QueryContext queryContext)` Returns requests configured with given `command`
    `RequestInfo` | `getRequestById(Long id)` Returns request identified by `id` regardless of its status
    `RequestInfo` | `getRequestForProcessing()` Dedicated method for handling special case that is get the request for processing.
    `RequestInfo` | `getRequestForProcessing(Long requestId)` Dedicated method for handling special case that is get the request for processing by id.
    `List<RequestInfo>` | `getRequestsByStatus(List<STATUS> statuses, QueryContext queryContext)` Returns requests based on their status
    `List<RequestInfo>` | `getRunningRequests(QueryContext queryContext)` Returns all currently running requests

- - ### Method Detail

    - #### getPendingRequests

          List<RequestInfo> getPendingRequests(QueryContext queryContext)

      Returns list of pending execution requests.
      Returns:

    - #### getPendingRequestById

          List<RequestInfo> getPendingRequestById(Long id)

      Returns given pending request identified by `id`
      Parameters:
        `id` - - unique id of the request
      Returns:

    - #### getRequestById

          RequestInfo getRequestById(Long id)

      Returns request identified by `id` regardless of its status
      Parameters:
        `id` - - unique id of the request
      Returns:

    - #### getRequestByBusinessKey

          List<RequestInfo> getRequestByBusinessKey(String businessKey,
                                                  QueryContext queryContext)

      Returns requests identified by `businessKey` usually it should be only one with given business key but it does not have to as same business key requests can be processed sequentially and thus might be in different statuses.
      Parameters:
        `businessKey` - - business key of the request
      Returns:

    - #### getRequestByCommand

          List<RequestInfo> getRequestByCommand(String command,
                                              QueryContext queryContext)

      Returns requests configured with given `command`
      Parameters:
        `command` - - command configured in the request
      Returns:

    - #### getErrorsByRequestId

          List<ErrorInfo> getErrorsByRequestId(Long id)

      Returns all errors (if any) for given request
      Parameters:
        `id` - - unique id of the request
      Returns:

    - #### getQueuedRequests

          List<RequestInfo> getQueuedRequests(QueryContext queryContext)

      Returns all queued requests
      Returns:

    - #### getCompletedRequests

          List<RequestInfo> getCompletedRequests(QueryContext queryContext)

      Returns all comleted requests.
      Returns:

    - #### getInErrorRequests

          List<RequestInfo> getInErrorRequests(QueryContext queryContext)

      Returns all requests that have errors.
      Returns:

    - #### getCancelledRequests

          List<RequestInfo> getCancelledRequests(QueryContext queryContext)

      Returns all requests that were cancelled
      Returns:

    - #### getAllErrors

          List<ErrorInfo> getAllErrors(QueryContext queryContext)

      Returns all errors.
      Returns:

    - #### getAllRequests

          List<RequestInfo> getAllRequests(QueryContext queryContext)

      Returns all requests
      Returns:

    - #### getRunningRequests

          List<RequestInfo> getRunningRequests(QueryContext queryContext)

      Returns all currently running requests
      Returns:

    - #### getFutureQueuedRequests

          List<RequestInfo> getFutureQueuedRequests(QueryContext queryContext)

      Returns requests queued for future execution
      Returns:

    - #### getRequestsByStatus

          List<RequestInfo> getRequestsByStatus(List<STATUS> statuses,
                                              QueryContext queryContext)

      Returns requests based on their status
      Parameters:
        `statuses` - - statuses that requests should be in
      Returns:

    - #### getRequestForProcessing

          RequestInfo getRequestForProcessing()

      Dedicated method for handling special case that is get the request for processing. To ensure its efficient use it shall perform necessary operation to minimize risk of race conditions and deadlock.
      Returns:

    - #### getRequestForProcessing

          RequestInfo getRequestForProcessing(Long requestId)

      Dedicated method for handling special case that is get the request for processing by id. To ensure its efficient use it shall perform necessary operation to minimize risk of race conditions and deadlock.
      Returns:

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