jBPM distribution 6.2.0.CR2

org.jbpm.services.api
Interface RuntimeDataService

All Known Subinterfaces:
RuntimeDataServiceEJBLocal, RuntimeDataServiceEJBRemote
All Known Implementing Classes:
RuntimeDataServiceCDIImpl, RuntimeDataServiceEJBImpl, RuntimeDataServiceImpl

public interface RuntimeDataService

This service provides an interface to retrieve data about the runtime, including the following:


Nested Class Summary
static class RuntimeDataService.EntryType
          Represents type of node instance log entries.
 
Method Summary
 NodeInstanceDesc getNodeInstanceForWorkItem(Long workItemId)
          Returns active node instance descriptor for given work item id, if exists.
 ProcessDefinition getProcessById(String processId)
          Returns process definition for given process id
 Collection<ProcessDefinition> getProcesses(org.kie.internal.query.QueryContext queryContext)
          Returns all process definitions available
 Collection<ProcessDefinition> getProcessesByDeploymentId(String deploymentId, org.kie.internal.query.QueryContext queryContext)
          Returns list of process definitions for given deployment id
 ProcessDefinition getProcessesByDeploymentIdProcessId(String deploymentId, String processId)
          Returns process definition for given deployment and process identifiers
 Collection<ProcessDefinition> getProcessesByFilter(String filter, org.kie.internal.query.QueryContext queryContext)
          Returns list of process definitions that match the given filter
 Collection<String> getProcessIds(String deploymentId, org.kie.internal.query.QueryContext queryContext)
          Returns list of process definition identifiers for given deployment id
 ProcessInstanceDesc getProcessInstanceById(long processInstanceId)
          Returns process instance descriptions found for given processInstanceId if found otherwise null.
 Collection<NodeInstanceDesc> getProcessInstanceFullHistory(long processInstanceId, org.kie.internal.query.QueryContext queryContext)
          Returns complete trace of all executed (completed) and active nodes for given process instance id
 Collection<NodeInstanceDesc> getProcessInstanceFullHistoryByType(long processInstanceId, RuntimeDataService.EntryType type, org.kie.internal.query.QueryContext queryContext)
          Returns complete trace of all events of given type (START or END) for given process instance.
 Collection<NodeInstanceDesc> getProcessInstanceHistoryActive(long processInstanceId, org.kie.internal.query.QueryContext queryContext)
          Returns trace of all active nodes for given process instance id
 Collection<NodeInstanceDesc> getProcessInstanceHistoryCompleted(long processInstanceId, org.kie.internal.query.QueryContext queryContext)
          Returns trace of all executed (completed) for given process instance id
 Collection<ProcessInstanceDesc> getProcessInstances(List<Integer> states, String initiator, org.kie.internal.query.QueryContext queryContext)
          Returns list of process instance descriptions found with given statuses and initiated by initiator.
 Collection<ProcessInstanceDesc> getProcessInstances(org.kie.internal.query.QueryContext queryContext)
          Returns list of process instance descriptions
 Collection<ProcessInstanceDesc> getProcessInstancesByDeploymentId(String deploymentId, List<Integer> states, org.kie.internal.query.QueryContext queryContext)
          Returns list of process instance descriptions found for given deployment id and statuses.
 Collection<ProcessInstanceDesc> getProcessInstancesByProcessDefinition(String processDefId, org.kie.internal.query.QueryContext queryContext)
          Returns list of process instance descriptions found for given process definition id
 Collection<ProcessInstanceDesc> getProcessInstancesByProcessId(List<Integer> states, String processId, String initiator, org.kie.internal.query.QueryContext queryContext)
          Returns list of process instance descriptions found for given process id and statuses and initiated by initiator
 Collection<ProcessInstanceDesc> getProcessInstancesByProcessName(List<Integer> states, String processName, String initiator, org.kie.internal.query.QueryContext queryContext)
           
 UserTaskInstanceDesc getTaskById(Long taskId)
          Return a task by its taskId.
 UserTaskInstanceDesc getTaskByWorkItemId(Long workItemId)
          Return a task by its workItemId.
 List<TaskSummary> getTasksAssignedAsBusinessAdministrator(String userId, org.kie.internal.query.QueryFilter filter)
          Return a list of assigned tasks as a Business Administrator.
 List<TaskSummary> getTasksAssignedAsPotentialOwner(String userId, List<String> groupIds, List<Status> status, org.kie.internal.query.QueryFilter filter)
          Return a list of tasks the user or groups are eligible for with one of the listed statuses.
 List<TaskSummary> getTasksAssignedAsPotentialOwner(String userId, List<String> groupIds, org.kie.internal.query.QueryFilter filter)
          Return a list of tasks the user or groups are eligible for.
 List<TaskSummary> getTasksAssignedAsPotentialOwner(String userId, org.kie.internal.query.QueryFilter filter)
          Return a list of tasks the user is eligible for.
 List<TaskSummary> getTasksAssignedAsPotentialOwnerByExpirationDateOptional(String userId, List<Status> status, Date from, org.kie.internal.query.QueryFilter filter)
          Return a list of tasks the user is eligible for with one of the listed statuses and expiration date starting at from.
 List<TaskSummary> getTasksAssignedAsPotentialOwnerByStatus(String userId, List<Status> status, org.kie.internal.query.QueryFilter filter)
          Return a list of tasks the user is eligible for with one of the listed statuses.
 List<Long> getTasksByProcessInstanceId(Long processInstanceId)
          Get a list of tasks the Process Instance is waiting on.
 List<TaskSummary> getTasksByStatusByProcessInstanceId(Long processInstanceId, List<Status> status, org.kie.internal.query.QueryFilter filter)
          Get a list of tasks the Process Instance is waiting on with one of the listed statuses.
 List<TaskSummary> getTasksOwned(String userId, org.kie.internal.query.QueryFilter filter)
          Return a list of tasks the user has claimed.
 List<TaskSummary> getTasksOwnedByExpirationDateOptional(String userId, List<Status> strStatuses, Date from, org.kie.internal.query.QueryFilter filter)
          Return a list of tasks the user has claimed with one of the listed statuses and expiration date starting at from.
 List<TaskSummary> getTasksOwnedByStatus(String userId, List<Status> status, org.kie.internal.query.QueryFilter filter)
          Return a list of tasks the user has claimed with one of the listed statuses.
 Collection<VariableDesc> getVariableHistory(long processInstanceId, String variableId, org.kie.internal.query.QueryContext queryContext)
          Returns collection of changes to given variable within scope of process instance
 Collection<VariableDesc> getVariablesCurrentState(long processInstanceId)
          Returns collections of all process variables current value for given process instance
 

