Class RuntimeDataServiceImpl

    • Field Detail

      • deploymentIds

        protected Set<String> deploymentIds
      • taskService

        protected org.kie.api.task.TaskService taskService
    • Constructor Detail

      • RuntimeDataServiceImpl

        public RuntimeDataServiceImpl()
    • Method Detail

      • 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)
      • applyQueryContext

        protected void applyQueryContext​(Map<String,​Object> params,
                                         org.kie.api.runtime.query.QueryContext queryContext)
      • applyDeploymentFilter

        protected void applyDeploymentFilter​(Map<String,​Object> params)
      • 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: RuntimeDataService
        Returns list of process definitions for given deployment id
        Specified by:
        getProcessesByDeploymentId in interface RuntimeDataService
        Parameters:
        deploymentId - The deployment id of the runtime.
        queryContext - control parameters for the result e.g. sorting, paging
        Returns:
        A list of ProcessDefinition instances representing processes that match the given criteria (deploymentId)
      • getProcessesByDeploymentIdProcessId

        public ProcessDefinition getProcessesByDeploymentIdProcessId​(String deploymentId,
                                                                     String processId)
        Description copied from interface: RuntimeDataService
        Returns process definition for given deployment and process identifiers
        Specified by:
        getProcessesByDeploymentIdProcessId in interface RuntimeDataService
        Parameters:
        deploymentId - The id of the deployment (runtime)
        processId - The id of the process
        Returns:
        A ProcessDefinition instance, representing the Process that 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: RuntimeDataService
        Returns list of process definitions that match the given filter
        Specified by:
        getProcessesByFilter in interface RuntimeDataService
        Parameters:
        filter - A regular expression.
        queryContext - control parameters for the result e.g. sorting, paging
        Returns:
        A list of ProcessDefinition instances whose name or id matches the given regular expression.
      • getProcesses

        public Collection<ProcessDefinition> getProcesses​(org.kie.api.runtime.query.QueryContext queryContext)
        Description copied from interface: RuntimeDataService
        Returns all process definitions available
        Specified by:
        getProcesses in interface RuntimeDataService
        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 ProcessDefinition instances.
      • getProcessIds

        public Collection<String> getProcessIds​(String deploymentId,
                                                org.kie.api.runtime.query.QueryContext queryContext)
        Description copied from interface: RuntimeDataService
        Returns list of process definition identifiers for given deployment id
        Specified by:
        getProcessIds in interface RuntimeDataService
        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​(List<Integer> states,
                                                                   String initiator,
                                                                   org.kie.api.runtime.query.QueryContext queryContext)
        Description copied from interface: RuntimeDataService
        Returns list of process instance descriptions found with given statuses and initiated by initiator.
        Specified by:
        getProcessInstances in interface RuntimeDataService
        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).
      • getProcessInstancesByDeploymentId

        public Collection<ProcessInstanceDesc> getProcessInstancesByDeploymentId​(String deploymentId,
                                                                                 List<Integer> states,
                                                                                 org.kie.api.runtime.query.QueryContext queryContext)
        Description copied from interface: RuntimeDataService
        Returns list of process instance descriptions found for given deployment id and statuses.
        Specified by:
        getProcessInstancesByDeploymentId in interface RuntimeDataService
        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).
      • countProcessInstancesByDeploymentId

        public Long countProcessInstancesByDeploymentId​(String deploymentId,
                                                        List<Integer> states)
        Description copied from interface: RuntimeDataService
        Returns the count of process instances found for given deployment id and statuses.
        Specified by:
        countProcessInstancesByDeploymentId in interface RuntimeDataService
        Parameters:
        deploymentId - The deployment id of the runtime.
        states - A list of possible state (int) values that the ProcessInstance can have.
        Returns:
        A count of 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: RuntimeDataService
        Returns list of process instance descriptions found for given process definition id
        Specified by:
        getProcessInstancesByProcessDefinition in interface RuntimeDataService
        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).
      • getProcessInstancesByProcessDefinition

        public Collection<ProcessInstanceDesc> getProcessInstancesByProcessDefinition​(String processDefId,
                                                                                      List<Integer> states,
                                                                                      org.kie.api.runtime.query.QueryContext queryContext)
        Description copied from interface: RuntimeDataService
        Returns list of process instance descriptions found for given process definition id
        Specified by:
        getProcessInstancesByProcessDefinition in interface RuntimeDataService
        Parameters:
        processDefId - The id of the process (definition)
        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

        public ProcessInstanceDesc getProcessInstanceById​(long processId)
        Description copied from interface: RuntimeDataService
        Returns 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:
        getProcessInstanceById in interface RuntimeDataService
        Parameters:
        processId - The id of the process instance to be fetched
        Returns:
        Process instance information, in the form of a ProcessInstanceDesc instance.
      • getProcessInstanceByCorrelationKey

        public ProcessInstanceDesc getProcessInstanceByCorrelationKey​(org.kie.internal.process.CorrelationKey correlationKey)
        Description copied from interface: RuntimeDataService
        Returns 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:
        getProcessInstanceByCorrelationKey in interface RuntimeDataService
        Parameters:
        correlationKey - correlation key assigned to process instance
        Returns:
        Process instance information, in the form of a ProcessInstanceDesc instance.
      • getProcessInstancesByCorrelationKey

        public Collection<ProcessInstanceDesc> getProcessInstancesByCorrelationKey​(org.kie.internal.process.CorrelationKey correlationKey,
                                                                                   org.kie.api.runtime.query.QueryContext queryContext)
        Description copied from interface: RuntimeDataService
        Returns 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:
        getProcessInstancesByCorrelationKey in interface RuntimeDataService
        Parameters:
        correlationKey - correlation key assigned to process instance
        Returns:
        A list of ProcessInstanceDesc instances 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: RuntimeDataService
        Returns 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:
        getProcessInstancesByCorrelationKeyAndStatus in interface RuntimeDataService
        Parameters:
        correlationKey - correlation key assigned to process instance
        states - A list of possible state (int) values that the ProcessInstance can have.
        Returns:
        A list of ProcessInstanceDesc instances 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: RuntimeDataService
        Returns list of process instance descriptions found for given process id and statuses and initiated by initiator
        Specified by:
        getProcessInstancesByProcessId in interface RuntimeDataService
        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

        public Collection<ProcessInstanceDesc> getProcessInstancesByProcessName​(List<Integer> states,
                                                                                String processName,
                                                                                String initiator,
                                                                                org.kie.api.runtime.query.QueryContext queryContext)
        Specified by:
        getProcessInstancesByProcessName in interface RuntimeDataService
        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).
      • getProcessInstancesByVariable

        public Collection<ProcessInstanceDesc> getProcessInstancesByVariable​(String variableName,
                                                                             List<Integer> states,
                                                                             org.kie.api.runtime.query.QueryContext queryContext)
        Description copied from interface: RuntimeDataService
        Returns process instance descriptions found for process instance that have defined given variable
        Specified by:
        getProcessInstancesByVariable in interface RuntimeDataService
        Parameters:
        variableName - name of the variable that process instance should have
        states - A list of possible state (int) values that the ProcessInstance can have. If null will return only active instances
        queryContext - 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: RuntimeDataService
        Returns process instance descriptions found for process instance that have defined given variable and its value matches given variableValue
        Specified by:
        getProcessInstancesByVariableAndValue in interface RuntimeDataService
        Parameters:
        variableName - name of the variable that process instance should have
        variableValue - value of the variable to match
        states - A list of possible state (int) values that the ProcessInstance can have. If null will return only active instances
        queryContext - 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: RuntimeDataService
        Returns list of process instance descriptions
        Specified by:
        getProcessInstancesByParent in interface RuntimeDataService
        Parameters:
        parentProcessInstanceId - id of the parent process instance
        states - list of possible state (int) values that the ProcessInstance can have. If null will return only active instances
        queryContext - control parameters for the result e.g. sorting, paging
        Returns:
        A list of ProcessInstanceDesc instances representing the available process instances.
      • getProcessInstanceHistoryActive

        public Collection<NodeInstanceDesc> getProcessInstanceHistoryActive​(long processId,
                                                                            org.kie.api.runtime.query.QueryContext queryContext)
        Description copied from interface: RuntimeDataService
        Returns trace of all active nodes for given process instance id
        Specified by:
        getProcessInstanceHistoryActive in interface RuntimeDataService
        Parameters:
        processId - unique identifier of process instance
        queryContext - 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: RuntimeDataService
        Returns trace of all executed (completed) for given process instance id
        Specified by:
        getProcessInstanceHistoryCompleted in interface RuntimeDataService
        Parameters:
        processId - unique identifier of process instance
        queryContext - control parameters for the result e.g. sorting, paging
        Returns:
      • getProcessInstanceHistoryFinished

        public Collection<NodeInstanceDesc> getProcessInstanceHistoryFinished​(long processId,
                                                                              org.kie.api.runtime.query.QueryContext queryContext)
        Description copied from interface: RuntimeDataService
        Returns trace of all passed (include completed, skipped, aborted, OBSOLETE) for given process instance id
        Specified by:
        getProcessInstanceHistoryFinished in interface RuntimeDataService
        Parameters:
        processId - unique identifier of process instance
        queryContext - 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: RuntimeDataService
        Returns complete trace of all executed (completed) and active nodes for given process instance id
        Specified by:
        getProcessInstanceFullHistory in interface RuntimeDataService
        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 NodeInstance information, in the form of a list of NodeInstanceDesc instances, that comes from a process instance that matches the given criteria (deploymentId, processId).
      • getNodeInstanceForWorkItem

        public NodeInstanceDesc getNodeInstanceForWorkItem​(Long workItemId)
        Description copied from interface: RuntimeDataService
        Returns active node instance descriptor for given work item id, if exists.
        Specified by:
        getNodeInstanceForWorkItem in interface RuntimeDataService
        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: RuntimeDataService
        Returns trace of all nodes for a given node types and process instance id
        Specified by:
        getNodeInstancesByNodeType in interface RuntimeDataService
        Parameters:
        processInstanceId - unique identifier of process instance
        nodeTypes - list of node types to filter nodes of process instance
        queryContext - 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: RuntimeDataService
        Returns trace of all nodes for a given node types and correlation key
        Specified by:
        getNodeInstancesByCorrelationKeyNodeType in interface RuntimeDataService
        Parameters:
        correlationKey - correlation key
        states - list of states
        nodeTypes - list of node types to filter nodes of process instance
        queryContext - 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: RuntimeDataService
        Returns collections of all process variables current value for given process instance
        Specified by:
        getVariablesCurrentState in interface RuntimeDataService
        Parameters:
        processInstanceId - The process instance id.
        Returns:
        Information about variables in the specified process instance, represented by a list of VariableDesc instances.
      • getVariableHistory

        public Collection<VariableDesc> getVariableHistory​(long processInstanceId,
                                                           String variableId,
                                                           org.kie.api.runtime.query.QueryContext queryContext)
        Description copied from interface: RuntimeDataService
        Returns collection of changes to given variable within scope of process instance
        Specified by:
        getVariableHistory in interface RuntimeDataService
        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 VariableDesc instances.
      • getTasksAssignedAsBusinessAdministrator

        public List<org.kie.api.task.model.TaskSummary> getTasksAssignedAsBusinessAdministrator​(String userId,
                                                                                                org.kie.internal.query.QueryFilter filter)
        Description copied from interface: RuntimeDataService
        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.
        Specified by:
        getTasksAssignedAsBusinessAdministrator in interface RuntimeDataService
        Returns:
        list of @TaskSummary task summaries
      • getTasksAssignedAsPotentialOwner

        public List<org.kie.api.task.model.TaskSummary> getTasksAssignedAsPotentialOwner​(String userId,
                                                                                         org.kie.internal.query.QueryFilter filter)
        Description copied from interface: RuntimeDataService
        Return a list of tasks the user is eligible for.
        Specified by:
        getTasksAssignedAsPotentialOwner in interface RuntimeDataService
        Returns:
        list of @TaskSummary task 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: RuntimeDataService
        Return a list of tasks the user or groups are eligible for.
        Specified by:
        getTasksAssignedAsPotentialOwner in interface RuntimeDataService
        Returns:
        list of @TaskSummary task 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: RuntimeDataService
        Return a list of tasks the user or groups are eligible for with one of the listed statuses.
        Specified by:
        getTasksAssignedAsPotentialOwner in interface RuntimeDataService
        Returns:
        list of @TaskSummary task 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: RuntimeDataService
        Return a list of tasks the user is eligible for with one of the listed statuses.
        Specified by:
        getTasksAssignedAsPotentialOwnerByStatus in interface RuntimeDataService
        Returns:
        list of @TaskSummary task 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: RuntimeDataService
        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.
        Specified by:
        getTasksAssignedAsPotentialOwnerByExpirationDateOptional in interface RuntimeDataService
        Returns:
        list of @TaskSummary task 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: RuntimeDataService
        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.
        Specified by:
        getTasksOwnedByExpirationDateOptional in interface RuntimeDataService
        Returns:
        list of @TaskSummary task summaries
      • getTasksOwned

        public List<org.kie.api.task.model.TaskSummary> getTasksOwned​(String userId,
                                                                      org.kie.internal.query.QueryFilter filter)
        Description copied from interface: RuntimeDataService
        Return a list of tasks the user has claimed.
        Specified by:
        getTasksOwned in interface RuntimeDataService
        Returns:
        list of @TaskSummary task 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: RuntimeDataService
        Return a list of tasks the user has claimed with one of the listed statuses.
        Specified by:
        getTasksOwnedByStatus in interface RuntimeDataService
        Returns:
        list of @TaskSummary task summaries
      • 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: RuntimeDataService
        Get a list of tasks the Process Instance is waiting on with one of the listed statuses.
        Specified by:
        getTasksByStatusByProcessInstanceId in interface RuntimeDataService
        Returns:
        list of @TaskSummary task 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: RuntimeDataService
        Return a list of assigned tasks as a Business Administrator for with one of the listed statuses
        Specified by:
        getTasksAssignedAsBusinessAdministratorByStatus in interface RuntimeDataService
        Returns:
        list of @TaskSummary task summaries
      • taskSummaryQuery

        public org.kie.internal.task.query.TaskSummaryQueryBuilder taskSummaryQuery​(String userId)
        Description copied from interface: RuntimeDataService
        Query on TaskSummary instaances.
        Specified by:
        taskSummaryQuery in interface RuntimeDataService
        Parameters:
        userId - The user associated with the tasks queried.
        Returns:
        A TaskSummaryQueryBuilder used 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: RuntimeDataService
        Gets a list of TaskSummary instances for the given arguments
        Specified by:
        getTasksByVariable in interface RuntimeDataService
        Parameters:
        userId - The id of the user associated with the tasks
        variableName - The name of the task variable
        statuses - The list of Status's that the task can have
        queryContext - The query context.
        Returns:
        a List of TaskSummary instances.
      • 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: RuntimeDataService
        Gets a list of TaskSummary instances for the given arguments
        Specified by:
        getTasksByVariableAndValue in interface RuntimeDataService
        Parameters:
        userId - The id of the user associated with the tasks
        variableName - The name of the task variable
        variableValue - The value of the task variable
        statuses - The list of Status's that the task can have
        queryContext - The query context.
        Returns:
        a List of TaskSummary instances.
      • getAllAuditTask

        public List<org.kie.internal.task.api.AuditTask> getAllAuditTask​(String userId,
                                                                         org.kie.internal.query.QueryFilter filter)
        Description copied from interface: RuntimeDataService
        Get a list of tasks audit logs for the user provides applying the query filter listed statuses.
        Specified by:
        getAllAuditTask in interface RuntimeDataService
        Returns:
        list of @AuditTask audit tasks
      • getAllAuditTaskByStatus

        public List<org.kie.internal.task.api.AuditTask> getAllAuditTaskByStatus​(String userId,
                                                                                 org.kie.internal.query.QueryFilter filter)
        Description copied from interface: RuntimeDataService
        Get a list of all active tasks audit logs for the user provides applying the query filter listed statuses.
        Specified by:
        getAllAuditTaskByStatus in interface RuntimeDataService
        Returns:
        list of @AuditTask audit tasks
      • getAllGroupAuditTask

        public List<org.kie.internal.task.api.AuditTask> getAllGroupAuditTask​(String userId,
                                                                              org.kie.internal.query.QueryFilter filter)
        Description copied from interface: RuntimeDataService
        Get a list of group tasks (actualOwner == null) audit logs for the user provides applying the query filter listed statuses.
        Specified by:
        getAllGroupAuditTask in interface RuntimeDataService
        Returns:
        list of @AuditTask audit tasks
      • getAllAdminAuditTask

        public List<org.kie.internal.task.api.AuditTask> getAllAdminAuditTask​(String userId,
                                                                              org.kie.internal.query.QueryFilter filter)
        Description copied from interface: RuntimeDataService
        Get a list of tasks admin audit (user in businessAdministrators) logs for the user provides applying the query filter listed statuses.
        Specified by:
        getAllAdminAuditTask in interface RuntimeDataService
        Returns:
        list of @AuditTask audit tasks
      • getTaskEvents

        public List<org.kie.internal.task.api.model.TaskEvent> getTaskEvents​(long taskId,
                                                                             org.kie.internal.query.QueryFilter filter)
        Description copied from interface: RuntimeDataService
        Gets a list of task events for given task
        Specified by:
        getTaskEvents in interface RuntimeDataService
        Returns:
        list of @TaskEvent task events
      • applyQueryFilter

        protected void applyQueryFilter​(Map<String,​Object> params,
                                        org.kie.internal.query.QueryFilter queryFilter)
      • adoptList

        protected List<?> adoptList​(List<?> source,
                                    List<?> values)
      • mergeLists

        protected List<?> mergeLists​(List<?> source,
                                     List<?> values)