Package org.jbpm.kie.services.impl
Class RuntimeDataServiceImpl
- java.lang.Object
-
- org.jbpm.kie.services.impl.RuntimeDataServiceImpl
-
- All Implemented Interfaces:
DeploymentEventListener,RuntimeDataService
- Direct Known Subclasses:
RuntimeDataServiceCDIImpl,RuntimeDataServiceEJBImpl
public class RuntimeDataServiceImpl extends Object implements RuntimeDataService, DeploymentEventListener
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jbpm.services.api.RuntimeDataService
RuntimeDataService.EntryType
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<ProcessDefinition>availableProcessesprotected Set<String>deploymentIdsprotected TaskAuditServicetaskAuditServiceprotected org.kie.api.task.TaskServicetaskService
-
Constructor Summary
Constructors Constructor Description RuntimeDataServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected List<?>adoptList(List<?> source, List<?> values)protected voidapplyDeploymentFilter(Map<String,Object> params)protected <T> Collection<T>applyPaginition(List<T> input, org.kie.api.runtime.query.QueryContext queryContext)protected voidapplyQueryContext(Map<String,Object> params, org.kie.api.runtime.query.QueryContext queryContext)protected voidapplyQueryFilter(Map<String,Object> params, org.kie.internal.query.QueryFilter queryFilter)protected voidapplySorting(List<ProcessDefinition> input, org.kie.api.runtime.query.QueryContext queryContext)List<org.kie.internal.task.api.AuditTask>getAllAdminAuditTask(String userId, org.kie.internal.query.QueryFilter filter)Get a list of tasks admin audit (user in businessAdministrators) logs for the user provides applying the query filter listed statuses.List<org.kie.internal.task.api.AuditTask>getAllAuditTask(String userId, org.kie.internal.query.QueryFilter filter)Get a list of tasks audit logs for the user provides applying the query filter listed statuses.List<org.kie.internal.task.api.AuditTask>getAllAuditTaskByStatus(String userId, org.kie.internal.query.QueryFilter filter)Get a list of all active tasks audit logs for the user provides applying the query filter listed statuses.List<org.kie.internal.task.api.AuditTask>getAllGroupAuditTask(String userId, org.kie.internal.query.QueryFilter filter)Get a list of group tasks (actualOwner == null) audit logs for the user provides applying the query filter listed statuses.NodeInstanceDescgetNodeInstanceForWorkItem(Long workItemId)Returns active node instance descriptor for given work item id, if exists.Collection<NodeInstanceDesc>getNodeInstancesByCorrelationKeyNodeType(org.kie.internal.process.CorrelationKey correlationKey, List<Integer> states, List<String> nodeTypes, org.kie.api.runtime.query.QueryContext queryContext)Returns trace of all nodes for a given node types and correlation keyCollection<NodeInstanceDesc>getNodeInstancesByNodeType(long processInstanceId, List<String> nodeTypes, org.kie.api.runtime.query.QueryContext queryContext)Returns trace of all nodes for a given node types and process instance idProcessDefinitiongetProcessById(String processId)Deprecated.Collection<ProcessDefinition>getProcesses(org.kie.api.runtime.query.QueryContext queryContext)Returns all process definitions availableCollection<ProcessDefinition>getProcessesByDeploymentId(String deploymentId, org.kie.api.runtime.query.QueryContext queryContext)Returns list of process definitions for given deployment idProcessDefinitiongetProcessesByDeploymentIdProcessId(String deploymentId, String processId)Returns process definition for given deployment and process identifiersCollection<ProcessDefinition>getProcessesByFilter(String filter, org.kie.api.runtime.query.QueryContext queryContext)Returns list of process definitions that match the given filterCollection<ProcessDefinition>getProcessesById(String processId)Returns process definitions for given process id regardless of the deploymentCollection<String>getProcessIds(String deploymentId, org.kie.api.runtime.query.QueryContext queryContext)Returns list of process definition identifiers for given deployment idProcessInstanceDescgetProcessInstanceByCorrelationKey(org.kie.internal.process.CorrelationKey correlationKey)Returns active process instance description found for given correlation key if found otherwise null.ProcessInstanceDescgetProcessInstanceById(long processId)Returns process instance descriptions found for given processInstanceId if found otherwise null.Collection<NodeInstanceDesc>getProcessInstanceFullHistory(long processId, org.kie.api.runtime.query.QueryContext queryContext)Returns complete trace of all executed (completed) and active nodes for given process instance idCollection<NodeInstanceDesc>getProcessInstanceFullHistoryByType(long processId, RuntimeDataService.EntryType type, org.kie.api.runtime.query.QueryContext queryContext)Returns complete trace of all events of given type (START, END, ABORTED, SKIPPED, OBSOLETE or ERROR) for given process instance.protected Collection<NodeInstanceDesc>getProcessInstanceHistory(long processId, boolean completed, org.kie.api.runtime.query.QueryContext queryContext)Collection<NodeInstanceDesc>getProcessInstanceHistoryActive(long processId, org.kie.api.runtime.query.QueryContext queryContext)Returns trace of all active nodes for given process instance idCollection<NodeInstanceDesc>getProcessInstanceHistoryCompleted(long processId, org.kie.api.runtime.query.QueryContext queryContext)Returns trace of all executed (completed) for given process instance idCollection<ProcessInstanceDesc>getProcessInstances(List<Integer> states, String initiator, org.kie.api.runtime.query.QueryContext queryContext)Returns list of process instance descriptions found with given statuses and initiated byinitiator.Collection<ProcessInstanceDesc>getProcessInstances(org.kie.api.runtime.query.QueryContext queryContext)Returns list of process instance descriptionsCollection<ProcessInstanceDesc>getProcessInstancesByCorrelationKey(org.kie.internal.process.CorrelationKey correlationKey, org.kie.api.runtime.query.QueryContext queryContext)Returns process instances descriptions (regardless of their states) found for given correlation key if found otherwise empty list.Collection<ProcessInstanceDesc>getProcessInstancesByCorrelationKeyAndStatus(org.kie.internal.process.CorrelationKey correlationKey, List<Integer> states, org.kie.api.runtime.query.QueryContext queryContext)Returns process instances descriptions filtered by their states found for given correlation key if found otherwise empty list.Collection<ProcessInstanceDesc>getProcessInstancesByDeploymentId(String deploymentId, List<Integer> states, org.kie.api.runtime.query.QueryContext queryContext)Returns list of process instance descriptions found for given deployment id and statuses.Collection<ProcessInstanceDesc>getProcessInstancesByParent(Long parentProcessInstanceId, List<Integer> states, org.kie.api.runtime.query.QueryContext queryContext)Returns list of process instance descriptionsCollection<ProcessInstanceDesc>getProcessInstancesByProcessDefinition(String processDefId, List<Integer> states, org.kie.api.runtime.query.QueryContext queryContext)Returns list of process instance descriptions found for given process definition idCollection<ProcessInstanceDesc>getProcessInstancesByProcessDefinition(String processDefId, org.kie.api.runtime.query.QueryContext queryContext)Returns list of process instance descriptions found for given process definition idCollection<ProcessInstanceDesc>getProcessInstancesByProcessId(List<Integer> states, String processId, String initiator, org.kie.api.runtime.query.QueryContext queryContext)Returns list of process instance descriptions found for given process id and statuses and initiated byinitiatorCollection<ProcessInstanceDesc>getProcessInstancesByProcessName(List<Integer> states, String processName, String initiator, org.kie.api.runtime.query.QueryContext queryContext)Collection<ProcessInstanceDesc>getProcessInstancesByVariable(String variableName, List<Integer> states, org.kie.api.runtime.query.QueryContext queryContext)Returns process instance descriptions found for process instance that have defined given variableCollection<ProcessInstanceDesc>getProcessInstancesByVariableAndValue(String variableName, String variableValue, List<Integer> states, org.kie.api.runtime.query.QueryContext queryContext)Returns process instance descriptions found for process instance that have defined given variable and its value matches given variableValueCollection<ProcessInstanceDesc>getProcessInstancesWithSubprocessByProcessInstanceId(Long parentProcessInstanceId, List<Integer> states, org.kie.api.runtime.query.QueryContext queryContext)Returns list of process instance descriptionsUserTaskInstanceDescgetTaskById(Long taskId)Return a task by its taskId.UserTaskInstanceDescgetTaskById(Long taskId, boolean withSLA)Return a task by its taskId with SLA data if the withSLA param is true.UserTaskInstanceDescgetTaskByWorkItemId(Long workItemId)Return a task by its workItemId.List<org.kie.internal.task.api.model.TaskEvent>getTaskEvents(long taskId, org.kie.internal.query.QueryFilter filter)Gets a list of task events for given taskList<org.kie.api.task.model.TaskSummary>getTasksAssignedAsBusinessAdministrator(String userId, org.kie.internal.query.QueryFilter filter)Return a list of assigned tasks as a Business Administrator.List<org.kie.api.task.model.TaskSummary>getTasksAssignedAsBusinessAdministratorByStatus(String userId, List<org.kie.api.task.model.Status> statuses, org.kie.internal.query.QueryFilter filter)Return a list of assigned tasks as a Business Administrator for with one of the listed statusesList<org.kie.api.task.model.TaskSummary>getTasksAssignedAsPotentialOwner(String userId, List<String> groupIds, List<org.kie.api.task.model.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<org.kie.api.task.model.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<org.kie.api.task.model.TaskSummary>getTasksAssignedAsPotentialOwner(String userId, org.kie.internal.query.QueryFilter filter)Return a list of tasks the user is eligible for.List<org.kie.api.task.model.TaskSummary>getTasksAssignedAsPotentialOwnerByExpirationDateOptional(String userId, List<org.kie.api.task.model.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 atfrom.List<org.kie.api.task.model.TaskSummary>getTasksAssignedAsPotentialOwnerByStatus(String userId, List<org.kie.api.task.model.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<org.kie.api.task.model.TaskSummary>getTasksByStatusByProcessInstanceId(Long processInstanceId, List<org.kie.api.task.model.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<org.kie.api.task.model.TaskSummary>getTasksByVariable(String userId, String variableName, List<org.kie.api.task.model.Status> statuses, org.kie.api.runtime.query.QueryContext queryContext)Gets a list ofTaskSummaryinstances for the given argumentsList<org.kie.api.task.model.TaskSummary>getTasksByVariableAndValue(String userId, String variableName, String variableValue, List<org.kie.api.task.model.Status> statuses, org.kie.api.runtime.query.QueryContext queryContext)Gets a list ofTaskSummaryinstances for the given argumentsList<org.kie.api.task.model.TaskSummary>getTasksOwned(String userId, org.kie.internal.query.QueryFilter filter)Return a list of tasks the user has claimed.List<org.kie.api.task.model.TaskSummary>getTasksOwnedByExpirationDateOptional(String userId, List<org.kie.api.task.model.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 atfrom.List<org.kie.api.task.model.TaskSummary>getTasksOwnedByStatus(String userId, List<org.kie.api.task.model.Status> status, org.kie.internal.query.QueryFilter filter)Return a list of tasks the user has claimed with one of the listed statuses.org.kie.api.task.UserGroupCallbackgetUserGroupCallback()Collection<VariableDesc>getVariableHistory(long processInstanceId, String variableId, org.kie.api.runtime.query.QueryContext queryContext)Returns collection of changes to given variable within scope of process instanceCollection<VariableDesc>getVariablesCurrentState(long processInstanceId)Returns collections of all process variables current value for given process instanceprotected List<?>mergeLists(List<?> source, List<?> values)voidonActivate(DeploymentEvent event)voidonDeactivate(DeploymentEvent event)voidonDeploy(DeploymentEvent event)voidonUnDeploy(DeploymentEvent event)voidsetCommandService(TransactionalCommandService commandService)voidsetDeploymentRolesManager(DeploymentRolesManager deploymentRolesManager)voidsetIdentityProvider(org.kie.internal.identity.IdentityProvider identityProvider)voidsetTaskAuditService(TaskAuditService taskAuditService)voidsetTaskService(org.kie.api.task.TaskService taskService)voidsetUserGroupCallback(org.kie.api.task.UserGroupCallback userGroupCallback)org.kie.internal.task.query.TaskSummaryQueryBuildertaskSummaryQuery(String userId)Query onTaskSummaryinstaances.
-
-
-
Field Detail
-
availableProcesses
protected Set<ProcessDefinition> availableProcesses
-
taskService
protected org.kie.api.task.TaskService taskService
-
taskAuditService
protected TaskAuditService taskAuditService
-
-
Method Detail
-
setCommandService
public void setCommandService(TransactionalCommandService commandService)
-
setIdentityProvider
public void setIdentityProvider(org.kie.internal.identity.IdentityProvider identityProvider)
-
setUserGroupCallback
public void setUserGroupCallback(org.kie.api.task.UserGroupCallback userGroupCallback)
-
getUserGroupCallback
public org.kie.api.task.UserGroupCallback getUserGroupCallback()
-
setTaskService
public void setTaskService(org.kie.api.task.TaskService taskService)
-
setTaskAuditService
public void setTaskAuditService(TaskAuditService taskAuditService)
-
setDeploymentRolesManager
public void setDeploymentRolesManager(DeploymentRolesManager deploymentRolesManager)
-
onDeploy
public void onDeploy(DeploymentEvent event)
- Specified by:
onDeployin interfaceDeploymentEventListener
-
onUnDeploy
public void onUnDeploy(DeploymentEvent event)
- Specified by:
onUnDeployin interfaceDeploymentEventListener
-
onActivate
public void onActivate(DeploymentEvent event)
- Specified by:
onActivatein interfaceDeploymentEventListener
-
onDeactivate
public void onDeactivate(DeploymentEvent event)
- Specified by:
onDeactivatein interfaceDeploymentEventListener
-
applyQueryContext
protected void applyQueryContext(Map<String,Object> params, org.kie.api.runtime.query.QueryContext queryContext)
-
applyPaginition
protected <T> Collection<T> applyPaginition(List<T> input, org.kie.api.runtime.query.QueryContext queryContext)
-
applySorting
protected void applySorting(List<ProcessDefinition> input, org.kie.api.runtime.query.QueryContext queryContext)
-
getProcessesByDeploymentId
public Collection<ProcessDefinition> getProcessesByDeploymentId(String deploymentId, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:RuntimeDataServiceReturns list of process definitions for given deployment id- Specified by:
getProcessesByDeploymentIdin interfaceRuntimeDataService- Parameters:
deploymentId- The deployment id of the runtime.queryContext- control parameters for the result e.g. sorting, paging- Returns:
- A list of
ProcessDefinitioninstances representing processes that match the given criteria (deploymentId)
-
getProcessesByDeploymentIdProcessId
public ProcessDefinition getProcessesByDeploymentIdProcessId(String deploymentId, String processId)
Description copied from interface:RuntimeDataServiceReturns process definition for given deployment and process identifiers- Specified by:
getProcessesByDeploymentIdProcessIdin interfaceRuntimeDataService- Parameters:
deploymentId- The id of the deployment (runtime)processId- The id of the process- Returns:
- A
ProcessDefinitioninstance, representing theProcessthat is present in the specified deployment with the specified (process) id.
-
getProcessesByFilter
public Collection<ProcessDefinition> getProcessesByFilter(String filter, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:RuntimeDataServiceReturns list of process definitions that match the given filter- Specified by:
getProcessesByFilterin interfaceRuntimeDataService- Parameters:
filter- A regular expression.queryContext- control parameters for the result e.g. sorting, paging- Returns:
- A list of
ProcessDefinitioninstances whose name or id matches the given regular expression.
-
getProcessById
@Deprecated public ProcessDefinition getProcessById(String processId)
Deprecated.Description copied from interface:RuntimeDataServiceDeprecated since 6.3 as it does return only first ProcessDefinition even if there are more that reside in different deployments. UsegetProcessesById(String processId)instead
Returns process definition for given process id- Specified by:
getProcessByIdin interfaceRuntimeDataService- Parameters:
processId- The id of the process- Returns:
- A
ProcessDefinitioninstance, representing theProcesswith the specified (process) id. - See Also:
RuntimeDataService.getProcessesById(String)
-
getProcessesById
public Collection<ProcessDefinition> getProcessesById(String processId)
Description copied from interface:RuntimeDataServiceReturns process definitions for given process id regardless of the deployment- Specified by:
getProcessesByIdin interfaceRuntimeDataService- Parameters:
processId- The id of the process- Returns:
- A
ProcessDefinitioninstance, representing theProcesswith the specified (process) id.
-
getProcesses
public Collection<ProcessDefinition> getProcesses(org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:RuntimeDataServiceReturns all process definitions available- Specified by:
getProcessesin interfaceRuntimeDataService- 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
ProcessDefinitioninstances.
-
getProcessIds
public Collection<String> getProcessIds(String deploymentId, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:RuntimeDataServiceReturns list of process definition identifiers for given deployment id- Specified by:
getProcessIdsin interfaceRuntimeDataService- 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.
-
getProcessInstances
public Collection<ProcessInstanceDesc> getProcessInstances(org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:RuntimeDataServiceReturns list of process instance descriptions- Specified by:
getProcessInstancesin interfaceRuntimeDataService- Parameters:
queryContext- control parameters for the result e.g. sorting, paging- Returns:
- A list of
ProcessInstanceDescinstances representing the available process instances.
-
getProcessInstances
public Collection<ProcessInstanceDesc> getProcessInstances(List<Integer> states, String initiator, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:RuntimeDataServiceReturns list of process instance descriptions found with given statuses and initiated byinitiator.- Specified by:
getProcessInstancesin interfaceRuntimeDataService- Parameters:
states- A list of possible state (int) values that theProcessInstancecan have.initiator- The initiator of theProcessInstance.queryContext- control parameters for the result e.g. sorting, paging- Returns:
- A list of
ProcessInstanceDescinstances representing the process instances that match the given criteria (states and initiator).
-
getProcessInstancesByDeploymentId
public Collection<ProcessInstanceDesc> getProcessInstancesByDeploymentId(String deploymentId, List<Integer> states, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:RuntimeDataServiceReturns list of process instance descriptions found for given deployment id and statuses.- Specified by:
getProcessInstancesByDeploymentIdin interfaceRuntimeDataService- Parameters:
deploymentId- The deployment id of the runtime.states- A list of possible state (int) values that theProcessInstancecan have.queryContext- control parameters for the result e.g. sorting, paging- Returns:
- A list of
ProcessInstanceDescinstances representing the process instances that match the given criteria (deploymentId and states).
-
getProcessInstancesByProcessDefinition
public Collection<ProcessInstanceDesc> getProcessInstancesByProcessDefinition(String processDefId, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:RuntimeDataServiceReturns list of process instance descriptions found for given process definition id- Specified by:
getProcessInstancesByProcessDefinitionin interfaceRuntimeDataService- Parameters:
processDefId- The id of the process (definition)queryContext- control parameters for the result e.g. sorting, paging- Returns:
- A list of
ProcessInstanceDescinstances representing the process instances that match the given criteria (deploymentId and states).
-
getProcessInstancesByProcessDefinition
public Collection<ProcessInstanceDesc> getProcessInstancesByProcessDefinition(String processDefId, List<Integer> states, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:RuntimeDataServiceReturns list of process instance descriptions found for given process definition id- Specified by:
getProcessInstancesByProcessDefinitionin interfaceRuntimeDataService- Parameters:
processDefId- The id of the process (definition)states- A list of possible state (int) values that theProcessInstancecan have.queryContext- control parameters for the result e.g. sorting, paging- Returns:
- A list of
ProcessInstanceDescinstances representing the process instances that match the given criteria (deploymentId and states).
-
getProcessInstanceById
public ProcessInstanceDesc getProcessInstanceById(long processId)
Description copied from interface:RuntimeDataServiceReturns process instance descriptions found for given processInstanceId if found otherwise null. At the same time it will fetch all active tasks (in status: Ready, Reserved, InProgress) to provide information what user task is keeping instance and who owns them (if were already claimed).- Specified by:
getProcessInstanceByIdin interfaceRuntimeDataService- Parameters:
processId- The id of the process instance to be fetched- Returns:
- Process instance information, in the form of a
ProcessInstanceDescinstance.
-
getProcessInstanceByCorrelationKey
public ProcessInstanceDesc getProcessInstanceByCorrelationKey(org.kie.internal.process.CorrelationKey correlationKey)
Description copied from interface:RuntimeDataServiceReturns active process instance description found for given correlation key if found otherwise null. At the same time it will fetch all active tasks (in status: Ready, Reserved, InProgress) to provide information what user task is keeping instance and who owns them (if were already claimed).- Specified by:
getProcessInstanceByCorrelationKeyin interfaceRuntimeDataService- Parameters:
correlationKey- correlation key assigned to process instance- Returns:
- Process instance information, in the form of a
ProcessInstanceDescinstance.
-
getProcessInstancesByCorrelationKey
public Collection<ProcessInstanceDesc> getProcessInstancesByCorrelationKey(org.kie.internal.process.CorrelationKey correlationKey, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:RuntimeDataServiceReturns process instances descriptions (regardless of their states) found for given correlation key if found otherwise empty list. This query uses 'like' to match correlation key so it allows to pass only partial keys - though matching is done based on 'starts with'- Specified by:
getProcessInstancesByCorrelationKeyin interfaceRuntimeDataService- Parameters:
correlationKey- correlation key assigned to process instance- Returns:
- A list of
ProcessInstanceDescinstances representing the process instances that match the given correlation key
-
getProcessInstancesByCorrelationKeyAndStatus
public Collection<ProcessInstanceDesc> getProcessInstancesByCorrelationKeyAndStatus(org.kie.internal.process.CorrelationKey correlationKey, List<Integer> states, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:RuntimeDataServiceReturns process instances descriptions filtered by their states found for given correlation key if found otherwise empty list. This query uses 'like' to match correlation key so it allows to pass only partial keys - though matching is done based on 'starts with'- Specified by:
getProcessInstancesByCorrelationKeyAndStatusin interfaceRuntimeDataService- Parameters:
correlationKey- correlation key assigned to process instancestates- A list of possible state (int) values that theProcessInstancecan have.- Returns:
- A list of
ProcessInstanceDescinstances representing the process instances that match the given correlation key
-
getProcessInstancesByProcessId
public Collection<ProcessInstanceDesc> getProcessInstancesByProcessId(List<Integer> states, String processId, String initiator, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:RuntimeDataServiceReturns list of process instance descriptions found for given process id and statuses and initiated byinitiator- Specified by:
getProcessInstancesByProcessIdin interfaceRuntimeDataService- Parameters:
states- A list of possible state (int) values that theProcessInstancecan have.processId- The id of theProcess(definition) used when starting the process instance.initiator- The initiator of theProcessInstance.queryContext- control parameters for the result e.g. sorting, paging- Returns:
- A list of
ProcessInstanceDescinstances representing the process instances that match the given criteria (states, processId, and initiator).
-
getProcessInstancesByProcessName
public Collection<ProcessInstanceDesc> getProcessInstancesByProcessName(List<Integer> states, String processName, String initiator, org.kie.api.runtime.query.QueryContext queryContext)
- Specified by:
getProcessInstancesByProcessNamein interfaceRuntimeDataService- Parameters:
states- A list of possible state (int) values that theProcessInstancecan have.processName- The name (not id!) of theProcess(definition) used when starting the process instance.initiator- The initiator of theProcessInstance.queryContext- control parameters for the result e.g. sorting, paging- Returns:
- A list of
ProcessInstanceDescinstances representing the process instances that match the given criteria (states, processName and initiator).
-
getProcessInstancesByVariable
public Collection<ProcessInstanceDesc> getProcessInstancesByVariable(String variableName, List<Integer> states, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:RuntimeDataServiceReturns process instance descriptions found for process instance that have defined given variable- Specified by:
getProcessInstancesByVariablein interfaceRuntimeDataService- Parameters:
variableName- name of the variable that process instance should havestates- A list of possible state (int) values that theProcessInstancecan have. If null will return only active instancesqueryContext- control parameters for the result e.g. sorting, paging
-
getProcessInstancesByVariableAndValue
public Collection<ProcessInstanceDesc> getProcessInstancesByVariableAndValue(String variableName, String variableValue, List<Integer> states, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:RuntimeDataServiceReturns process instance descriptions found for process instance that have defined given variable and its value matches given variableValue- Specified by:
getProcessInstancesByVariableAndValuein interfaceRuntimeDataService- Parameters:
variableName- name of the variable that process instance should havevariableValue- value of the variable to matchstates- A list of possible state (int) values that theProcessInstancecan have. If null will return only active instancesqueryContext- control parameters for the result e.g. sorting, paging
-
getProcessInstancesByParent
public Collection<ProcessInstanceDesc> getProcessInstancesByParent(Long parentProcessInstanceId, List<Integer> states, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:RuntimeDataServiceReturns list of process instance descriptions- Specified by:
getProcessInstancesByParentin interfaceRuntimeDataService- Parameters:
parentProcessInstanceId- id of the parent process instancestates- list of possible state (int) values that theProcessInstancecan have. If null will return only active instancesqueryContext- control parameters for the result e.g. sorting, paging- Returns:
- A list of
ProcessInstanceDescinstances representing the available process instances.
-
getProcessInstancesWithSubprocessByProcessInstanceId
public Collection<ProcessInstanceDesc> getProcessInstancesWithSubprocessByProcessInstanceId(Long parentProcessInstanceId, List<Integer> states, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:RuntimeDataServiceReturns list of process instance descriptions- Specified by:
getProcessInstancesWithSubprocessByProcessInstanceIdin interfaceRuntimeDataService- Parameters:
parentProcessInstanceId- id of the parent process instance- Returns:
- A list of
ProcessInstanceDescinstances representing the full hierarchy of this process
-
getProcessInstanceHistoryActive
public Collection<NodeInstanceDesc> getProcessInstanceHistoryActive(long processId, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:RuntimeDataServiceReturns trace of all active nodes for given process instance id- Specified by:
getProcessInstanceHistoryActivein interfaceRuntimeDataService- Parameters:
processId- unique identifier of process instancequeryContext- control parameters for the result e.g. sorting, paging- Returns:
-
getProcessInstanceHistoryCompleted
public Collection<NodeInstanceDesc> getProcessInstanceHistoryCompleted(long processId, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:RuntimeDataServiceReturns trace of all executed (completed) for given process instance id- Specified by:
getProcessInstanceHistoryCompletedin interfaceRuntimeDataService- Parameters:
processId- unique identifier of process instancequeryContext- control parameters for the result e.g. sorting, paging- Returns:
-
getProcessInstanceHistory
protected Collection<NodeInstanceDesc> getProcessInstanceHistory(long processId, boolean completed, org.kie.api.runtime.query.QueryContext queryContext)
-
getProcessInstanceFullHistory
public Collection<NodeInstanceDesc> getProcessInstanceFullHistory(long processId, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:RuntimeDataServiceReturns complete trace of all executed (completed) and active nodes for given process instance id- Specified by:
getProcessInstanceFullHistoryin interfaceRuntimeDataService- Parameters:
processId- The id of the process used to start the process instance.queryContext- control parameters for the result e.g. sorting, paging- Returns:
- The
NodeInstanceinformation, in the form of a list ofNodeInstanceDescinstances, that comes from a process instance that matches the given criteria (deploymentId, processId).
-
getProcessInstanceFullHistoryByType
public Collection<NodeInstanceDesc> getProcessInstanceFullHistoryByType(long processId, RuntimeDataService.EntryType type, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:RuntimeDataServiceReturns complete trace of all events of given type (START, END, ABORTED, SKIPPED, OBSOLETE or ERROR) for given process instance.- Specified by:
getProcessInstanceFullHistoryByTypein interfaceRuntimeDataService- Parameters:
processId- The id of the process used to start the process instance.type- type of events that shall be returned (START, END, ABORTED, SKIPPED, OBSOLETE or ERROR) - to return all useRuntimeDataService.getProcessInstanceFullHistory(long, QueryContext)queryContext- control parameters for the result e.g. sorting, paging- Returns:
- collection of node instance descriptions
-
getNodeInstanceForWorkItem
public NodeInstanceDesc getNodeInstanceForWorkItem(Long workItemId)
Description copied from interface:RuntimeDataServiceReturns active node instance descriptor for given work item id, if exists.- Specified by:
getNodeInstanceForWorkItemin interfaceRuntimeDataService- Parameters:
workItemId- identifier of the work item- Returns:
- returns node instance desc for work item if exists and is still active, otherwise null
-
getNodeInstancesByNodeType
public Collection<NodeInstanceDesc> getNodeInstancesByNodeType(long processInstanceId, List<String> nodeTypes, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:RuntimeDataServiceReturns trace of all nodes for a given node types and process instance id- Specified by:
getNodeInstancesByNodeTypein interfaceRuntimeDataService- Parameters:
processInstanceId- unique identifier of process instancenodeTypes- list of node types to filter nodes of process instancequeryContext- control parameters for the result e.g. sorting, paging- Returns:
- collection of node instance descriptions
-
getNodeInstancesByCorrelationKeyNodeType
public Collection<NodeInstanceDesc> getNodeInstancesByCorrelationKeyNodeType(org.kie.internal.process.CorrelationKey correlationKey, List<Integer> states, List<String> nodeTypes, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:RuntimeDataServiceReturns trace of all nodes for a given node types and correlation key- Specified by:
getNodeInstancesByCorrelationKeyNodeTypein interfaceRuntimeDataService- Parameters:
correlationKey- correlation keystates- list of statesnodeTypes- list of node types to filter nodes of process instancequeryContext- control parameters for the result e.g. sorting, paging- Returns:
- collection of node instance descriptions
-
getVariablesCurrentState
public Collection<VariableDesc> getVariablesCurrentState(long processInstanceId)
Description copied from interface:RuntimeDataServiceReturns collections of all process variables current value for given process instance- Specified by:
getVariablesCurrentStatein interfaceRuntimeDataService- Parameters:
processInstanceId- The process instance id.- Returns:
- Information about variables in the specified process instance,
represented by a list of
VariableDescinstances.
-
getVariableHistory
public Collection<VariableDesc> getVariableHistory(long processInstanceId, String variableId, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:RuntimeDataServiceReturns collection of changes to given variable within scope of process instance- Specified by:
getVariableHistoryin interfaceRuntimeDataService- Parameters:
processInstanceId- The process instance id.variableId- The id of the variablequeryContext- 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
VariableDescinstances.
-
getTaskByWorkItemId
public UserTaskInstanceDesc getTaskByWorkItemId(Long workItemId)
Description copied from interface:RuntimeDataServiceReturn a task by its workItemId.- Specified by:
getTaskByWorkItemIdin interfaceRuntimeDataService- Returns:
-
getTaskById
public UserTaskInstanceDesc getTaskById(Long taskId)
Description copied from interface:RuntimeDataServiceReturn a task by its taskId.- Specified by:
getTaskByIdin interfaceRuntimeDataService- Returns:
-
getTaskById
public UserTaskInstanceDesc getTaskById(Long taskId, boolean withSLA)
Description copied from interface:RuntimeDataServiceReturn a task by its taskId with SLA data if the withSLA param is true.- Specified by:
getTaskByIdin interfaceRuntimeDataService- Returns:
-
getTasksAssignedAsBusinessAdministrator
public List<org.kie.api.task.model.TaskSummary> getTasksAssignedAsBusinessAdministrator(String userId, org.kie.internal.query.QueryFilter filter)
Description copied from interface:RuntimeDataServiceReturn 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.- Specified by:
getTasksAssignedAsBusinessAdministratorin interfaceRuntimeDataService- Returns:
- list of @
TaskSummarytask summaries
-
getTasksAssignedAsPotentialOwner
public List<org.kie.api.task.model.TaskSummary> getTasksAssignedAsPotentialOwner(String userId, org.kie.internal.query.QueryFilter filter)
Description copied from interface:RuntimeDataServiceReturn a list of tasks the user is eligible for.- Specified by:
getTasksAssignedAsPotentialOwnerin interfaceRuntimeDataService- Returns:
- list of @
TaskSummarytask summaries
-
getTasksAssignedAsPotentialOwner
public List<org.kie.api.task.model.TaskSummary> getTasksAssignedAsPotentialOwner(String userId, List<String> groupIds, org.kie.internal.query.QueryFilter filter)
Description copied from interface:RuntimeDataServiceReturn a list of tasks the user or groups are eligible for.- Specified by:
getTasksAssignedAsPotentialOwnerin interfaceRuntimeDataService- Returns:
- list of @
TaskSummarytask summaries
-
getTasksAssignedAsPotentialOwner
public List<org.kie.api.task.model.TaskSummary> getTasksAssignedAsPotentialOwner(String userId, List<String> groupIds, List<org.kie.api.task.model.Status> status, org.kie.internal.query.QueryFilter filter)
Description copied from interface:RuntimeDataServiceReturn a list of tasks the user or groups are eligible for with one of the listed statuses.- Specified by:
getTasksAssignedAsPotentialOwnerin interfaceRuntimeDataService- Returns:
- list of @
TaskSummarytask summaries
-
getTasksAssignedAsPotentialOwnerByStatus
public List<org.kie.api.task.model.TaskSummary> getTasksAssignedAsPotentialOwnerByStatus(String userId, List<org.kie.api.task.model.Status> status, org.kie.internal.query.QueryFilter filter)
Description copied from interface:RuntimeDataServiceReturn a list of tasks the user is eligible for with one of the listed statuses.- Specified by:
getTasksAssignedAsPotentialOwnerByStatusin interfaceRuntimeDataService- Returns:
- list of @
TaskSummarytask summaries
-
getTasksAssignedAsPotentialOwnerByExpirationDateOptional
public List<org.kie.api.task.model.TaskSummary> getTasksAssignedAsPotentialOwnerByExpirationDateOptional(String userId, List<org.kie.api.task.model.Status> status, Date from, org.kie.internal.query.QueryFilter filter)
Description copied from interface:RuntimeDataServiceReturn a list of tasks the user is eligible for with one of the listed statuses and expiration date starting atfrom. Tasks that do not have expiration date set will also be included in the result set.- Specified by:
getTasksAssignedAsPotentialOwnerByExpirationDateOptionalin interfaceRuntimeDataService- Returns:
- list of @
TaskSummarytask summaries
-
getTasksOwnedByExpirationDateOptional
public List<org.kie.api.task.model.TaskSummary> getTasksOwnedByExpirationDateOptional(String userId, List<org.kie.api.task.model.Status> strStatuses, Date from, org.kie.internal.query.QueryFilter filter)
Description copied from interface:RuntimeDataServiceReturn a list of tasks the user has claimed with one of the listed statuses and expiration date starting atfrom. Tasks that do not have expiration date set will also be included in the result set.- Specified by:
getTasksOwnedByExpirationDateOptionalin interfaceRuntimeDataService- Returns:
- list of @
TaskSummarytask summaries
-
getTasksOwned
public List<org.kie.api.task.model.TaskSummary> getTasksOwned(String userId, org.kie.internal.query.QueryFilter filter)
Description copied from interface:RuntimeDataServiceReturn a list of tasks the user has claimed.- Specified by:
getTasksOwnedin interfaceRuntimeDataService- Returns:
- list of @
TaskSummarytask summaries
-
getTasksOwnedByStatus
public List<org.kie.api.task.model.TaskSummary> getTasksOwnedByStatus(String userId, List<org.kie.api.task.model.Status> status, org.kie.internal.query.QueryFilter filter)
Description copied from interface:RuntimeDataServiceReturn a list of tasks the user has claimed with one of the listed statuses.- Specified by:
getTasksOwnedByStatusin interfaceRuntimeDataService- Returns:
- list of @
TaskSummarytask summaries
-
getTasksByProcessInstanceId
public List<Long> getTasksByProcessInstanceId(Long processInstanceId)
Description copied from interface:RuntimeDataServiceGet a list of tasks the Process Instance is waiting on.- Specified by:
getTasksByProcessInstanceIdin interfaceRuntimeDataService- Returns:
- list of task ids
-
getTasksByStatusByProcessInstanceId
public List<org.kie.api.task.model.TaskSummary> getTasksByStatusByProcessInstanceId(Long processInstanceId, List<org.kie.api.task.model.Status> status, org.kie.internal.query.QueryFilter filter)
Description copied from interface:RuntimeDataServiceGet a list of tasks the Process Instance is waiting on with one of the listed statuses.- Specified by:
getTasksByStatusByProcessInstanceIdin interfaceRuntimeDataService- Returns:
- list of @
TaskSummarytask summaries
-
getTasksAssignedAsBusinessAdministratorByStatus
public List<org.kie.api.task.model.TaskSummary> getTasksAssignedAsBusinessAdministratorByStatus(String userId, List<org.kie.api.task.model.Status> statuses, org.kie.internal.query.QueryFilter filter)
Description copied from interface:RuntimeDataServiceReturn a list of assigned tasks as a Business Administrator for with one of the listed statuses- Specified by:
getTasksAssignedAsBusinessAdministratorByStatusin interfaceRuntimeDataService- Returns:
- list of @
TaskSummarytask summaries
-
taskSummaryQuery
public org.kie.internal.task.query.TaskSummaryQueryBuilder taskSummaryQuery(String userId)
Description copied from interface:RuntimeDataServiceQuery onTaskSummaryinstaances.- Specified by:
taskSummaryQueryin interfaceRuntimeDataService- Parameters:
userId- The user associated with the tasks queried.- Returns:
- A
TaskSummaryQueryBuilderused to create the query.
-
getTasksByVariable
public List<org.kie.api.task.model.TaskSummary> getTasksByVariable(String userId, String variableName, List<org.kie.api.task.model.Status> statuses, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:RuntimeDataServiceGets a list ofTaskSummaryinstances for the given arguments- Specified by:
getTasksByVariablein interfaceRuntimeDataService- Parameters:
userId- The id of the user associated with the tasksvariableName- The name of the task variablestatuses- The list ofStatus's that the task can havequeryContext- The query context.- Returns:
- a
ListofTaskSummaryinstances.
-
getTasksByVariableAndValue
public List<org.kie.api.task.model.TaskSummary> getTasksByVariableAndValue(String userId, String variableName, String variableValue, List<org.kie.api.task.model.Status> statuses, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:RuntimeDataServiceGets a list ofTaskSummaryinstances for the given arguments- Specified by:
getTasksByVariableAndValuein interfaceRuntimeDataService- Parameters:
userId- The id of the user associated with the tasksvariableName- The name of the task variablevariableValue- The value of the task variablestatuses- The list ofStatus's that the task can havequeryContext- The query context.- Returns:
- a
ListofTaskSummaryinstances.
-
getAllAuditTask
public List<org.kie.internal.task.api.AuditTask> getAllAuditTask(String userId, org.kie.internal.query.QueryFilter filter)
Description copied from interface:RuntimeDataServiceGet a list of tasks audit logs for the user provides applying the query filter listed statuses.- Specified by:
getAllAuditTaskin interfaceRuntimeDataService- Returns:
- list of @
AuditTaskaudit tasks
-
getAllAuditTaskByStatus
public List<org.kie.internal.task.api.AuditTask> getAllAuditTaskByStatus(String userId, org.kie.internal.query.QueryFilter filter)
Description copied from interface:RuntimeDataServiceGet a list of all active tasks audit logs for the user provides applying the query filter listed statuses.- Specified by:
getAllAuditTaskByStatusin interfaceRuntimeDataService- Returns:
- list of @
AuditTaskaudit tasks
-
getAllGroupAuditTask
public List<org.kie.internal.task.api.AuditTask> getAllGroupAuditTask(String userId, org.kie.internal.query.QueryFilter filter)
Description copied from interface:RuntimeDataServiceGet a list of group tasks (actualOwner == null) audit logs for the user provides applying the query filter listed statuses.- Specified by:
getAllGroupAuditTaskin interfaceRuntimeDataService- Returns:
- list of @
AuditTaskaudit tasks
-
getAllAdminAuditTask
public List<org.kie.internal.task.api.AuditTask> getAllAdminAuditTask(String userId, org.kie.internal.query.QueryFilter filter)
Description copied from interface:RuntimeDataServiceGet a list of tasks admin audit (user in businessAdministrators) logs for the user provides applying the query filter listed statuses.- Specified by:
getAllAdminAuditTaskin interfaceRuntimeDataService- Returns:
- list of @
AuditTaskaudit tasks
-
getTaskEvents
public List<org.kie.internal.task.api.model.TaskEvent> getTaskEvents(long taskId, org.kie.internal.query.QueryFilter filter)
Description copied from interface:RuntimeDataServiceGets a list of task events for given task- Specified by:
getTaskEventsin interfaceRuntimeDataService- Returns:
- list of @
TaskEventtask events
-
applyQueryFilter
protected void applyQueryFilter(Map<String,Object> params, org.kie.internal.query.QueryFilter queryFilter)
-
-