Method Detail

getProcessInstances

Collection<ProcessInstanceDesc> getProcessInstances(org.kie.internal.query.QueryContext queryContext)
Returns list of process instance descriptions

Parameters:
queryContext - control parameters for the result e.g. sorting, paging
Returns:
A list of ProcessInstanceDesc instances representing the available process instances.

getProcessInstances

Collection<ProcessInstanceDesc> getProcessInstances(List<Integer> states,
                                                    String initiator,
                                                    org.kie.internal.query.QueryContext queryContext)
Returns list of process instance descriptions found with given statuses and initiated by initiator.

Parameters:
states - A list of possible state (int) values that the ProcessInstance can have.
initiator - The initiator of the ProcessInstance.
queryContext - control parameters for the result e.g. sorting, paging
Returns:
A list of ProcessInstanceDesc instances representing the process instances that match the given criteria (states and initiator).

getProcessInstancesByProcessId

Collection<ProcessInstanceDesc> getProcessInstancesByProcessId(List<Integer> states,
                                                               String processId,
                                                               String initiator,
                                                               org.kie.internal.query.QueryContext queryContext)
Returns list of process instance descriptions found for given process id and statuses and initiated by initiator

Parameters:
states - A list of possible state (int) values that the ProcessInstance can have.
processId - The id of the Process (definition) used when starting the process instance.
initiator - The initiator of the ProcessInstance.
queryContext - control parameters for the result e.g. sorting, paging
Returns:
A list of ProcessInstanceDesc instances representing the process instances that match the given criteria (states, processId, and initiator).

