public interface IWorkflowSession extends ISession
Modifier and Type | Method and Description |
---|---|
ITask |
createTaskAndCase(IProcessStart processStart)
Starts a new task and creates a case for a process.
|
List<ITask> |
findCreatedAndResumedWorkTasks(int startIndex,
int count)
Gets all tasks the workflow session user can work on that are in state
TaskState.RESUMED or TaskState.CREATED . |
IQueryResult<ICase> |
findInvolvedCases(IPropertyFilter<CaseProperty> filter,
List<PropertyOrder<CaseProperty>> order,
int startIndex,
int count,
boolean returnAllCount)
Finds cases in which the session user is involved.
|
IQueryResult<ICase> |
findInvolvedCasesByRole(InvolvedCasesByRoleQuery query)
Finds cases in which the session user is involved.
|
IQueryResult<ICase> |
findInvolvedCasesByRole(List<IRole> roles,
IPropertyFilter<CaseProperty> filter,
List<PropertyOrder<CaseProperty>> order,
int startIndex,
int count,
boolean returnAllCount)
Finds cases in which the session user is involved.
|
List<IGroup<ICase>> |
findInvolvedCasesByRoleCategories(List<IRole> roles,
IPropertyFilter<CaseProperty> categoryFilter,
CaseProperty categoryProperty,
OrderDirection categoryPropertyOrder)
Deprecated.
use
CategoryTree.createFor(CaseQuery) instead |
List<IGroup<ICase>> |
findInvolvedCasesCategories(IPropertyFilter<CaseProperty> categoryFilter,
CaseProperty categoryProperty,
OrderDirection categoryPropertyOrder)
Deprecated.
use
CategoryTree.createFor(CaseQuery) instead |
IQueryResult<ITask> |
findLockedWorkTasks(IPropertyFilter<TaskProperty> filter,
List<PropertyOrder<TaskProperty>> order,
int startIndex,
int count,
boolean returnAllCount,
EnumSet<TaskState> includeTaskStates)
Gets all tasks the workflow session user could work if they were in state
TaskState.SUSPENDED
but are currently in state TaskState.RESUMED or TaskState.PARKED because other users are
working on them. |
List<ITask> |
findParkedWorkTasks(int startIndex,
int count)
Gets all tasks the workflow session user can work on that are in state
TaskState.PARKED . |
List<ITask> |
findResumedWorkTasks(int startIndex,
int count)
Gets all tasks the workflow session user can work on that are in state
TaskState.RESUMED . |
List<IGroup<ICase>> |
findStartedCaseCategories(IPropertyFilter<CaseProperty> categoryFilter,
CaseProperty categoryProperty,
OrderDirection categoryPropertyOrder)
Deprecated.
use
CategoryTree.createFor(CaseQuery) instead |
List<ICase> |
findStartedCases(int startIndex,
int count,
Date caseStartTimestampFilter)
Finds all cases that the session users has started.
|
IQueryResult<ICase> |
findStartedCases(IPropertyFilter<CaseProperty> filter,
List<PropertyOrder<CaseProperty>> order,
int startIndex,
int count,
boolean returnAllCount)
Finds all cases that the session users has started.
|
IQueryResult<ICase> |
findStartedCasesByRole(List<IRole> roles,
IPropertyFilter<CaseProperty> filter,
List<PropertyOrder<CaseProperty>> order,
int startIndex,
int count,
boolean returnAllCount)
Gets all cases somebody has started who needs a role to start the case which the current session user also owns.
|
List<ITask> |
findSuspendedAndParkedWorkTasks(int startIndex,
int count)
Gets all tasks the workflow session user can work on that are in state
TaskState.SUSPENDED or TaskState.PARKED . |
List<ITask> |
findSuspendedWorkTasks(int startIndex,
int count)
Gets all tasks the workflow session user can work on that are in state
TaskState.SUSPENDED . |
List<IGroup<ITask>> |
findWorkedOnTaskCategories(IPropertyFilter<TaskProperty> categoryFilter,
TaskProperty categoryProperty,
OrderDirection categoryPropertyOrder)
Deprecated.
use
CategoryTree.createFor(TaskQuery) instead |
List<ITask> |
findWorkedOnTasks(int startIndex,
int count,
Date taskEndTimestampFilter)
Finds all tasks that the session users has ever worked on.
|
IQueryResult<ITask> |
findWorkedOnTasks(IPropertyFilter<TaskProperty> filter,
List<PropertyOrder<TaskProperty>> order,
int startIndex,
int count,
boolean returnAllCount)
Finds all tasks that the session user has ever worked on
|
IQueryResult<ITask> |
findWorkedOnTasksByRole(List<IRole> roles,
IPropertyFilter<TaskProperty> filter,
List<PropertyOrder<TaskProperty>> order,
int startIndex,
int count,
boolean returnAllCount)
Returns all tasks the session user has worked on or could have worked on as member of the given roles.
|
ITask |
findWorkingTask(int taskIdentifier)
Deprecated.
Use
IWorkflowSession.findWorkingTask(long) instead. |
ITask |
findWorkingTask(long taskIdentifier)
Finds a task the current session user is working on (task state
TaskState.RESUMED or TaskState.CREATED )
with its identifier. |
List<IGroup<ITask>> |
findWorkTaskCategories(IPropertyFilter<TaskProperty> categoryFilter,
TaskProperty categoryProperty,
OrderDirection categoryPropertyOrder,
EnumSet<TaskState> includeTaskStates)
Deprecated.
use
CategoryTree.createFor(TaskQuery) instead |
IQueryResult<ITask> |
findWorkTasks(IPropertyFilter<TaskProperty> filter,
List<PropertyOrder<TaskProperty>> order,
int startIndex,
int count,
boolean returnAllCount,
EnumSet<TaskState> includeTaskStates)
Gets all tasks the workflow session user can work on.
|
List<IProcessStart> |
getStartableProcessStarts()
Returns all process start elements which the current user can start.
|
List<IWebStartable> |
getStartables()
Returns all startables which the current user can start.
|
IWorkflowContext |
getWorkflowContext()
Gets the workflow context
|
void |
parkTask(ITask task)
Parks/reserves a running task for the current session user.
|
void |
resetTask(ITask runningTask)
Resets a task the workflow session user is working on.
|
ITask |
resumeTask(int taskIdentifier)
Deprecated.
use
IWorkflowSession.resumeTask(long) instead |
ITask |
resumeTask(long taskIdentifier)
Resumes a suspended or parked task with its identifier.
|
assignRole, checkPassword, checkPermission, getActiveEnvironment, getActiveSubstitutions, getClusterNode, getContentLocale, getFormattingLocale, getIdentifier, getMySessions, getSecurityContext, getSessionUser, getSessionUserName, hasActiveSubstitutions, hasMoreThanOneSession, hasPermission, isAbsent, isMemberThroughActiveSubstitution, isMemberThroughActiveSubstitution, isSessionUserSystemUser, isSessionUserUnknown, loginSessionUser, logoutSessionUser, setActiveEnvironment, setContentLocale, setContentLocale, setFormattingLocale, setFormattingLocale
canActAsUser, hasRole
getAttribute, getAttributeNames, removeAttribute, setAttribute
IWorkflowContext getWorkflowContext()
List<IProcessStart> getStartableProcessStarts() throws PersistencyException
PersistencyException
- if persistency access failsList<IWebStartable> getStartables()
ITask findWorkingTask(long taskIdentifier) throws PersistencyException
TaskState.RESUMED
or TaskState.CREATED
)
with its identifier.
Returns null if task does not exists or is not in state TaskState.RESUMED
or TaskState.CREATED
.taskIdentifier
- ITask identifierPersistencyException
- if persistency access fails@Deprecated ITask findWorkingTask(int taskIdentifier) throws PersistencyException
IWorkflowSession.findWorkingTask(long)
instead.taskIdentifier
- PersistencyException
IQueryResult<ITask> findWorkTasks(IPropertyFilter<TaskProperty> filter, List<PropertyOrder<TaskProperty>> order, int startIndex, int count, boolean returnAllCount, EnumSet<TaskState> includeTaskStates) throws PersistencyException
Gets all tasks the workflow session user can work on.
If includeTaskStates contains state TaskState.SUSPENDED
all tasks in state TaskState.SUSPENDED
that the workflow session user can resume are also included in the result.
If includeTaskStates contains state TaskState.CREATED
all tasks in state TaskState.CREATED
that the workflow session user are working on are also included in the result.
If includeTaskStates contains state TaskState.RESUMED
all tasks in state TaskState.RESUMED
that the workflow session user are working on are also included in the result.
If includeTaskStates contains state TaskState.PARKED
all tasks in state TaskState.PARKED
that the workflow session user can resume are also included in the result.
Consider to use the TaskQuery
API alternatively.
This fluent API makes the statement combinable with other filters
and allows SQL-like value comparisons. E.g:
TaskQuery query = TaskQuery.create()
.where().currentUserCanWorkOn();
List<ITask> tasks = ivy.wf.getTaskQueryExecutor().getResults(query, startIndex, count);
filter
- filter criteria to specify which tasks should be readorder
- how to order the resultstartIndex
- the index of the first task of all tasks found returnedcount
- how many tasks found are returned. -1 for all.returnAllCount
- if true the query result method IQueryResult.getAllCount()
returns the overall cases that have been found, if false it returns -1includeTaskStates
- set of task states that should be included.PersistencyException
- if persistency access fails.TaskQuery
,
IWorkflowContext.getTaskQueryExecutor()
List<ITask> findSuspendedWorkTasks(int startIndex, int count) throws PersistencyException
TaskState.SUSPENDED
.
This is a user convenience method. The method calls internal the method IWorkflowSession.findWorkTasks(IPropertyFilter, List, int, int, boolean, EnumSet)
.
The tasks are not filtered. They are sorted as follows priority ascending (higher priority first), start timestamp ascending (older first), id ascending.
If you want to filter or order your result you should use directly the method IWorkflowSession.findWorkTasks(IPropertyFilter, List, int, int, boolean, EnumSet)
.
Consider to use the TaskQuery
API alternatively.
This fluent API makes the statement combinable with other filters
and allows SQL-like value comparisons. E.g:
TaskQuery query = TaskQuery.create()
.where().currentUserCanWorkOn()
.and().state().isEqual(TaskState.SUSPENDED);
List<ITask> tasks = ivy.wf.getTaskQueryExecutor().getResults(query, startIndex, count);
startIndex
- the index of the first task of all tasks found that will be returnedcount
- how many tasks should be returned. -1 for all.PersistencyException
- if persistency access fails.TaskQuery
,
IWorkflowContext.getTaskQueryExecutor()
List<ITask> findSuspendedAndParkedWorkTasks(int startIndex, int count) throws PersistencyException
TaskState.SUSPENDED
or TaskState.PARKED
.
This is a user convenience method. The method calls internal the method IWorkflowSession.findWorkTasks(IPropertyFilter, List, int, int, boolean, EnumSet)
.
The tasks are not filtered. They are sorted as follows priority ascending (higher priority first), start timestamp ascending (older first), id ascending.
If you want to filter or order your result you should use directly the method IWorkflowSession.findWorkTasks(IPropertyFilter, List, int, int, boolean, EnumSet)
.
Consider to use the TaskQuery
API alternatively.
This fluent API makes the statement combinable with other filters
and allows SQL-like value comparisons. E.g:
TaskQuery query = TaskQuery.create()
.where().currentUserCanWorkOn()
.and(
TaskQuery.create()
.where().state().isEqual(TaskState.SUSPENDED)
.or().state().isEqual(TaskState.PARKED)
);
List<ITask> tasks = ivy.wf.getTaskQueryExecutor().getResults(query, startIndex, count);
startIndex
- the index of the first task of all tasks found that will be returnedcount
- how many tasks should be returned. -1 for all.PersistencyException
- if persistency access fails.TaskQuery
,
IWorkflowContext.getTaskQueryExecutor()
List<ITask> findParkedWorkTasks(int startIndex, int count) throws PersistencyException
TaskState.PARKED
.
This is a user convenience method. The method calls internal the method IWorkflowSession.findWorkTasks(IPropertyFilter, List, int, int, boolean, EnumSet)
.
The tasks are not filtered. They are sorted as follows priority ascending (higher priority first), start timestamp ascending (older first), id ascending.
If you want to filter or order your result you should use directly the method IWorkflowSession.findWorkTasks(IPropertyFilter, List, int, int, boolean, EnumSet)
.
Consider to use the TaskQuery
API alternatively.
This fluent API makes the statement combinable with other filters
and allows SQL-like value comparisons. E.g:
TaskQuery query = TaskQuery.create()
.where().currentUserCanWorkOn()
.and().state().isEqual(TaskState.PARKED);
List<ITask> tasks = ivy.wf.getTaskQueryExecutor().getResults(query, startIndex, count);
startIndex
- the index of the first task of all tasks found that will be returnedcount
- how many tasks should be returned. -1 for all.PersistencyException
- if persistency access fails.TaskQuery
,
IWorkflowContext.getTaskQueryExecutor()
List<ITask> findResumedWorkTasks(int startIndex, int count) throws PersistencyException
TaskState.RESUMED
.
This is a user convenience method. The method calls internal the method IWorkflowSession.findWorkTasks(IPropertyFilter, List, int, int, boolean, EnumSet)
.
The tasks are not filtered. They are sorted as follows priority ascending (higher priority first), start timestamp ascending (older first), id ascending.
If you want to filter or order your result you should use directly the method IWorkflowSession.findWorkTasks(IPropertyFilter, List, int, int, boolean, EnumSet)
.
Consider to use the TaskQuery
API alternatively.
This fluent API makes the statement combinable with other filters
and allows SQL-like value comparisons. E.g:
TaskQuery query = TaskQuery.create()
.where().currentUserCanWorkOn()
.and().state().isEqual(TaskState.RESUMED);
List<ITask> tasks = ivy.wf.getTaskQueryExecutor().getResults(query, startIndex, count);
startIndex
- the index of the first task of all tasks found that will be returnedcount
- how many tasks should be returned. -1 for all.PersistencyException
- if persistency access fails.TaskQuery
,
IWorkflowContext.getTaskQueryExecutor()
List<ITask> findCreatedAndResumedWorkTasks(int startIndex, int count) throws PersistencyException
TaskState.RESUMED
or TaskState.CREATED
.
This is a user convenience method. The method calls internal the method IWorkflowSession.findWorkTasks(IPropertyFilter, List, int, int, boolean, EnumSet)
.
The tasks are not filtered. They are sorted as follows priority ascending (higher priority first), start timestamp ascending (older first), id ascending.
If you want to filter or order your result you should use directly the method IWorkflowSession.findWorkTasks(IPropertyFilter, List, int, int, boolean, EnumSet)
.
Consider to use the TaskQuery
API alternatively.
This fluent API makes the statement combinable with other filters
and allows SQL-like value comparisons. E.g:
TaskQuery query = TaskQuery.create()
.where().currentUserCanWorkOn()
.and(
TaskQuery.create()
.where().state().isEqual(TaskState.CREATED)
.or().state().isEqual(TaskState.RESUMED)
)
List<ITask> tasks = ivy.wf.getTaskQueryExecutor().getResults(query, startIndex, count);
startIndex
- the index of the first task of all tasks found that will be returnedcount
- how many tasks should be returned. -1 for all.PersistencyException
- if persistency access fails.TaskQuery
,
IWorkflowContext.getTaskQueryExecutor()
IQueryResult<ITask> findLockedWorkTasks(IPropertyFilter<TaskProperty> filter, List<PropertyOrder<TaskProperty>> order, int startIndex, int count, boolean returnAllCount, EnumSet<TaskState> includeTaskStates) throws PersistencyException
Gets all tasks the workflow session user could work if they were in state TaskState.SUSPENDED
but are currently in state TaskState.RESUMED
or TaskState.PARKED
because other users are
working on them.
If includeTaskStates contains state TaskState.RESUMED
all tasks in state TaskState.RESUMED
that the workflow session user could resume are also included in the result.
If includeTaskStates contains state TaskState.PARKED
all tasks in state TaskState.PARKED
that the workflow session user could resume are also included in the result.
filter
- filter criteria to specify which tasks should be readorder
- how to order the resultstartIndex
- the index of the first task of all tasks found returnedcount
- how many tasks found are returned. -1 for all.returnAllCount
- if true the query result method IQueryResult.getAllCount()
returns the overall cases that have been found, if false it returns -1includeTaskStates
- set of task states that should be included.PersistencyException
- if persistency access fails.IQueryResult<ICase> findStartedCases(IPropertyFilter<CaseProperty> filter, List<PropertyOrder<CaseProperty>> order, int startIndex, int count, boolean returnAllCount) throws PersistencyException
Consider to use the CaseQuery
API alternatively.
This fluent API makes the statement combinable with other filters
and allows SQL-like value comparisons. E.g:
CaseQuery query = CaseQuery.create()
.where().currentUserHasStarted();
List<ICase> cases = ivy.wf.getCaseQueryExecutor().getResults(query, startIndex, count);
filter
- filter criteria to specify which cases should be in the resultorder
- how to order the resultstartIndex
- the index of the first case of all cases found returnedcount
- how many cases found are returned. -1 for all.returnAllCount
- if true the query result method IQueryResult.getAllCount()
returns the overall cases that have been found, if false it returns -1PersistencyException
- if persistency access failsCaseQuery
,
IWorkflowContext.getCaseQueryExecutor()
List<ICase> findStartedCases(int startIndex, int count, Date caseStartTimestampFilter) throws PersistencyException
IWorkflowSession.findStartedCases(IPropertyFilter, List, int, int, boolean)
.
The cases are only filtered by the case start timestamp. They are sorted as follows: start timestamp descending (younger first), id descending.
If you want to filter or order your result you should use directly the method IWorkflowSession.findStartedCases(IPropertyFilter, List, int, int, boolean)
.
Consider to use the CaseQuery
API alternatively.
This fluent API makes the statement combinable with other filters
and allows SQL-like value comparisons. E.g:
CaseQuery query = CaseQuery.create()
.where().currentUserHasStarted()
.and().startTimestamp().isLowerOrEqualThan(caseStartTimestampFilter);
List<ICase> cases = ivy.wf.getCaseQueryExecutor().getResults(query, startIndex, count);
startIndex
- the index of the first case of all cases found that will be returnedcount
- how many cases should be returned. -1 for all.caseStartTimestampFilter
- case start timestamp filter. Can be null if filter should be deactivated. Cases returned have start timestamps that are equal or earlierPersistencyException
- if persistency access failsCaseQuery
,
IWorkflowContext.getCaseQueryExecutor()
IQueryResult<ICase> findStartedCasesByRole(List<IRole> roles, IPropertyFilter<CaseProperty> filter, List<PropertyOrder<CaseProperty>> order, int startIndex, int count, boolean returnAllCount) throws PersistencyException
roles
- the roles that one must had to start the casefilter
- filter criteria to specify which cases should be in the resultorder
- how to order the resultstartIndex
- the index of the first case of all cases found returnedcount
- how many cases found are returned. -1 for all.returnAllCount
- if true the query result method IQueryResult.getAllCount()
returns the overall cases that have been found, if false it returns -1PersistencyException
- if persistency access failsIQueryResult<ITask> findWorkedOnTasks(IPropertyFilter<TaskProperty> filter, List<PropertyOrder<TaskProperty>> order, int startIndex, int count, boolean returnAllCount) throws PersistencyException
Consider to use the TaskQuery
API alternatively.
This fluent API makes the statement combinable with other filters
and allows SQL-like value comparisons. E.g:
TaskQuery query = TaskQuery.create()
.where().currentUserHasWorkedOn();
List<ITask> tasks = ivy.wf.getTaskQueryExecutor().getResults(query, startIndex, count);
filter
- filter criteria to specify which tasks should be in the resultorder
- how to order the resultstartIndex
- the index of the first task of all tasks found returnedcount
- how many tasks found are returned. -1 for all.returnAllCount
- if true the query result method IQueryResult.getAllCount()
returns the overall cases that have been found, if false it returns -1PersistencyException
- if persistency access failsTaskQuery
,
IWorkflowContext.getTaskQueryExecutor()
List<ITask> findWorkedOnTasks(int startIndex, int count, Date taskEndTimestampFilter) throws PersistencyException
IWorkflowSession.findWorkedOnTasks(IPropertyFilter, List, int, int, boolean)
.
The tasks are only filtered by the task end timestamp. They are sorted as follows: end timestamp descending (younger first), id descending.
If you want to filter or order your result you should use directly the method IWorkflowSession.findWorkedOnTasks(IPropertyFilter, List, int, int, boolean)
.
Consider to use the TaskQuery
API alternatively.
This fluent API makes the statement combinable with other filters
and allows SQL-like value comparisons. E.g:
TaskQuery query = TaskQuery.create()
.where().currentUserHasWorkedOn()
.and().endTimestamp().isLowerOrEqualThan(taskEndTimestampFilter);
List<ITask> tasks = ivy.wf.getTaskQueryExecutor().getResults(query, startIndex, count);
startIndex
- the index of the first case of all cases found that will be returnedcount
- how many cases should be returned. -1 for all.taskEndTimestampFilter
- task end timestamp filter. Can be null if filter should be deactivated. Tasks returned have end timestamps that are equal or earlierPersistencyException
- if persistency access failsTaskQuery
,
IWorkflowContext.getTaskQueryExecutor()
IQueryResult<ITask> findWorkedOnTasksByRole(List<IRole> roles, IPropertyFilter<TaskProperty> filter, List<PropertyOrder<TaskProperty>> order, int startIndex, int count, boolean returnAllCount) throws PersistencyException
Example:
import ch.ivyteam.ivy.security.IRole; import ch.ivyteam.ivy.workflow.PropertyOrder; import ch.ivyteam.ivy.workflow.TaskProperty; import ch.ivyteam.ivy.workflow.IPropertyFilter; import ch.ivyteam.ivy.persistence.OrderDirection; import ch.ivyteam.logicalexpression.RelationalOperator; List<IRole> roleList; roleList.add(ivy.session.getSecurityContext().findRole("RoleName")); IPropertyFilter<TaskProperty> filter = ivy.wf.createTaskPropertyFilter(TaskProperty.END_TIMESTAMP, RelationalOperator.EQUAL_OR_LARGER, new Date() - '10h0m'); List<PropertyOrder<TaskProperty>> order; order.add(new PropertyOrder<TaskProperty>(TaskProperty.PRIORITY, OrderDirection.DESCENDING)); ivy.session.findWorkedOnTasksByRole(roleList, filter, order, 0, -1, false);
roles
- the roles that one must had to work on the casefilter
- filter criteria to specify which tasks should be in the resultorder
- how to order the resultstartIndex
- the index of the first task of all tasks found returnedcount
- how many tasks found are returned. -1 for all.returnAllCount
- if true the query result method IQueryResult.getAllCount()
returns the overall cases that have been found, if false it returns -1PersistencyException
- if persistency access failsITask createTaskAndCase(IProcessStart processStart) throws PersistencyException
TaskState.CREATED
and the workerUser is set to the current user. This method
can be used to create a non persistent case and task that is started by the
calling user right now.processStart
- process start from which the created case and task
startsPersistencyException
- If persistency access failsITask resumeTask(long taskIdentifier) throws PersistencyException
Resumes a suspended or parked task with its identifier.
Returns null if:
TaskState.SUSPENDED
or TaskState.PARKED
A session user
is allowed to resume a task if he is member of the task activator and the task is in state
TaskState.SUSPENDED
or he is the task worker user and the task is in state TaskState.PARKED
.
taskIdentifier
- ITask identifierPersistencyException
- if persistency access failsIWorkflowSession.resumeTask(long, String)
@Deprecated ITask resumeTask(int taskIdentifier) throws PersistencyException
IWorkflowSession.resumeTask(long)
insteadtaskIdentifier
- PersistencyException
void resetTask(ITask runningTask) throws PersistencyException
Resets a task the workflow session user is working on.
A task that is in state TaskState.CREATED
is in state TaskState.ZOMBIE
afterwards
A task that is in state TaskState.RESUMED
or TaskState.PARKED
is in state
TaskState.SUSPENDED
or TaskState.UNASSIGNED
afterwards.
If the task is not in one of the above state users must not call this method.
runningTask
- The running task to rollbackPersistencyException
- if rollback failsvoid parkTask(ITask task) throws PersistencyException
Parks/reserves a running task for the current session user.
Task must be in state TaskState.CREATED
, TaskState.RESUMED
or TaskState.SUSPENDED
The session user of this session must be known (ISession.getSessionUser()
!= null)
Task is in state TaskState.PARKED
afterwards.
task
- The task to parkPersistencyException
- if persistency access fails@Deprecated List<IGroup<ITask>> findWorkTaskCategories(IPropertyFilter<TaskProperty> categoryFilter, TaskProperty categoryProperty, OrderDirection categoryPropertyOrder, EnumSet<TaskState> includeTaskStates) throws PersistencyException
CategoryTree.createFor(TaskQuery)
insteadConsider to use the TaskQuery
API alternatively.
This fluent API makes the statement combinable with other filters
and allows SQL-like value comparisons. E.g:
TaskQuery query = TaskQuery.create()
.where().currentUserCanWorkOn()
.and().processCategoryCode().isEqual("MY_CATEGORY_CODE")
.groupBy().processCode()
.aggregate().countRows();
Recordset rs = ivy.wf.getTaskQueryExecutor().getRecordset(query);
categoryFilter
- filters the categoriescategoryProperty
- a task property that is used to build the categories (E.g. TaskProperty.PROCESS_CATEGORY_CODE
, TaskProperty.PROCESS_CODE
, TaskProperty.TYPE_CODE
, TaskProperty.SUB_TYPE_CODE
, TaskProperty.KIND_CODE
)categoryPropertyOrder
- the order in which categoryProperty should be ordered in.includeTaskStates
- set of task states that should be included.PersistencyException
- if persistency access failsTaskQuery
,
IWorkflowContext.getTaskQueryExecutor()
@Deprecated List<IGroup<ITask>> findWorkedOnTaskCategories(IPropertyFilter<TaskProperty> categoryFilter, TaskProperty categoryProperty, OrderDirection categoryPropertyOrder) throws PersistencyException
CategoryTree.createFor(TaskQuery)
insteadConsider to use the TaskQuery
API alternatively.
This fluent API makes the statement combinable with other filters
and allows SQL-like value comparisons. E.g:
TaskQuery query = TaskQuery.create()
.where().currentUserHasWorkedOn()
.and().processCategoryCode().isEqual("MY_CATEGORY_CODE")
.groupBy().processCode()
.aggregate().countRows();
Recordset rs = ivy.wf.getTaskQueryExecutor().getRecordset(query);
* @param categoryFilter filters the categoriescategoryProperty
- a task property that is used to build the categories (E.g. TaskProperty.PROCESS_CATEGORY_CODE
, TaskProperty.PROCESS_CODE
, TaskProperty.TYPE_CODE
, TaskProperty.SUB_TYPE_CODE
, TaskProperty.KIND_CODE
)categoryPropertyOrder
- the order in which categoryProperty should be ordered in.PersistencyException
- if persistency access failsTaskQuery
,
IWorkflowContext.getTaskQueryExecutor()
@Deprecated List<IGroup<ICase>> findStartedCaseCategories(IPropertyFilter<CaseProperty> categoryFilter, CaseProperty categoryProperty, OrderDirection categoryPropertyOrder) throws PersistencyException
CategoryTree.createFor(CaseQuery)
insteadConsider to use the CaseQuery
API alternatively.
This fluent API makes the statement combinable with other filters
and allows SQL-like value comparisons. E.g:
CaseQuery query = CaseQuery.create()
.where().currentUserHasStarted()
.and().processCategoryCode().isEqual("MY_CATEGORY_CODE")
.groupBy().processCode()
.aggregate().countRows();
Recordset rs = ivy.wf.getCaseQueryExecutor().getRecordset(query);
categoryFilter
- filters the categoriescategoryProperty
- a case property that is used to build the categories (E.g. CaseProperty.PROCESS_CATEGORY_CODE
, CaseProperty.PROCESS_CODE
, CaseProperty.TYPE_CODE
, CaseProperty.SUB_TYPE_CODE
)categoryPropertyOrder
- the order in which categoryProperty should be ordered in.PersistencyException
- if persistency access failsCaseQuery
,
IWorkflowContext.getCaseQueryExecutor()
IQueryResult<ICase> findInvolvedCases(IPropertyFilter<CaseProperty> filter, List<PropertyOrder<CaseProperty>> order, int startIndex, int count, boolean returnAllCount) throws PersistencyException
Consider to use the CaseQuery
API alternatively.
This fluent API makes the statement combinable with other filters
and allows SQL-like value comparisons. E.g:
CaseQuery query = CaseQuery.create()
.where().currentUserIsInvolved();
List<ICase> cases = ivy.wf.getCaseQueryExecutor().getResults(query, startIndex, count);
filter
- filter criteria to specify which cases should be in the resultorder
- how to order the resultstartIndex
- the index of the first case of all cases found returnedcount
- how many cases found are returned. -1 for all.returnAllCount
- if true the query result method IQueryResult.getAllCount()
returns the overall cases that have been found, if false it returns -1PersistencyException
- if persistency access failsCaseQuery
,
IWorkflowContext.getCaseQueryExecutor()
@Deprecated List<IGroup<ICase>> findInvolvedCasesCategories(IPropertyFilter<CaseProperty> categoryFilter, CaseProperty categoryProperty, OrderDirection categoryPropertyOrder) throws PersistencyException
CategoryTree.createFor(CaseQuery)
insteadConsider to use the CaseQuery
API alternatively.
This fluent API makes the statement combinable with other filters
and allows SQL-like value comparisons. E.g:
CaseQuery query = CaseQuery.create()
.where().currentUserIsInvolved()
.and().processCategoryCode().isEqual("MY_CATEGORY_CODE")
.groupBy().processCode()
.aggregate().countRows();
Recordset rs = ivy.wf.getCaseQueryExecutor().getRecordset(query);
categoryFilter
- filters the categoriescategoryProperty
- a case property that is used to build the categories (E.g. CaseProperty.PROCESS_CATEGORY_CODE
, CaseProperty.PROCESS_CODE
, CaseProperty.TYPE_CODE
, CaseProperty.SUB_TYPE_CODE
)categoryPropertyOrder
- the order in which categoryProperty should be ordered in.PersistencyException
- if persistency access failsCaseQuery
,
IWorkflowContext.getCaseQueryExecutor()
IQueryResult<ICase> findInvolvedCasesByRole(List<IRole> roles, IPropertyFilter<CaseProperty> filter, List<PropertyOrder<CaseProperty>> order, int startIndex, int count, boolean returnAllCount) throws PersistencyException
roles
- filters the roles. Only roles are allowed that the workflow users owns.filter
- filter criteria to specify which cases should be in the resultorder
- how to order the resultstartIndex
- the index of the first case of all cases found returnedcount
- how many cases found are returned. -1 for all.returnAllCount
- if true the query result method IQueryResult.getAllCount()
returns the overall cases that have been found, if false it returns -1PersistencyException
- if persistency access failsIQueryResult<ICase> findInvolvedCasesByRole(InvolvedCasesByRoleQuery query) throws PersistencyException
query
- contains all query parameters which are equivalent to IWorkflowSession.findInvolvedCasesByRole(java.util.List<ch.ivyteam.ivy.security.IRole>, ch.ivyteam.ivy.workflow.IPropertyFilter<ch.ivyteam.ivy.workflow.CaseProperty>, java.util.List<ch.ivyteam.ivy.workflow.PropertyOrder<ch.ivyteam.ivy.workflow.CaseProperty>>, int, int, boolean)
PersistencyException
- if persistency access fails@Deprecated List<IGroup<ICase>> findInvolvedCasesByRoleCategories(List<IRole> roles, IPropertyFilter<CaseProperty> categoryFilter, CaseProperty categoryProperty, OrderDirection categoryPropertyOrder) throws PersistencyException
CategoryTree.createFor(CaseQuery)
insteadroles
- filters the roles. Only roles are allowed that the workflow users owns.categoryFilter
- filters the categoriescategoryProperty
- a case property that is used to build the categories (E.g. CaseProperty.PROCESS_CATEGORY_CODE
, CaseProperty.PROCESS_CODE
, CaseProperty.TYPE_CODE
, CaseProperty.SUB_TYPE_CODE
)categoryPropertyOrder
- the order in which categoryProperty should be ordered in.PersistencyException
- if persistency access failsCopyright © 2024
AXON IVY AG
All Rights Reserved Documentation was generated
on April 28, 2024