Package org.jbpm.casemgmt.impl
Class CaseRuntimeDataServiceImpl
- java.lang.Object
-
- org.jbpm.casemgmt.impl.CaseRuntimeDataServiceImpl
-
- All Implemented Interfaces:
CaseRuntimeDataService
,DeploymentEventListener
public class CaseRuntimeDataServiceImpl extends Object implements CaseRuntimeDataService, DeploymentEventListener
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<CaseDefinitionImpl>
availableCases
protected Set<ProcessDefinition>
availableProcesses
-
Constructor Summary
Constructors Constructor Description CaseRuntimeDataServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<?>
adoptList(List<?> source, List<?> values)
protected void
applyDeploymentFilter(Map<String,Object> params)
protected <T> Collection<T>
applyPagination(List<T> input, org.kie.api.runtime.query.QueryContext queryContext)
protected void
applyQueryContext(Map<String,Object> params, org.kie.api.runtime.query.QueryContext queryContext)
protected List<String>
collectUserAuthInfo()
Collection<NodeInstanceDesc>
getActiveNodesForCase(String caseId, org.kie.api.runtime.query.QueryContext queryContext)
Returns active nodes in given case regardless in what process instance they belong to.protected Collection<NodeInstanceDesc>
getActiveNodesForCaseAndStage(String caseId, String stageId, org.kie.api.runtime.query.QueryContext queryContext)
Collection<AdHocFragment>
getAdHocFragmentsForCase(String caseId)
Returns list of AdHocFragments available in given case.Collection<CaseInstance>
getAllDescendantSubCaseInstancesByParentCaseId(String parentCaseId, List<CaseStatus> statuses)
Returns all subtree cases given an parent id case.CaseDefinition
getCase(String deploymentId, String caseDefinitionId)
Returns case definition identified by caseDefinitionId that belongs to given deploymentId.CaseIdGenerator
getCaseIdGenerator()
CaseInstance
getCaseInstanceById(String caseId)
Returns case instance for given case id if the caller of this class is authorized to see the case instanceCollection<CaseFileItem>
getCaseInstanceDataItems(String caseId, org.kie.api.runtime.query.QueryContext queryContext)
Returns case file data items (as simple descriptions not actual values) for given case instanceCollection<CaseFileItem>
getCaseInstanceDataItemsByName(String caseId, List<String> names, org.kie.api.runtime.query.QueryContext queryContext)
Returns case file data items (as simple descriptions not actual values) for given case instance filtered by item namesCollection<CaseFileItem>
getCaseInstanceDataItemsByType(String caseId, List<String> types, org.kie.api.runtime.query.QueryContext queryContext)
Returns case file data items (as simple descriptions not actual values) for given case instance filtered by item typesCollection<CaseMilestoneInstance>
getCaseInstanceMilestones(String caseId, boolean achievedOnly, org.kie.api.runtime.query.QueryContext queryContext)
Returns milestones for given case instance, identified by case id.Collection<CaseInstance>
getCaseInstances(boolean withData, org.kie.api.runtime.query.QueryContext queryContext)
Returns all available active case instancesCollection<CaseInstance>
getCaseInstances(List<CaseStatus> statuses, boolean withData, org.kie.api.runtime.query.QueryContext queryContext)
Returns all available active case instances that match given statusesCollection<CaseInstance>
getCaseInstances(List<CaseStatus> statuses, org.kie.api.runtime.query.QueryContext queryContext)
Returns all available active case instances that match given statusesCollection<CaseInstance>
getCaseInstances(org.kie.api.runtime.query.QueryContext queryContext)
Returns all available active case instancesCollection<CaseInstance>
getCaseInstancesAnyRole(List<CaseStatus> statuses, boolean withData, org.kie.api.runtime.query.QueryContext queryContext)
Returns case instances that given user (via identity provider) is involved in in any role.Collection<CaseInstance>
getCaseInstancesAnyRole(List<CaseStatus> statuses, org.kie.api.runtime.query.QueryContext queryContext)
Returns case instances that given user (via identity provider) is involved in in any role.Collection<CaseInstance>
getCaseInstancesByDataItem(String dataItemName, List<CaseStatus> statuses, boolean withData, org.kie.api.runtime.query.QueryContext queryContext)
Returns all available active case instances that match given statuses and has case file data item with given nameCollection<CaseInstance>
getCaseInstancesByDataItem(String dataItemName, List<CaseStatus> statuses, org.kie.api.runtime.query.QueryContext queryContext)
Returns all available active case instances that match given statuses and has case file data item with given nameCollection<CaseInstance>
getCaseInstancesByDataItemAndValue(String dataItemName, String dataItemValue, List<CaseStatus> statuses, boolean withData, org.kie.api.runtime.query.QueryContext queryContext)
Returns all available active case instances that match given statuses and has case file data item with given name and valueCollection<CaseInstance>
getCaseInstancesByDataItemAndValue(String dataItemName, String dataItemValue, List<CaseStatus> statuses, org.kie.api.runtime.query.QueryContext queryContext)
Returns all available active case instances that match given statuses and has case file data item with given name and valueCollection<CaseInstance>
getCaseInstancesByDefinition(String definitionId, List<CaseStatus> statuses, boolean withData, org.kie.api.runtime.query.QueryContext queryContext)
Returns all available case instances;Collection<CaseInstance>
getCaseInstancesByDefinition(String definitionId, List<CaseStatus> statuses, org.kie.api.runtime.query.QueryContext queryContext)
Returns all available case instances;Collection<CaseInstance>
getCaseInstancesByDeployment(String deploymentId, List<CaseStatus> statuses, boolean withData, org.kie.api.runtime.query.QueryContext queryContext)
Returns all available case instances;Collection<CaseInstance>
getCaseInstancesByDeployment(String deploymentId, List<CaseStatus> statuses, org.kie.api.runtime.query.QueryContext queryContext)
Returns all available case instances;Collection<CaseInstance>
getCaseInstancesByRole(String roleName, List<CaseStatus> statuses, boolean withData, org.kie.api.runtime.query.QueryContext queryContext)
Returns cases instances that given user (via identity provider) has access to with given role.Collection<CaseInstance>
getCaseInstancesByRole(String roleName, List<CaseStatus> statuses, org.kie.api.runtime.query.QueryContext queryContext)
Returns cases instances that given user (via identity provider) has access to with given role.Collection<CaseInstance>
getCaseInstancesOwnedBy(String owner, List<CaseStatus> statuses, boolean withData, org.kie.api.runtime.query.QueryContext queryContext)
Returns all case instances owned by given userCollection<CaseInstance>
getCaseInstancesOwnedBy(String owner, List<CaseStatus> statuses, org.kie.api.runtime.query.QueryContext queryContext)
Returns all case instances owned by given userCollection<CaseStageInstance>
getCaseInstanceStages(String caseId, boolean activeOnly, org.kie.api.runtime.query.QueryContext queryContext)
Returns stages of given case instance, identified by case id.Collection<CaseDefinition>
getCases(String filter, org.kie.api.runtime.query.QueryContext queryContext)
Returns available cases which matching filter that applies to case name (usually represented by process id or name).Collection<CaseDefinition>
getCases(org.kie.api.runtime.query.QueryContext queryContext)
Returns available cases.Collection<CaseDefinition>
getCasesByDeployment(String deploymentId, org.kie.api.runtime.query.QueryContext queryContext)
Returns available cases for given deployment idList<org.kie.api.task.model.TaskSummary>
getCaseTasksAssignedAsBusinessAdmin(String caseId, String userId, List<org.kie.api.task.model.Status> status, org.kie.api.runtime.query.QueryContext queryContext)
Returns all tasks associated with given case id that are eligible for user to see as business admin role.List<org.kie.api.task.model.TaskSummary>
getCaseTasksAssignedAsPotentialOwner(String caseId, String userId, List<org.kie.api.task.model.Status> status, org.kie.api.runtime.query.QueryContext queryContext)
Returns all tasks associated with given case id that are eligible for user to see.List<org.kie.api.task.model.TaskSummary>
getCaseTasksAssignedAsStakeholder(String caseId, String userId, List<org.kie.api.task.model.Status> status, org.kie.api.runtime.query.QueryContext queryContext)
Returns all tasks associated with given case id that are eligible for user to see in task stakeholder role.Collection<NodeInstanceDesc>
getCompletedNodesForCase(String caseId, org.kie.api.runtime.query.QueryContext queryContext)
Returns completed nodes in given case regardless in what process instance they belong to.Collection<ProcessDefinition>
getProcessDefinitions(String filter, org.kie.api.runtime.query.QueryContext queryContext)
Returns process definitions that are not considered as case definitions and are filtered by process id or name.Collection<ProcessDefinition>
getProcessDefinitions(org.kie.api.runtime.query.QueryContext queryContext)
Returns process definitions that are not considered as case definitions.Collection<ProcessDefinition>
getProcessDefinitionsByDeployment(String deploymentId, org.kie.api.runtime.query.QueryContext queryContext)
Returns process definitions that are not considered as case definitions that belongs to given deployment.Collection<ProcessInstanceDesc>
getProcessInstancesForCase(String caseId, List<Integer> processStates, org.kie.api.runtime.query.QueryContext queryContext)
Returns process instances found for given case id.Collection<ProcessInstanceDesc>
getProcessInstancesForCase(String caseId, org.kie.api.runtime.query.QueryContext queryContext)
Returns process instances found for given case id.Collection<CaseInstance>
getSubCaseInstancesByParentCaseId(String parentCaseId, List<CaseStatus> statuses, org.kie.api.runtime.query.QueryContext queryContext)
Returns all first level children cases given an parent id case.List<CaseStageInstance>
internalGetCaseStages(CaseDefinition caseDef, String caseId, boolean activeOnly, org.kie.api.runtime.query.QueryContext queryContext)
void
onActivate(DeploymentEvent event)
void
onDeactivate(DeploymentEvent event)
void
onDeploy(DeploymentEvent event)
void
onUnDeploy(DeploymentEvent event)
protected List<Integer>
resolveCaseStatuses(List<CaseStatus> caseStatusesList)
void
setCaseIdGenerator(CaseIdGenerator caseIdGenerator)
void
setCaseService(CaseService caseService)
void
setCommandService(TransactionalCommandService commandService)
void
setDeploymentRolesManager(DeploymentRolesManager deploymentRolesManager)
void
setIdentityProvider(org.kie.internal.identity.IdentityProvider identityProvider)
void
setRuntimeDataService(RuntimeDataService runtimeDataService)
void
setUserGroupCallback(org.kie.api.task.UserGroupCallback userGroupCallback)
-
-
-
Field Detail
-
availableCases
protected Set<CaseDefinitionImpl> availableCases
-
availableProcesses
protected Set<ProcessDefinition> availableProcesses
-
-
Method Detail
-
getCaseIdGenerator
public CaseIdGenerator getCaseIdGenerator()
-
setCaseIdGenerator
public void setCaseIdGenerator(CaseIdGenerator caseIdGenerator)
-
setRuntimeDataService
public void setRuntimeDataService(RuntimeDataService runtimeDataService)
-
setCaseService
public void setCaseService(CaseService caseService)
-
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)
-
setDeploymentRolesManager
public void setDeploymentRolesManager(DeploymentRolesManager deploymentRolesManager)
-
onDeploy
public void onDeploy(DeploymentEvent event)
- Specified by:
onDeploy
in interfaceDeploymentEventListener
-
onUnDeploy
public void onUnDeploy(DeploymentEvent event)
- Specified by:
onUnDeploy
in interfaceDeploymentEventListener
-
onActivate
public void onActivate(DeploymentEvent event)
- Specified by:
onActivate
in interfaceDeploymentEventListener
-
onDeactivate
public void onDeactivate(DeploymentEvent event)
- Specified by:
onDeactivate
in interfaceDeploymentEventListener
-
getCase
public CaseDefinition getCase(String deploymentId, String caseDefinitionId)
Description copied from interface:CaseRuntimeDataService
Returns case definition identified by caseDefinitionId that belongs to given deploymentId.- Specified by:
getCase
in interfaceCaseRuntimeDataService
- Parameters:
deploymentId
- deployment identifier that case definition is part ofcaseDefinitionId
- id of the case
-
getCases
public Collection<CaseDefinition> getCases(org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns available cases.- Specified by:
getCases
in interfaceCaseRuntimeDataService
- Parameters:
queryContext
- control parameters for the result e.g. sorting, paging
-
getCases
public Collection<CaseDefinition> getCases(String filter, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns available cases which matching filter that applies to case name (usually represented by process id or name).- Specified by:
getCases
in interfaceCaseRuntimeDataService
- Parameters:
filter
- filter for case name to narrow down resultsqueryContext
- control parameters for the result e.g. sorting, paging
-
getCasesByDeployment
public Collection<CaseDefinition> getCasesByDeployment(String deploymentId, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns available cases for given deployment id- Specified by:
getCasesByDeployment
in interfaceCaseRuntimeDataService
- Parameters:
deploymentId
- deployment identifier that case definition is part ofqueryContext
- control parameters for the result e.g. sorting, paging
-
getProcessDefinitions
public Collection<ProcessDefinition> getProcessDefinitions(org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns process definitions that are not considered as case definitions.- Specified by:
getProcessDefinitions
in interfaceCaseRuntimeDataService
- Parameters:
queryContext
- control parameters for the result e.g. sorting, paging
-
getProcessDefinitions
public Collection<ProcessDefinition> getProcessDefinitions(String filter, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns process definitions that are not considered as case definitions and are filtered by process id or name.- Specified by:
getProcessDefinitions
in interfaceCaseRuntimeDataService
- Parameters:
filter
- regex based filter for either name or id of the processqueryContext
- control parameters for the result e.g. sorting, paging
-
getProcessDefinitionsByDeployment
public Collection<ProcessDefinition> getProcessDefinitionsByDeployment(String deploymentId, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns process definitions that are not considered as case definitions that belongs to given deployment.- Specified by:
getProcessDefinitionsByDeployment
in interfaceCaseRuntimeDataService
- Parameters:
deploymentId
- deployment id the processes should be found forqueryContext
- control parameters for the result e.g. sorting, paging
-
getProcessInstancesForCase
public Collection<ProcessInstanceDesc> getProcessInstancesForCase(String caseId, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns process instances found for given case id.- Specified by:
getProcessInstancesForCase
in interfaceCaseRuntimeDataService
- Parameters:
caseId
- unique id of the casequeryContext
- control parameters for the result e.g. sorting, paging
-
getProcessInstancesForCase
public Collection<ProcessInstanceDesc> getProcessInstancesForCase(String caseId, List<Integer> processStates, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns process instances found for given case id.- Specified by:
getProcessInstancesForCase
in interfaceCaseRuntimeDataService
- Parameters:
caseId
- unique id of the caseprocessStates
- states representing process instance (active, completed, aborted)queryContext
- control parameters for the result e.g. sorting, paging
-
getCaseInstanceMilestones
public Collection<CaseMilestoneInstance> getCaseInstanceMilestones(String caseId, boolean achievedOnly, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns milestones for given case instance, identified by case id.- Specified by:
getCaseInstanceMilestones
in interfaceCaseRuntimeDataService
- Parameters:
caseId
- unique id of the caseachievedOnly
- filter option to return only these that have already been achievedqueryContext
- control parameters for the result e.g. sorting, paging
-
getCaseInstanceStages
public Collection<CaseStageInstance> getCaseInstanceStages(String caseId, boolean activeOnly, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns stages of given case instance, identified by case id.- Specified by:
getCaseInstanceStages
in interfaceCaseRuntimeDataService
- Parameters:
caseId
- unique id of the caseactiveOnly
- filter option to return only stages that are activequeryContext
- control parameters for the result e.g. sorting, paging
-
getActiveNodesForCase
public Collection<NodeInstanceDesc> getActiveNodesForCase(String caseId, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns active nodes in given case regardless in what process instance they belong to.- Specified by:
getActiveNodesForCase
in interfaceCaseRuntimeDataService
- Parameters:
caseId
- unique id of the casequeryContext
- control parameters for the result e.g. sorting, paging
-
getCompletedNodesForCase
public Collection<NodeInstanceDesc> getCompletedNodesForCase(String caseId, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns completed nodes in given case regardless in what process instance they belong to.- Specified by:
getCompletedNodesForCase
in interfaceCaseRuntimeDataService
- Parameters:
caseId
- unique id of the casequeryContext
- control parameters for the result e.g. sorting, paging
-
getCaseInstances
public Collection<CaseInstance> getCaseInstances(org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns all available active case instances- Specified by:
getCaseInstances
in interfaceCaseRuntimeDataService
- Parameters:
queryContext
- control parameters for the result e.g. sorting, paging
-
getCaseInstances
public Collection<CaseInstance> getCaseInstances(boolean withData, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns all available active case instances- Specified by:
getCaseInstances
in interfaceCaseRuntimeDataService
- Parameters:
withData
- indicates if case file data should be included in the resultqueryContext
- control parameters for the result e.g. sorting, paging
-
getCaseInstances
public Collection<CaseInstance> getCaseInstances(List<CaseStatus> statuses, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns all available active case instances that match given statuses- Specified by:
getCaseInstances
in interfaceCaseRuntimeDataService
- Parameters:
statuses
- list of statuses that case should be in to matchqueryContext
- control parameters for the result e.g. sorting, paging
-
getCaseInstances
public Collection<CaseInstance> getCaseInstances(List<CaseStatus> statuses, boolean withData, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns all available active case instances that match given statuses- Specified by:
getCaseInstances
in interfaceCaseRuntimeDataService
- Parameters:
statuses
- list of statuses that case should be in to matchwithData
- indicates if case file information should be included in returned instancesqueryContext
- control parameters for the result e.g. sorting, paging
-
getSubCaseInstancesByParentCaseId
public Collection<CaseInstance> getSubCaseInstancesByParentCaseId(String parentCaseId, List<CaseStatus> statuses, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns all first level children cases given an parent id case.- Specified by:
getSubCaseInstancesByParentCaseId
in interfaceCaseRuntimeDataService
- Parameters:
parentCaseId
- parent casestatuses
- list of statuses that subcases should be in to matchqueryContext
- control parameters for the result e.g. sorting, paging
-
getAllDescendantSubCaseInstancesByParentCaseId
public Collection<CaseInstance> getAllDescendantSubCaseInstancesByParentCaseId(String parentCaseId, List<CaseStatus> statuses)
Description copied from interface:CaseRuntimeDataService
Returns all subtree cases given an parent id case.- Specified by:
getAllDescendantSubCaseInstancesByParentCaseId
in interfaceCaseRuntimeDataService
- Parameters:
parentCaseId
- parent casestatuses
- list of statuses that subcases should be in to match
-
getCaseInstancesByDeployment
public Collection<CaseInstance> getCaseInstancesByDeployment(String deploymentId, List<CaseStatus> statuses, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns all available case instances;- Specified by:
getCaseInstancesByDeployment
in interfaceCaseRuntimeDataService
- Parameters:
deploymentId
- deployment identifier that case instance is part ofstatuses
- list of statuses that case should be in to matchqueryContext
- control parameters for the result e.g. sorting, paging
-
getCaseInstancesByDeployment
public Collection<CaseInstance> getCaseInstancesByDeployment(String deploymentId, List<CaseStatus> statuses, boolean withData, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns all available case instances;- Specified by:
getCaseInstancesByDeployment
in interfaceCaseRuntimeDataService
- Parameters:
deploymentId
- deployment identifier that case instance is part ofstatuses
- list of statuses that case should be in to matchwithData
- indicates if case file data should be included in the resultqueryContext
- control parameters for the result e.g. sorting, paging
-
getCaseInstancesByDefinition
public Collection<CaseInstance> getCaseInstancesByDefinition(String definitionId, List<CaseStatus> statuses, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns all available case instances;- Specified by:
getCaseInstancesByDefinition
in interfaceCaseRuntimeDataService
- Parameters:
definitionId
- case definition idstatuses
- list of statuses that case should be in to matchqueryContext
- control parameters for the result e.g. sorting, paging
-
getCaseInstancesByDefinition
public Collection<CaseInstance> getCaseInstancesByDefinition(String definitionId, List<CaseStatus> statuses, boolean withData, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns all available case instances;- Specified by:
getCaseInstancesByDefinition
in interfaceCaseRuntimeDataService
- Parameters:
definitionId
- case definition idstatuses
- list of statuses that case should be in to matchwithData
- indicates if case file data should be included in the resultqueryContext
- control parameters for the result e.g. sorting, paging
-
getCaseInstancesOwnedBy
public Collection<CaseInstance> getCaseInstancesOwnedBy(String owner, List<CaseStatus> statuses, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns all case instances owned by given user- Specified by:
getCaseInstancesOwnedBy
in interfaceCaseRuntimeDataService
- Parameters:
owner
- user owning taskstatuses
- list of statuses that case should be in to matchqueryContext
- control parameters for the result e.g. sorting, paging
-
getCaseInstancesOwnedBy
public Collection<CaseInstance> getCaseInstancesOwnedBy(String owner, List<CaseStatus> statuses, boolean withData, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns all case instances owned by given user- Specified by:
getCaseInstancesOwnedBy
in interfaceCaseRuntimeDataService
- Parameters:
owner
- user owning taskstatuses
- list of statuses that case should be in to matchwithData
- indicates if case file data should be included in the resultqueryContext
- control parameters for the result e.g. sorting, paging
-
getCaseInstancesByRole
public Collection<CaseInstance> getCaseInstancesByRole(String roleName, List<CaseStatus> statuses, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns cases instances that given user (via identity provider) has access to with given role.- Specified by:
getCaseInstancesByRole
in interfaceCaseRuntimeDataService
- Parameters:
roleName
- name of the role that user should bestatuses
- statuses of the case instancesqueryContext
- control parameters for the result e.g. sorting, paging
-
getCaseInstancesByRole
public Collection<CaseInstance> getCaseInstancesByRole(String roleName, List<CaseStatus> statuses, boolean withData, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns cases instances that given user (via identity provider) has access to with given role.- Specified by:
getCaseInstancesByRole
in interfaceCaseRuntimeDataService
- Parameters:
roleName
- name of the role that user should bestatuses
- statuses of the case instanceswithData
- indicates if case file data should be included in the resultqueryContext
- control parameters for the result e.g. sorting, paging
-
getCaseInstancesAnyRole
public Collection<CaseInstance> getCaseInstancesAnyRole(List<CaseStatus> statuses, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns case instances that given user (via identity provider) is involved in in any role.- Specified by:
getCaseInstancesAnyRole
in interfaceCaseRuntimeDataService
- Parameters:
statuses
- statuses of the case instancesqueryContext
- control parameters for the result e.g. sorting, paging
-
getCaseInstancesAnyRole
public Collection<CaseInstance> getCaseInstancesAnyRole(List<CaseStatus> statuses, boolean withData, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns case instances that given user (via identity provider) is involved in in any role.- Specified by:
getCaseInstancesAnyRole
in interfaceCaseRuntimeDataService
- Parameters:
statuses
- statuses of the case instanceswithData
- indicates if case file data should be included in the resultqueryContext
- control parameters for the result e.g. sorting, paging
-
getCaseInstancesByDataItem
public Collection<CaseInstance> getCaseInstancesByDataItem(String dataItemName, List<CaseStatus> statuses, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns all available active case instances that match given statuses and has case file data item with given name- Specified by:
getCaseInstancesByDataItem
in interfaceCaseRuntimeDataService
- Parameters:
dataItemName
- name of the case file data itemstatuses
- list of statuses that case should be in to matchqueryContext
- control parameters for the result e.g. sorting, paging
-
getCaseInstancesByDataItem
public Collection<CaseInstance> getCaseInstancesByDataItem(String dataItemName, List<CaseStatus> statuses, boolean withData, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns all available active case instances that match given statuses and has case file data item with given name- Specified by:
getCaseInstancesByDataItem
in interfaceCaseRuntimeDataService
- Parameters:
dataItemName
- name of the case file data itemstatuses
- list of statuses that case should be in to matchwithData
- indicates if case file data should be included in the resultqueryContext
- control parameters for the result e.g. sorting, paging
-
getCaseInstancesByDataItemAndValue
public Collection<CaseInstance> getCaseInstancesByDataItemAndValue(String dataItemName, String dataItemValue, List<CaseStatus> statuses, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns all available active case instances that match given statuses and has case file data item with given name and value- Specified by:
getCaseInstancesByDataItemAndValue
in interfaceCaseRuntimeDataService
- Parameters:
dataItemName
- name of the case file data itemdataItemValue
- expected value of the data itemstatuses
- list of statuses that case should be in to matchqueryContext
- control parameters for the result e.g. sorting, paging
-
getCaseInstancesByDataItemAndValue
public Collection<CaseInstance> getCaseInstancesByDataItemAndValue(String dataItemName, String dataItemValue, List<CaseStatus> statuses, boolean withData, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns all available active case instances that match given statuses and has case file data item with given name and value- Specified by:
getCaseInstancesByDataItemAndValue
in interfaceCaseRuntimeDataService
- Parameters:
dataItemName
- name of the case file data itemdataItemValue
- expected value of the data itemstatuses
- list of statuses that case should be in to matchwithData
- indicates if case file data should be included in the resultqueryContext
- control parameters for the result e.g. sorting, paging
-
getCaseInstanceById
public CaseInstance getCaseInstanceById(String caseId)
Description copied from interface:CaseRuntimeDataService
Returns case instance for given case id if the caller of this class is authorized to see the case instance- Specified by:
getCaseInstanceById
in interfaceCaseRuntimeDataService
- Parameters:
caseId
- unique case id of the case- Returns:
- case instance with basic details or null in case it was not found or access was not granted
-
getAdHocFragmentsForCase
public Collection<AdHocFragment> getAdHocFragmentsForCase(String caseId)
Description copied from interface:CaseRuntimeDataService
Returns list of AdHocFragments available in given case. It includes all ad hoc fragments that are eligible for triggering - meaning it's container is active (case instance or stage)- Specified by:
getAdHocFragmentsForCase
in interfaceCaseRuntimeDataService
- Parameters:
caseId
- unique id of the case
-
getCaseTasksAssignedAsPotentialOwner
public List<org.kie.api.task.model.TaskSummary> getCaseTasksAssignedAsPotentialOwner(String caseId, String userId, List<org.kie.api.task.model.Status> status, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns all tasks associated with given case id that are eligible for user to see.- Specified by:
getCaseTasksAssignedAsPotentialOwner
in interfaceCaseRuntimeDataService
- Parameters:
caseId
- unique id of the caseuserId
- user id that the tasks should be available forstatus
- status of the taskqueryContext
- control parameters for the result e.g. sorting, paging- Returns:
- list of tasks found for given case id and user
-
getCaseTasksAssignedAsBusinessAdmin
public List<org.kie.api.task.model.TaskSummary> getCaseTasksAssignedAsBusinessAdmin(String caseId, String userId, List<org.kie.api.task.model.Status> status, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns all tasks associated with given case id that are eligible for user to see as business admin role.- Specified by:
getCaseTasksAssignedAsBusinessAdmin
in interfaceCaseRuntimeDataService
- Parameters:
caseId
- unique id of the caseuserId
- user id that the tasks should be available forstatus
- status of the taskqueryContext
- control parameters for the result e.g. sorting, paging- Returns:
- list of tasks found for given case id and user
-
getCaseTasksAssignedAsStakeholder
public List<org.kie.api.task.model.TaskSummary> getCaseTasksAssignedAsStakeholder(String caseId, String userId, List<org.kie.api.task.model.Status> status, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns all tasks associated with given case id that are eligible for user to see in task stakeholder role.- Specified by:
getCaseTasksAssignedAsStakeholder
in interfaceCaseRuntimeDataService
- Parameters:
caseId
- unique id of the caseuserId
- user id that the tasks should be available forstatus
- status of the taskqueryContext
- control parameters for the result e.g. sorting, paging- Returns:
- list of tasks found for given case id and user
-
internalGetCaseStages
public List<CaseStageInstance> internalGetCaseStages(CaseDefinition caseDef, String caseId, boolean activeOnly, org.kie.api.runtime.query.QueryContext queryContext)
-
getActiveNodesForCaseAndStage
protected Collection<NodeInstanceDesc> getActiveNodesForCaseAndStage(String caseId, String stageId, org.kie.api.runtime.query.QueryContext queryContext)
-
applyQueryContext
protected void applyQueryContext(Map<String,Object> params, org.kie.api.runtime.query.QueryContext queryContext)
-
applyPagination
protected <T> Collection<T> applyPagination(List<T> input, org.kie.api.runtime.query.QueryContext queryContext)
-
resolveCaseStatuses
protected List<Integer> resolveCaseStatuses(List<CaseStatus> caseStatusesList)
-
getCaseInstanceDataItems
public Collection<CaseFileItem> getCaseInstanceDataItems(String caseId, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns case file data items (as simple descriptions not actual values) for given case instance- Specified by:
getCaseInstanceDataItems
in interfaceCaseRuntimeDataService
- Parameters:
caseId
- unique id of the casequeryContext
- control parameters for the result e.g. sorting, paging- Returns:
- list of found case file data items
-
getCaseInstanceDataItemsByName
public Collection<CaseFileItem> getCaseInstanceDataItemsByName(String caseId, List<String> names, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns case file data items (as simple descriptions not actual values) for given case instance filtered by item names- Specified by:
getCaseInstanceDataItemsByName
in interfaceCaseRuntimeDataService
- Parameters:
caseId
- unique id of the casenames
- name of data items to be foundqueryContext
- control parameters for the result e.g. sorting, paging- Returns:
- list of found case file data items
-
getCaseInstanceDataItemsByType
public Collection<CaseFileItem> getCaseInstanceDataItemsByType(String caseId, List<String> types, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:CaseRuntimeDataService
Returns case file data items (as simple descriptions not actual values) for given case instance filtered by item types- Specified by:
getCaseInstanceDataItemsByType
in interfaceCaseRuntimeDataService
- Parameters:
caseId
- unique id of the casetypes
- type of data items to be foundqueryContext
- control parameters for the result e.g. sorting, paging- Returns:
- list of found case file data items
-
-