getProcessInstancesByProcessName

Collection<ProcessInstanceDesc> getProcessInstancesByProcessName(List<Integer> states,
                                                                 String processName,
                                                                 String initiator,
                                                                 org.kie.internal.query.QueryContext queryContext)
Parameters:
states - A list of possible state (int) values that the ProcessInstance can have.
processName - The name (not id!) of the Process (definition) used when starting the process instance.
initiator - The initiator of the ProcessInstance.
queryContext - control parameters for the result e.g. sorting, paging
Returns:
A list of ProcessInstanceDesc instances representing the process instances that match the given criteria (states, processName and initiator).

getProcessInstancesByDeploymentId

Collection<ProcessInstanceDesc> getProcessInstancesByDeploymentId(String deploymentId,
                                                                  List<Integer> states,
                                                                  org.kie.internal.query.QueryContext queryContext)
Returns list of process instance descriptions found for given deployment id and statuses.

Parameters:
deploymentId - The deployment id of the runtime.
states - A list of possible state (int) values that the ProcessInstance can have.
queryContext - control parameters for the result e.g. sorting, paging
Returns:
A list of ProcessInstanceDesc instances representing the process instances that match the given criteria (deploymentId and states).

getProcessInstanceById

ProcessInstanceDesc getProcessInstanceById(long processInstanceId)
Returns process instance descriptions found for given processInstanceId if found otherwise null.

Parameters:
processInstanceId - The id of the process instance to be fetched
Returns:
Process instance information, in the form of a ProcessInstanceDesc instance.

getProcessInstancesByProcessDefinition

Collection<ProcessInstanceDesc> getProcessInstancesByProcessDefinition(String processDefId,
                                                                       org.kie.internal.query.QueryContext queryContext)
Returns list of process instance descriptions found for given process definition id

Parameters:
processDefId - The id of the process (definition)
queryContext - control parameters for the result e.g. sorting, paging
Returns:
A list of ProcessInstanceDesc instances representing the process instances that match the given criteria (deploymentId and states).

getNodeInstanceForWorkItem

NodeInstanceDesc getNodeInstanceForWorkItem(Long workItemId)
Returns active node instance descriptor for given work item id, if exists.

Parameters:
workItemId - identifier of the work item
Returns:
returns node instance desc for work item if exists and is still active, otherwise null

getProcessInstanceHistoryActive

Collection<NodeInstanceDesc> getProcessInstanceHistoryActive(long processInstanceId,
                                                             org.kie.internal.query.QueryContext queryContext)
Returns trace of all active nodes for given process instance id

Parameters:
deploymentId - unique identifier of the deployment unit
processInstanceId - unique identifier of process instance
queryContext - control parameters for the result e.g. sorting, paging
Returns:

getProcessInstanceHistoryCompleted

Collection<NodeInstanceDesc> getProcessInstanceHistoryCompleted(long processInstanceId,
                                                                org.kie.internal.query.QueryContext queryContext)
Returns trace of all executed (completed) for given process instance id

Parameters:
deploymentId - unique identifier of the deployment unit
processInstanceId - unique identifier of process instance
queryContext - control parameters for the result e.g. sorting, paging
Returns:

getProcessInstanceFullHistory

Collection<NodeInstanceDesc> getProcessInstanceFullHistory(long processInstanceId,
                                                           org.kie.internal.query.QueryContext queryContext)
Returns complete trace of all executed (completed) and active nodes for given process instance id

Parameters:
deploymentId - The id of the deployment (runtime).
processInstanceId - The id of the process used to start the process instance.
queryContext - control parameters for the result e.g. sorting, paging
Returns:
The NodeInstance information, in the form of a list of NodeInstanceDesc instances, that comes from a process instance that matches the given criteria (deploymentId, processId).

