Interface TaskQuery.IFilterableColumns
-
- All Known Subinterfaces:
TaskQuery.IFilterQuery
- All Known Implementing Classes:
TaskQuery.FilterQuery
- Enclosing class:
- TaskQuery
public static interface TaskQuery.IFilterableColumns
Provides filter functionality forITask
Example:
Corresponds to SQL:TaskQuery.create().where().customVarCharField1().isEqual("Hello World").and().customDecimalField2().isGreaterThan(15.3);
SELECT * FROM IWA_IWA_Task WHERE CustomVarCharField1 = 'Hello World' AND CustomDecimalField1 > 15.3
- API:
- This is a public API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description TaskQuery.IStringColumnFilterQuery
activatorDisplayName()
Prepares a where statement for the columnActivatorDisplayName
.
Must be followed by a call to a condition method.TaskQuery.IStringColumnFilterQuery
activatorName()
Prepares a where statement for the columnActivatorName
.
Must be followed by a call to a condition method.TaskQuery.IIntegerColumnFilterQuery
activatorRoleId()
Prepares a where statement for the columnActivatorRoleId
.
Must be followed by a call to a condition method.TaskQuery.IIntegerColumnFilterQuery
activatorUserId()
Prepares a where statement for the columnActivatorUserId
.
Must be followed by a call to a condition method.TaskQuery.IStringColumnFilterQuery
additionalProperty(String key)
Deprecated.use
insteadcustomField()
.textField(key)
TaskQuery.IIntegerColumnFilterQuery
applicationId()
Prepares a where statement for the columnApplicationId
.
Must be followed by a call to a condition method.TaskQuery.IStringColumnFilterQuery
businessCalendar()
Prepares a where statement for the columnBusinessCalendar
.
Must be followed by a call to a condition method.TaskQuery.IIntegerColumnFilterQuery
businessCaseId()
Prepares a where statement for the columnBusinessCaseId
.
Must be followed by a call to a condition method.TaskQuery.INumberColumnFilterQuery
businessRuntime()
Prepares a where statement for the columnBusinessRuntime
.
Must be followed by a call to a condition method.TaskQuery.FilterLink
canWorkOn(ISecurityMember member)
Filters all tasks the given security member (user or role) can now work on.TaskQuery.FilterLink
canWorkOn(String memberName, String applicationName)
Filters all tasks where the security member with given member name (user or role) in the given application can now work on.
Compared to the methodcanWorkOn(ISecurityMember)
, this method evaluates the correspondingISecurityMember
on query execution.TaskQuery.IIntegerColumnFilterQuery
caseId()
Prepares a where statement for the columnCaseId
.
Must be followed by a call to a condition method.TaskQuery.FilterLink
cases(CaseQuery caseQuery)
Adds an expression to the where clause that selects those tasks that belong to cases which matches the givencaseQuery
.TaskQuery.IStringColumnFilterQuery
category()
Prepares a where statement for the columnCategory
.
Must be followed by a call to a condition method.TaskQuery.FilterLink
currentUserCanWorkOn()
Filters all tasks the current session user can now work on.TaskQuery.FilterLink
currentUserHasWorkedOn()
Filters all tasks the current session user has worked on.TaskQuery.FilterLink
currentUserIsInvolved()
Filters all tasks the user of the current session user is involved in.TaskQuery.FilterLink
currentUserOrHisRolesAreInvolved()
Filters all tasks the current user or any of his roles are involved in.TaskQuery.ICustomFieldFilterQuery
customField()
Prepares a where statement for a custom field.
Must be followed by a call to a field value type.TaskQuery.IDateColumnFilterQuery
delayTimestamp()
Prepares a where statement for the columnDelayTimestamp
.
Must be followed by a call to a condition method.TaskQuery.IClobColumnFilterQuery
description()
Prepares a where statement for the columnDescription
.
Must be followed by a call to a condition method.TaskQuery.IClobColumnFilterQuery
displayDescriptionTemplate()
Prepares a where statement for the columnDisplayDescriptionTemplate
.
Must be followed by a call to a condition method.TaskQuery.IStringColumnFilterQuery
displayNameTemplate()
Prepares a where statement for the columnDisplayNameTemplate
.
Must be followed by a call to a condition method.TaskQuery.IIntegerColumnFilterQuery
endTaskSwitchEventId()
Prepares a where statement for the columnEndTaskSwitchEventId
.
Must be followed by a call to a condition method.TaskQuery.IDateColumnFilterQuery
endTimestamp()
Prepares a where statement for the columnEndTimestamp
.
Must be followed by a call to a condition method.TaskQuery.IIntegerColumnFilterQuery
expiredCreatorTaskId()
Prepares a where statement for the columnExpiredCreatorTaskId
.
Must be followed by a call to a condition method.TaskQuery.IStringColumnFilterQuery
expiryActivatorDisplayName()
Prepares a where statement for the columnExpiryActivatorDisplayName
.
Must be followed by a call to a condition method.TaskQuery.IStringColumnFilterQuery
expiryActivatorName()
Prepares a where statement for the columnExpiryActivatorName
.
Must be followed by a call to a condition method.TaskQuery.IIntegerColumnFilterQuery
expiryActivatorRoleId()
Prepares a where statement for the columnExpiryActivatorRoleId
.
Must be followed by a call to a condition method.TaskQuery.IIntegerColumnFilterQuery
expiryActivatorUserId()
Prepares a where statement for the columnExpiryActivatorUserId
.
Must be followed by a call to a condition method.TaskQuery.IWorkflowPriorityFilterQuery
expiryPriority()
Prepares a where statement for the columnExpiryPriority
.
Must be followed by a call to a condition method.TaskQuery.IStringColumnFilterQuery
expiryTaskStartElementPid()
Prepares a where statement for the columnExpiryTaskStartElementPid
.
Must be followed by a call to a condition method.TaskQuery.IDateColumnFilterQuery
expiryTimestamp()
Prepares a where statement for the columnExpiryTimestamp
.
Must be followed by a call to a condition method.TaskQuery.IDateColumnFilterQuery
failedTimeoutTimestamp()
Prepares a where statement for the columnFailedTimeoutTimestamp
.
Must be followed by a call to a condition method.TaskQuery.FilterLink
hasWorkedOn(ISecurityMember member)
Filters all tasks the given security member (user or role) has worked on.TaskQuery.FilterLink
hasWorkedOn(String memberName, String applicationName)
Filters all tasks where the security member with given member name (user or role) in the given application has worked on.
Compared to the methodhasWorkedOn(ISecurityMember)
, this method evaluates the correspondingISecurityMember
on query execution.TaskQuery.FilterLink
haveTriggeredCases(CaseQuery caseQuery)
Adds an expression to the where clause that selects those tasks that have triggered the creation of cases which matches the givencaseQuery
.TaskQuery.IBooleanColumnFilterQuery
isExpired()
Prepares a where statement for the columnIsExpired
.
Must be followed by a call to a condition method.TaskQuery.FilterLink
isInvolved(ISecurityMember member)
Filters all tasks the security member is involved in.
If the given security member is a user, this method is equivalent touserIsInvolved(ch.ivyteam.ivy.security.IUser)
. If the given security member is a role, this method is equivalent toroleIsInvolved(ch.ivyteam.ivy.security.IRole)
.TaskQuery.FilterLink
isInvolved(String memberName, String applicationName)
Filters all tasks where the security member with given member name (user or role) in the given application is involved in.TaskQuery.IBooleanColumnFilterQuery
isOffline()
Prepares a where statement for the columnIsOffline
.
Must be followed by a call to a condition method.TaskQuery.IBooleanColumnFilterQuery
isUpdatedOnStart()
Prepares a where statement for the columnIsUpdatedOnStart
.
Must be followed by a call to a condition method.TaskQuery.IStringColumnFilterQuery
name()
Prepares a where statement for the columnName
.
Must be followed by a call to a condition method.TaskQuery.FilterQuery
not(TaskQuery otherQuery)
Adds a condition, which negates a set of where conditions given by theotherQuery
with a NOT expression.
Only the where clause of the givenotherQuery
is considered.TaskQuery.IIntegerColumnFilterQuery
numberOfFailures()
Prepares a where statement for the columnNumberOfFailures
.
Must be followed by a call to a condition method.TaskQuery.IIntegerColumnFilterQuery
numberOfResumes()
Prepares a where statement for the columnNumberOfResumes
.
Must be followed by a call to a condition method.TaskQuery.IStringColumnFilterQuery
originalActivatorDisplayName()
Prepares a where statement for the columnOriginalActivatorDisplayName
.
Must be followed by a call to a condition method.TaskQuery.IStringColumnFilterQuery
originalActivatorName()
Prepares a where statement for the columnOriginalActivatorName
.
Must be followed by a call to a condition method.TaskQuery.IIntegerColumnFilterQuery
originalActivatorRoleId()
Prepares a where statement for the columnOriginalActivatorRoleId
.
Must be followed by a call to a condition method.TaskQuery.IIntegerColumnFilterQuery
originalActivatorUserId()
Prepares a where statement for the columnOriginalActivatorUserId
.
Must be followed by a call to a condition method.TaskQuery.IWorkflowPriorityFilterQuery
originalPriority()
Prepares a where statement for the columnOriginalPriority
.
Must be followed by a call to a condition method.TaskQuery.IWorkflowPriorityFilterQuery
priority()
Prepares a where statement for the columnPriority
.
Must be followed by a call to a condition method.TaskQuery.IIntegerColumnFilterQuery
processModelId()
Prepares a where statement for the columnProcessModelId
.
Must be followed by a call to a condition method.TaskQuery.IStringColumnFilterQuery
requestPath()
Prepares a where statement for the columnRequestPath
.
Must be followed by a call to a condition method.TaskQuery.FilterLink
roleIsInvolved(IRole role)
Filters all tasks the role is involved in.TaskQuery.FilterLink
roleIsInvolved(String roleName, String applicationName)
Filters all tasks where the role with given name in the given application is involved in.TaskQuery.IIntegerColumnFilterQuery
startTaskSwitchEventId()
Prepares a where statement for the columnStartTaskSwitchEventId
.
Must be followed by a call to a condition method.TaskQuery.IDateColumnFilterQuery
startTimestamp()
Prepares a where statement for the columnStartTimestamp
.
Must be followed by a call to a condition method.TaskQuery.ITaskStateFilterQuery
state()
Prepares a where statement for the columnState
.
Must be followed by a call to a condition method.TaskQuery.IIntegerColumnFilterQuery
taskEndId()
Prepares a where statement for the columnTaskEndId
.
Must be followed by a call to a condition method.TaskQuery.IIntegerColumnFilterQuery
taskId()
Prepares a where statement for the columnTaskId
.
Must be followed by a call to a condition method.TaskQuery.IIntegerColumnFilterQuery
taskStartId()
Prepares a where statement for the columnTaskStartId
.
Must be followed by a call to a condition method.TaskQuery.IIntegerColumnFilterQuery
timeoutedCreatorIntrmdtEventId()
Prepares a where statement for the columnTimeoutedCreatorIntrmdtEventId
.
Must be followed by a call to a condition method.TaskQuery.FilterLink
userIsInvolved(IUser user)
Filters all tasks the user is involved in.TaskQuery.FilterLink
userIsInvolved(String userName, String applicationName)
Filters all tasks where the user with given name in the given application is involved in.TaskQuery.FilterLink
userOrHisRolesAreInvolved(IUser user)
Filters all tasks the given user or any of his roles are involved in.TaskQuery.FilterLink
userOrHisRolesAreInvolved(String userName, String applicationName)
Filters all tasks the user with the given name in the given application or any of his roles are involved in.TaskQuery.IIntegerColumnFilterQuery
workerSessionId()
Prepares a where statement for the columnWorkerSessionId
.
Must be followed by a call to a condition method.TaskQuery.IStringColumnFilterQuery
workerUserDisplayName()
Prepares a where statement for the columnWorkerUserDisplayName
.
Must be followed by a call to a condition method.TaskQuery.IIntegerColumnFilterQuery
workerUserId()
Prepares a where statement for the columnWorkerUserId
.
Must be followed by a call to a condition method.TaskQuery.IStringColumnFilterQuery
workerUserName()
Prepares a where statement for the columnWorkerUserName
.
Must be followed by a call to a condition method.TaskQuery.INumberColumnFilterQuery
workingTime()
Prepares a where statement for the columnWorkingTime
.
Must be followed by a call to a condition method.
-
-
-
Method Detail
-
cases
TaskQuery.FilterLink cases(CaseQuery caseQuery)
Adds an expression to the where clause that selects those tasks that belong to cases which matches the given
caseQuery
.This method considers only the where clause of the given
caseQuery
. All other parts are ignored.Example:
Get all tasks that belong to cases with the custom varchar field1 set to "HRM"import ch.ivyteam.ivy.workflow.ITask; import ch.ivyteam.ivy.workflow.TaskState; import ch.ivyteam.ivy.workflow.query.TaskQuery; import ch.ivyteam.ivy.workflow.query.CaseQuery; TaskQuery query = TaskQuery.create().where().cases(CaseQuery.create().where().customVarCharField1().isEqual("HRM")); List<ITask> tasksWithBelongToHrmCases = ivy.wf.getTaskQueryExecutor().getResults(query);
- Parameters:
caseQuery
- case query with where clause to filter the cases- Returns:
- the query for further composition
- Throws:
IllegalArgumentException
- If the given caseQuery is null- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
haveTriggeredCases
TaskQuery.FilterLink haveTriggeredCases(CaseQuery caseQuery)
Adds an expression to the where clause that selects those tasks that have triggered the creation of cases which matches the given
caseQuery
.Tasks can trigger the creation of cases by using the Trigger process element.
This method considers only the where clause of the given
caseQuery
. All other parts are ignoredExample:
Get all tasks that have created cases with the custom varchar field1 set to "HRM"import ch.ivyteam.ivy.workflow.ITask; import ch.ivyteam.ivy.workflow.TaskState; import ch.ivyteam.ivy.workflow.query.TaskQuery; import ch.ivyteam.ivy.workflow.query.CaseQuery; TaskQuery query = TaskQuery.create().where().haveTriggeredCases(CaseQuery.create().where().customVarCharField1().isEqual("HRM")); List<ITask> tasksThatTriggeredHrmCases = ivy.wf.getTaskQueryExecutor().getResults(query);
- Parameters:
caseQuery
- case query with where clause to filter the cases- Returns:
- the query for further composition
- Throws:
IllegalArgumentException
- If the given caseQuery is null- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
isInvolved
TaskQuery.FilterLink isInvolved(ISecurityMember member)
Filters all tasks the security member is involved in.
- If the given security member is a user, this method is equivalent to
userIsInvolved(ch.ivyteam.ivy.security.IUser)
. - If the given security member is a role, this method is equivalent to
roleIsInvolved(ch.ivyteam.ivy.security.IRole)
.
- Parameters:
member
-- Returns:
- the query for further composition
- Throws:
IllegalArgumentException
- If the given member is null- See Also:
CaseQuery.IFilterableColumns.isInvolved(ch.ivyteam.ivy.security.ISecurityMember)
,CaseQuery.IFilterableColumns.isInvolved(String, String)
,isInvolved(String, String)
,currentUserIsInvolved()
,userIsInvolved(ch.ivyteam.ivy.security.IUser)
,userIsInvolved(String, String)
,roleIsInvolved(ch.ivyteam.ivy.security.IRole)
,roleIsInvolved(String, String)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- If the given security member is a user, this method is equivalent to
-
isInvolved
TaskQuery.FilterLink isInvolved(String memberName, String applicationName)
Filters all tasks where the security member with given member name (user or role) in the given application is involved in.Compared to the method
isInvolved(ISecurityMember)
, this method evaluates the correspondingISecurityMember
on query execution.Example:
Get all tasks where the current user or the user 'UserHans' is involved in:import ch.ivyteam.ivy.workflow.ITask; import ch.ivyteam.ivy.workflow.query.TaskQuery; TaskQuery query = TaskQuery.create() .where().isInvolved("#UserHans", "MyApp") // note: to convert a user name to a member name a '#' is added as prefix .or().isInvolved(ivy.session.getSessionUser().getMemberName(), "MyApp"); List<ITask> tasks = ivy.wf.getTaskQueryExecutor().getResults(query);
- Parameters:
memberName
- e.g. "#UserHans" or "TopManagementRole"applicationName
- e.g. "MyApplication"- Returns:
- the query for further composition
- See Also:
CaseQuery.IFilterableColumns.isInvolved(ch.ivyteam.ivy.security.ISecurityMember)
,CaseQuery.IFilterableColumns.isInvolved(String, String)
,isInvolved(ch.ivyteam.ivy.security.ISecurityMember)
,currentUserIsInvolved()
,userIsInvolved(ch.ivyteam.ivy.security.IUser)
,userIsInvolved(String, String)
,roleIsInvolved(ch.ivyteam.ivy.security.IRole)
,roleIsInvolved(String, String)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
userIsInvolved
TaskQuery.FilterLink userIsInvolved(String userName, String applicationName)
Filters all tasks where the user with given name in the given application is involved in.Compared to the method
userIsInvolved(IUser)
, this method evaluates the correspondingIUser
on query execution.This method is equivalent to
isInvolved("#" + userName, applicationName)
- Parameters:
userName
- e.g. "UserHans"applicationName
-- Returns:
- the query for further composition
- See Also:
CaseQuery.IFilterableColumns.isInvolved(ch.ivyteam.ivy.security.ISecurityMember)
,CaseQuery.IFilterableColumns.isInvolved(String, String)
,isInvolved(ch.ivyteam.ivy.security.ISecurityMember)
,isInvolved(String, String)
,currentUserIsInvolved()
,userIsInvolved(ch.ivyteam.ivy.security.IUser)
,roleIsInvolved(ch.ivyteam.ivy.security.IRole)
,roleIsInvolved(String, String)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
userOrHisRolesAreInvolved
TaskQuery.FilterLink userOrHisRolesAreInvolved(String userName, String applicationName)
Filters all tasks the user with the given name in the given application or any of his roles are involved in. See
userIsInvolved(ch.ivyteam.ivy.security.IUser)
for a description of when a user is involved in a task androleIsInvolved(ch.ivyteam.ivy.security.IRole)
for when a role is involved in a task.- Parameters:
userName
- e.g. "Joe"applicationName
-- Returns:
- the query for further composition
- Throws:
IllegalArgumentException
- If the given user is null- Since:
- 8.0.39
- See Also:
userOrHisRolesAreInvolved(ch.ivyteam.ivy.security.IUser user)
,currentUserOrHisRolesAreInvolved()
,userIsInvolved(ch.ivyteam.ivy.security.IUser)
,userIsInvolved(String, String)
,roleIsInvolved(ch.ivyteam.ivy.security.IRole)
,roleIsInvolved(String, String)
,currentUserIsInvolved()
,CaseQuery.IFilterableColumns.userOrHisRolesAreInvolved(String, String)
,CaseQuery.IFilterableColumns.userOrHisRolesAreInvolved(ch.ivyteam.ivy.security.IUser)
,CaseQuery.IFilterableColumns.currentUserOrHisRolesAreInvolved()
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
roleIsInvolved
TaskQuery.FilterLink roleIsInvolved(String roleName, String applicationName)
Filters all tasks where the role with given name in the given application is involved in.Compared to the method
roleIsInvolved(IRole)
, this method evaluates the correspondingIRole
on query execution.This method is equivalent to
isInvolved(String, String)
- Parameters:
roleName
- e.g. "TopManagementRole"applicationName
-- Returns:
- the query for further composition@see CaseQuery.IFilterQuery#isInvolved(ch.ivyteam.ivy.security.ISecurityMember)
- See Also:
CaseQuery.IFilterableColumns.isInvolved(String, String)
,isInvolved(ch.ivyteam.ivy.security.ISecurityMember)
,isInvolved(String, String)
,currentUserIsInvolved()
,userIsInvolved(ch.ivyteam.ivy.security.IUser)
,userIsInvolved(String, String)
,roleIsInvolved(ch.ivyteam.ivy.security.IRole)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
currentUserIsInvolved
TaskQuery.FilterLink currentUserIsInvolved()
Filters all tasks the user of the current session user is involved in.
Example:
import ch.ivyteam.ivy.workflow.query.TaskQuery; import ch.ivyteam.ivy.workflow.ITask; TaskQuery query = TaskQuery.create().where().currentUserIsInvolved(); List<ITask> tasksSessionIsInvolved = ivy.wf.getTaskQueryExecutor().getResults(query);
- Returns:
- the query for further composition
- Throws:
IllegalStateException
- If there is no current session available- See Also:
CaseQuery.IFilterableColumns.isInvolved(ch.ivyteam.ivy.security.ISecurityMember)
,CaseQuery.IFilterableColumns.isInvolved(String, String)
,isInvolved(ch.ivyteam.ivy.security.ISecurityMember)
,isInvolved(String, String)
,userIsInvolved(ch.ivyteam.ivy.security.IUser)
,userIsInvolved(String, String)
,roleIsInvolved(ch.ivyteam.ivy.security.IRole)
,roleIsInvolved(String, String)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
currentUserOrHisRolesAreInvolved
TaskQuery.FilterLink currentUserOrHisRolesAreInvolved()
Filters all tasks the current user or any of his roles are involved in. See
currentUserIsInvolved()
for a description of when the current user is involved in a task androleIsInvolved(ch.ivyteam.ivy.security.IRole)
for when a role is involved in a task.- Returns:
- the query for further composition
- Throws:
IllegalArgumentException
- If the given user is null- Since:
- 8.0.39
- See Also:
userOrHisRolesAreInvolved(ch.ivyteam.ivy.security.IUser)
,userOrHisRolesAreInvolved(String, String)
,userIsInvolved(ch.ivyteam.ivy.security.IUser)
,userIsInvolved(String, String)
,roleIsInvolved(ch.ivyteam.ivy.security.IRole)
,roleIsInvolved(String, String)
,currentUserIsInvolved()
,CaseQuery.IFilterableColumns.currentUserOrHisRolesAreInvolved()
,CaseQuery.IFilterableColumns.userOrHisRolesAreInvolved(String, String)
,CaseQuery.IFilterableColumns.userOrHisRolesAreInvolved(ch.ivyteam.ivy.security.IUser)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
roleIsInvolved
TaskQuery.FilterLink roleIsInvolved(IRole role)
Filters all tasks the role is involved in. A role is involved in a task if
- the task is assigned to the role. Either before or after the expiry.
- the role becomes responsible for a task after expiry but the task has not yet expired.
- the task is assigned to the role but is
delayed
- the task is assigned to a sub or parent role of the role
Example:
import ch.ivyteam.ivy.workflow.query.TaskQuery; import ch.ivyteam.ivy.workflow.ITask; import ch.ivyteam.ivy.security.IRole; IRole role = ivy.session.getSecurityContext().findRole("Admin"); TaskQuery query = TaskQuery.create().where().roleIsInvolved(role); List<ITask> userInvolvedTasks = ivy.wf.getTaskQueryExecutor().getResults(query);
- Parameters:
role
-- Returns:
- the query for further composition
- Throws:
IllegalArgumentException
- If the given role is null- See Also:
CaseQuery.IFilterableColumns.isInvolved(ch.ivyteam.ivy.security.ISecurityMember)
,CaseQuery.IFilterableColumns.isInvolved(String, String)
,isInvolved(ch.ivyteam.ivy.security.ISecurityMember)
,isInvolved(String, String)
,currentUserIsInvolved()
,userIsInvolved(ch.ivyteam.ivy.security.IUser)
,userIsInvolved(String, String)
,roleIsInvolved(String, String)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
userIsInvolved
TaskQuery.FilterLink userIsInvolved(IUser user)
Filters all tasks the user is involved in. A user is involved in a task if
- the user could work on the task
- the user is working at the task right now
- the user has completed the task
- the user has worked on the task without completing it and now it is no longer accessible for him. Either because the task was completed by someone else, was reassigned, ...
- the user can work on the task but it is
delayed
Example:
import ch.ivyteam.ivy.workflow.query.TaskQuery; import ch.ivyteam.ivy.workflow.ITask; import ch.ivyteam.ivy.security.IUser; IUser user = ivy.session.getSessionUser(); TaskQuery query = TaskQuery.create().where().userIsInvolved(user); List<ITask> userInvolvedTasks = ivy.wf.getTaskQueryExecutor().getResults(query);
- Parameters:
user
-- Returns:
- the query for further composition
- Throws:
IllegalArgumentException
- If the given user is null- See Also:
CaseQuery.IFilterableColumns.isInvolved(ch.ivyteam.ivy.security.ISecurityMember)
,CaseQuery.IFilterableColumns.isInvolved(String, String)
,isInvolved(ch.ivyteam.ivy.security.ISecurityMember)
,isInvolved(String, String)
,currentUserIsInvolved()
,userIsInvolved(String, String)
,roleIsInvolved(ch.ivyteam.ivy.security.IRole)
,roleIsInvolved(String, String)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
userOrHisRolesAreInvolved
TaskQuery.FilterLink userOrHisRolesAreInvolved(IUser user)
Filters all tasks the given user or any of his roles are involved in. See
userIsInvolved(ch.ivyteam.ivy.security.IUser)
for a description of when a user is involved in a task androleIsInvolved(ch.ivyteam.ivy.security.IRole)
for when a role is involved in a task.- Parameters:
user
-- Returns:
- the query for further composition
- Throws:
IllegalArgumentException
- If the given user is null- Since:
- 8.0.39
- See Also:
userOrHisRolesAreInvolved(String, String)
,currentUserOrHisRolesAreInvolved()
,userIsInvolved(ch.ivyteam.ivy.security.IUser)
,userIsInvolved(String, String)
,roleIsInvolved(ch.ivyteam.ivy.security.IRole)
,roleIsInvolved(String, String)
,currentUserIsInvolved()
,CaseQuery.IFilterableColumns.userOrHisRolesAreInvolved(ch.ivyteam.ivy.security.IUser)
,CaseQuery.IFilterableColumns.userOrHisRolesAreInvolved(String, String)
,CaseQuery.IFilterableColumns.currentUserOrHisRolesAreInvolved()
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
canWorkOn
TaskQuery.FilterLink canWorkOn(ISecurityMember member)
Filters all tasks the given security member (user or role) can now work on.
Example:
import ch.ivyteam.ivy.workflow.query.TaskQuery; import ch.ivyteam.ivy.workflow.ITask; import ch.ivyteam.ivy.security.IUser; IUser user = ivy.session.getSessionUser(); TaskQuery query = TaskQuery.create().where().canWorkOn(user); List<ITask> tasksUserCanWorkOn = ivy.wf.getTaskQueryExecutor().getResults(query);
- Parameters:
member
-- Returns:
- the query for further composition
- Throws:
IllegalArgumentException
- If the given member is null- See Also:
currentUserCanWorkOn()
,canWorkOn(String, String)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
canWorkOn
TaskQuery.FilterLink canWorkOn(String memberName, String applicationName)
Filters all tasks where the security member with given member name (user or role) in the given application can now work on.
Compared to the methodcanWorkOn(ISecurityMember)
, this method evaluates the correspondingISecurityMember
on query execution.Example:
Get all tasks where the current user or the user 'UserHans' can work on:import ch.ivyteam.ivy.workflow.ITask; import ch.ivyteam.ivy.workflow.query.TaskQuery; TaskQuery query = TaskQuery.create() .where().canWorkOn("#UserHans", "MyApp") // note: to convert a user name to a member name a '#' is added as prefix .or().canWorkOn(ivy.session.getSessionUser().getMemberName(), "MyApp"); List<ITask> tasks = ivy.wf.getTaskQueryExecutor().getResults(query);
- Parameters:
memberName
- e.g. "#UserHans" or "TopManagementRole"applicationName
- e.g. "MyApplication"- Returns:
- the query for further composition
- See Also:
currentUserCanWorkOn()
,canWorkOn(ch.ivyteam.ivy.security.ISecurityMember)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
currentUserCanWorkOn
TaskQuery.FilterLink currentUserCanWorkOn()
Filters all tasks the current session user can now work on.
Example:
import ch.ivyteam.ivy.workflow.query.TaskQuery; import ch.ivyteam.ivy.workflow.ITask; TaskQuery query = TaskQuery.create().where().currentUserCanWorkOn(); List<ITask> tasksSessionCanWorkOn = ivy.wf.getTaskQueryExecutor().getResults(query);
- Returns:
- the query for further composition
- Throws:
IllegalStateException
- If there is no current session available- See Also:
canWorkOn(ch.ivyteam.ivy.security.ISecurityMember)
,canWorkOn(String, String)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
hasWorkedOn
TaskQuery.FilterLink hasWorkedOn(ISecurityMember member)
Filters all tasks the given security member (user or role) has worked on.
Example:
import ch.ivyteam.ivy.workflow.query.TaskQuery; import ch.ivyteam.ivy.workflow.ITask; import ch.ivyteam.ivy.security.IUser; IUser user = ivy.session.getSessionUser(); TaskQuery query = TaskQuery.create().where().hasWorkedOn(user); List<ITask> tasksUserHasWorkedOn = ivy.wf.getTaskQueryExecutor().getResults(query);
- Parameters:
member
-- Returns:
- the query for further composition
- Throws:
IllegalArgumentException
- If the given member is null- See Also:
currentUserHasWorkedOn()
,hasWorkedOn(String, String)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
hasWorkedOn
TaskQuery.FilterLink hasWorkedOn(String memberName, String applicationName)
Filters all tasks where the security member with given member name (user or role) in the given application has worked on.
Compared to the methodhasWorkedOn(ISecurityMember)
, this method evaluates the correspondingISecurityMember
on query execution.Example:
Get all tasks where the current user or the user 'UserHans' has worked on:import ch.ivyteam.ivy.workflow.ITask; import ch.ivyteam.ivy.workflow.query.TaskQuery; TaskQuery query = TaskQuery.create() .where().hasWorkedOn("#UserHans", "MyApp") // note: to convert a user name to a member name a '#' is added as prefix .or().hasWorkedOn(ivy.session.getSessionUser().getMemberName(), "MyApp"); List<ITask> tasks = ivy.wf.getTaskQueryExecutor().getResults(query);
- Parameters:
memberName
- e.g. "#UserHans" or "TopManagementRole"applicationName
- e.g. "MyApplication"- Returns:
- the query for further composition
- See Also:
currentUserHasWorkedOn()
,hasWorkedOn(ch.ivyteam.ivy.security.ISecurityMember)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
currentUserHasWorkedOn
TaskQuery.FilterLink currentUserHasWorkedOn()
Filters all tasks the current session user has worked on.
Example:
import ch.ivyteam.ivy.workflow.query.TaskQuery; import ch.ivyteam.ivy.workflow.ITask; TaskQuery query = TaskQuery.create().where().currentUserHasWorkedOn(); List<ITask> tasksSessionHasWorkedOn = ivy.wf.getTaskQueryExecutor().getResults(query);
- Returns:
- the query for further composition
- Throws:
IllegalStateException
- If there is no current session available- See Also:
hasWorkedOn(ch.ivyteam.ivy.security.ISecurityMember)
,hasWorkedOn(String, String)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
customField
TaskQuery.ICustomFieldFilterQuery customField()
Prepares a where statement for a custom field.
Must be followed by a call to a field value type.Example:
import ch.ivyteam.ivy.workflow.ITask; import ch.ivyteam.ivy.workflow.query.TaskQuery; TaskQuery query = TaskQuery.create().where().customField().stringField("myCustomField").isEqualTo("valueToFind")"; List<ITask> tasksWithMatchingField = ivy.wf.getTaskQueryExecutor().getResults(query);
- Returns:
- the query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
additionalProperty
@Deprecated TaskQuery.IStringColumnFilterQuery additionalProperty(String key)
Deprecated.use
insteadcustomField()
.textField(key)
Prepares a where statement for an additional property value.
Must be followed by a call to a condition method.- Parameters:
key
- the additional property key- Returns:
- the query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
not
TaskQuery.FilterQuery not(TaskQuery otherQuery)
Adds a condition, which negates a set of where conditions given by the
otherQuery
with a NOT expression.
Only the where clause of the givenotherQuery
is considered. All other parts are ignored.SQL part:
NOT([otherSqlExpression])
Example:
Corresponds to SQL:TaskQuery subQuery = TaskQuery.create().where() .customVarCharField1().equals("a").or() .customVarCharField2().equals("b") TaskQuery query = TaskQuery.create().where() .not(subQuery)
SELECT * FROM IWA_IWA_Task WHERE NOT( customVarCharField1 = 'a' OR customVarCharField2 = 'b')
- Parameters:
otherQuery
- Query from which the negated where part will be added to the current query.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
taskId
TaskQuery.IIntegerColumnFilterQuery taskId()
Prepares a where statement for the column
TaskId
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
caseId
TaskQuery.IIntegerColumnFilterQuery caseId()
Prepares a where statement for the column
CaseId
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
businessCaseId
TaskQuery.IIntegerColumnFilterQuery businessCaseId()
Prepares a where statement for the column
BusinessCaseId
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
processModelId
TaskQuery.IIntegerColumnFilterQuery processModelId()
Prepares a where statement for the column
ProcessModelId
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
applicationId
TaskQuery.IIntegerColumnFilterQuery applicationId()
Prepares a where statement for the column
ApplicationId
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
startTaskSwitchEventId
TaskQuery.IIntegerColumnFilterQuery startTaskSwitchEventId()
Prepares a where statement for the column
StartTaskSwitchEventId
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
endTaskSwitchEventId
TaskQuery.IIntegerColumnFilterQuery endTaskSwitchEventId()
Prepares a where statement for the column
EndTaskSwitchEventId
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
taskStartId
TaskQuery.IIntegerColumnFilterQuery taskStartId()
Prepares a where statement for the column
TaskStartId
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
taskEndId
TaskQuery.IIntegerColumnFilterQuery taskEndId()
Prepares a where statement for the column
TaskEndId
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
workerUserId
TaskQuery.IIntegerColumnFilterQuery workerUserId()
Prepares a where statement for the column
WorkerUserId
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
workerUserName
TaskQuery.IStringColumnFilterQuery workerUserName()
Prepares a where statement for the column
WorkerUserName
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
workerUserDisplayName
TaskQuery.IStringColumnFilterQuery workerUserDisplayName()
Prepares a where statement for the column
WorkerUserDisplayName
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
workerSessionId
TaskQuery.IIntegerColumnFilterQuery workerSessionId()
Prepares a where statement for the column
WorkerSessionId
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
originalActivatorRoleId
TaskQuery.IIntegerColumnFilterQuery originalActivatorRoleId()
Prepares a where statement for the column
OriginalActivatorRoleId
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
originalActivatorUserId
TaskQuery.IIntegerColumnFilterQuery originalActivatorUserId()
Prepares a where statement for the column
OriginalActivatorUserId
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
originalActivatorName
TaskQuery.IStringColumnFilterQuery originalActivatorName()
Prepares a where statement for the column
OriginalActivatorName
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
originalActivatorDisplayName
TaskQuery.IStringColumnFilterQuery originalActivatorDisplayName()
Prepares a where statement for the column
OriginalActivatorDisplayName
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
expiryActivatorRoleId
TaskQuery.IIntegerColumnFilterQuery expiryActivatorRoleId()
Prepares a where statement for the column
ExpiryActivatorRoleId
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
expiryActivatorUserId
TaskQuery.IIntegerColumnFilterQuery expiryActivatorUserId()
Prepares a where statement for the column
ExpiryActivatorUserId
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
expiryActivatorName
TaskQuery.IStringColumnFilterQuery expiryActivatorName()
Prepares a where statement for the column
ExpiryActivatorName
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
expiryActivatorDisplayName
TaskQuery.IStringColumnFilterQuery expiryActivatorDisplayName()
Prepares a where statement for the column
ExpiryActivatorDisplayName
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
expiryPriority
TaskQuery.IWorkflowPriorityFilterQuery expiryPriority()
Prepares a where statement for the column
ExpiryPriority
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
expiryTimestamp
TaskQuery.IDateColumnFilterQuery expiryTimestamp()
Prepares a where statement for the column
ExpiryTimestamp
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
expiryTaskStartElementPid
TaskQuery.IStringColumnFilterQuery expiryTaskStartElementPid()
Prepares a where statement for the column
ExpiryTaskStartElementPid
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
isExpired
TaskQuery.IBooleanColumnFilterQuery isExpired()
Prepares a where statement for the column
IsExpired
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
expiredCreatorTaskId
TaskQuery.IIntegerColumnFilterQuery expiredCreatorTaskId()
Prepares a where statement for the column
ExpiredCreatorTaskId
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
timeoutedCreatorIntrmdtEventId
TaskQuery.IIntegerColumnFilterQuery timeoutedCreatorIntrmdtEventId()
Prepares a where statement for the column
TimeoutedCreatorIntrmdtEventId
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
delayTimestamp
TaskQuery.IDateColumnFilterQuery delayTimestamp()
Prepares a where statement for the column
DelayTimestamp
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
state
TaskQuery.ITaskStateFilterQuery state()
Prepares a where statement for the column
State
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
requestPath
TaskQuery.IStringColumnFilterQuery requestPath()
Prepares a where statement for the column
RequestPath
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
displayNameTemplate
TaskQuery.IStringColumnFilterQuery displayNameTemplate()
Prepares a where statement for the column
DisplayNameTemplate
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
name
TaskQuery.IStringColumnFilterQuery name()
Prepares a where statement for the column
Name
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
displayDescriptionTemplate
TaskQuery.IClobColumnFilterQuery displayDescriptionTemplate()
Prepares a where statement for the column
DisplayDescriptionTemplate
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
description
TaskQuery.IClobColumnFilterQuery description()
Prepares a where statement for the column
Description
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
originalPriority
TaskQuery.IWorkflowPriorityFilterQuery originalPriority()
Prepares a where statement for the column
OriginalPriority
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
startTimestamp
TaskQuery.IDateColumnFilterQuery startTimestamp()
Prepares a where statement for the column
StartTimestamp
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
endTimestamp
TaskQuery.IDateColumnFilterQuery endTimestamp()
Prepares a where statement for the column
EndTimestamp
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
businessCalendar
TaskQuery.IStringColumnFilterQuery businessCalendar()
Prepares a where statement for the column
BusinessCalendar
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
workingTime
TaskQuery.INumberColumnFilterQuery workingTime()
Prepares a where statement for the column
WorkingTime
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
businessRuntime
TaskQuery.INumberColumnFilterQuery businessRuntime()
Prepares a where statement for the column
BusinessRuntime
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
failedTimeoutTimestamp
TaskQuery.IDateColumnFilterQuery failedTimeoutTimestamp()
Prepares a where statement for the column
FailedTimeoutTimestamp
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
numberOfFailures
TaskQuery.IIntegerColumnFilterQuery numberOfFailures()
Prepares a where statement for the column
NumberOfFailures
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
numberOfResumes
TaskQuery.IIntegerColumnFilterQuery numberOfResumes()
Prepares a where statement for the column
NumberOfResumes
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
category
TaskQuery.IStringColumnFilterQuery category()
Prepares a where statement for the column
Category
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
isUpdatedOnStart
TaskQuery.IBooleanColumnFilterQuery isUpdatedOnStart()
Prepares a where statement for the column
IsUpdatedOnStart
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
isOffline
TaskQuery.IBooleanColumnFilterQuery isOffline()
Prepares a where statement for the column
IsOffline
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
priority
TaskQuery.IWorkflowPriorityFilterQuery priority()
Prepares a where statement for the column
Priority
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
activatorName
TaskQuery.IStringColumnFilterQuery activatorName()
Prepares a where statement for the column
ActivatorName
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
activatorDisplayName
TaskQuery.IStringColumnFilterQuery activatorDisplayName()
Prepares a where statement for the column
ActivatorDisplayName
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
activatorRoleId
TaskQuery.IIntegerColumnFilterQuery activatorRoleId()
Prepares a where statement for the column
ActivatorRoleId
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
activatorUserId
TaskQuery.IIntegerColumnFilterQuery activatorUserId()
Prepares a where statement for the column
ActivatorUserId
.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
-