getProcessInstanceFullHistoryByType

Collection<NodeInstanceDesc> getProcessInstanceFullHistoryByType(long processInstanceId,
                                                                 RuntimeDataService.EntryType type,
                                                                 org.kie.internal.query.QueryContext queryContext)
Returns complete trace of all events of given type (START or END) for given process instance.

Parameters:
deploymentId - The id of the deployment (runtime).
processInstanceId - The id of the process used to start the process instance.
queryContext - control parameters for the result e.g. sorting, paging
type - type of events that shall be returned (START or END) - to return both use #getProcessInstanceFullHistory(String, long)
Returns:

getVariablesCurrentState

Collection<VariableDesc> getVariablesCurrentState(long processInstanceId)
Returns collections of all process variables current value for given process instance

Parameters:
processInstanceId - The process instance id.
Returns:
Information about variables in the specified process instance, represented by a list of VariableStateDesc instances.

getVariableHistory

Collection<VariableDesc> getVariableHistory(long processInstanceId,
                                            String variableId,
                                            org.kie.internal.query.QueryContext queryContext)
Returns collection of changes to given variable within scope of process instance

Parameters:
processInstanceId - The process instance id.
variableId - The id of the variable
queryContext - control parameters for the result e.g. sorting, paging
Returns:
Information about the variable with the given id in the specified process instance, represented by a list of VariableStateDesc instances.

getProcessesByDeploymentId

Collection<ProcessDefinition> getProcessesByDeploymentId(String deploymentId,
                                                         org.kie.internal.query.QueryContext queryContext)
Returns list of process definitions for given deployment id

Parameters:
deploymentId - The deployment id of the runtime.
queryContext - control parameters for the result e.g. sorting, paging
Returns:
A list of ProcessAssetDesc instances representing processes that match the given criteria (deploymentId)

getProcessesByFilter

Collection<ProcessDefinition> getProcessesByFilter(String filter,
                                                   org.kie.internal.query.QueryContext queryContext)
Returns list of process definitions that match the given filter

Parameters:
filter - A regular expression.
queryContext - control parameters for the result e.g. sorting, paging
Returns:
A list of ProcessAssetDesc instances whose name or id matches the given regular expression.

getProcesses

Collection<ProcessDefinition> getProcesses(org.kie.internal.query.QueryContext queryContext)
Returns all process definitions available

Parameters:
queryContext - control parameters for the result e.g. sorting, paging
Returns:
A list of all available processes, in the form a of a list of ProcessAssetDesc instances.

getProcessIds

Collection<String> getProcessIds(String deploymentId,
                                 org.kie.internal.query.QueryContext queryContext)
Returns list of process definition identifiers for given deployment id

Parameters:
deploymentId - The deployment id of the runtime.
queryContext - control parameters for the result e.g. sorting, paging
Returns:
A list of all available process id's for a particular deployment/runtime.

getProcessById

ProcessDefinition getProcessById(String processId)
Returns process definition for given process id

Parameters:
processId - The id of the process
Returns:
A ProcessAssetDesc instance, representing the Process with the specified (process) id.

getProcessesByDeploymentIdProcessId

ProcessDefinition getProcessesByDeploymentIdProcessId(String deploymentId,
                                                      String processId)
Returns process definition for given deployment and process identifiers

Parameters:
deploymentId - The id of the deployment (runtime)
processId - The id of the process
Returns:
A ProcessAssetDesc instance, representing the Process that is present in the specified deployment with the specified (process) id.

getTaskByWorkItemId

UserTaskInstanceDesc getTaskByWorkItemId(Long workItemId)
Return a task by its workItemId.

Parameters:
workItemId -
Returns:

getTaskById

UserTaskInstanceDesc getTaskById(Long taskId)
Return a task by its taskId.

Parameters:
taskId -
Returns:

getTasksAssignedAsBusinessAdministrator

List<TaskSummary> getTasksAssignedAsBusinessAdministrator(String userId,
                                                          org.kie.internal.query.QueryFilter filter)
Return a list of assigned tasks as a Business Administrator. Business administrators play the same role as task stakeholders but at task type level. Therefore, business administrators can perform the exact same operations as task stakeholders. Business administrators may also observe the progress of notifications.

Parameters:
userId -
filter -
Returns:

getTasksAssignedAsPotentialOwner

List<TaskSummary> getTasksAssignedAsPotentialOwner(String userId,
                                                   org.kie.internal.query.QueryFilter filter)
Return a list of tasks the user is eligible for.

Parameters:
userId -
filter -
Returns:

getTasksAssignedAsPotentialOwner

List<TaskSummary> getTasksAssignedAsPotentialOwner(String userId,
                                                   List<String> groupIds,
                                                   org.kie.internal.query.QueryFilter filter)
Return a list of tasks the user or groups are eligible for.

Parameters:
userId -
groupIds -
filter -
Returns:

getTasksAssignedAsPotentialOwnerByStatus

List<TaskSummary> getTasksAssignedAsPotentialOwnerByStatus(String userId,
                                                           List<Status> status,
                                                           org.kie.internal.query.QueryFilter filter)
Return a list of tasks the user is eligible for with one of the listed statuses.

Parameters:
userId -
status -
filter -
Returns:

getTasksAssignedAsPotentialOwner

List<TaskSummary> getTasksAssignedAsPotentialOwner(String userId,
                                                   List<String> groupIds,
                                                   List<Status> status,
                                                   org.kie.internal.query.QueryFilter filter)
Return a list of tasks the user or groups are eligible for with one of the listed statuses.

Parameters:
userId -
groupIds -
status -
filter -
Returns:

getTasksAssignedAsPotentialOwnerByExpirationDateOptional

List<TaskSummary> getTasksAssignedAsPotentialOwnerByExpirationDateOptional(String userId,
                                                                           List<Status> status,
                                                                           Date from,
                                                                           org.kie.internal.query.QueryFilter filter)
Return a list of tasks the user is eligible for with one of the listed statuses and expiration date starting at from. Tasks that do not have expiration date set will also be included in the result set.

Parameters:
userId -
status -
from -
filter -
Returns:

getTasksOwnedByExpirationDateOptional

List<TaskSummary> getTasksOwnedByExpirationDateOptional(String userId,
                                                        List<Status> strStatuses,
                                                        Date from,
                                                        org.kie.internal.query.QueryFilter filter)
Return a list of tasks the user has claimed with one of the listed statuses and expiration date starting at from. Tasks that do not have expiration date set will also be included in the result set.

Parameters:
userId -
status -
from -
filter -
Returns:

getTasksOwned

List<TaskSummary> getTasksOwned(String userId,
                                org.kie.internal.query.QueryFilter filter)
Return a list of tasks the user has claimed.

Parameters:
userId -
filter -
Returns:

getTasksOwnedByStatus

List<TaskSummary> getTasksOwnedByStatus(String userId,
                                        List<Status> status,
                                        org.kie.internal.query.QueryFilter filter)
Return a list of tasks the user has claimed with one of the listed statuses.

Parameters:
userId -
status -
filter -
Returns:

getTasksByProcessInstanceId

List<Long> getTasksByProcessInstanceId(Long processInstanceId)
Get a list of tasks the Process Instance is waiting on.

Parameters:
processInstanceId -
Returns:

getTasksByStatusByProcessInstanceId

List<TaskSummary> getTasksByStatusByProcessInstanceId(Long processInstanceId,
                                                      List<Status> status,
                                                      org.kie.internal.query.QueryFilter filter)
Get a list of tasks the Process Instance is waiting on with one of the listed statuses.

Parameters:
processInstanceId -
status -
filter -
Returns:

jBPM distribution 6.2.0.CR2

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