Interface CaseQuery.IFilterableColumns
-
- All Known Subinterfaces:
CaseQuery.IFilterQuery
- All Known Implementing Classes:
CaseQuery.FilterQuery
- Enclosing class:
- CaseQuery
public static interface CaseQuery.IFilterableColumns
Provides filter functionality forICase
Example:
Corresponds to SQL:CaseQuery.businessCases().where().customVarCharField1().isEqual("Hello World").and().customDecimalField2().isGreaterThan(15.3);
SELECT * FROM IWA_IWA_Case 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 CaseQuery.IStringColumnFilterQuery
additionalProperty(String key)
Deprecated.use
insteadcustomField()
.textField(key)
CaseQuery.IIntegerColumnFilterQuery
applicationId()
Prepares a where statement for the columnApplicationId
.
Must be followed by a call to a condition method.CaseQuery.IStringColumnFilterQuery
businessCalendar()
Prepares a where statement for the columnBusinessCalendar
.
Must be followed by a call to a condition method.CaseQuery.IIntegerColumnFilterQuery
businessCaseId()
Prepares a where statement for the columnBusinessCaseId
.
Must be followed by a call to a condition method.CaseQuery.INumberColumnFilterQuery
businessRuntime()
Prepares a where statement for the columnBusinessRuntime
.
Must be followed by a call to a condition method.CaseQuery.FilterLink
canWorkOn(ISecurityMember member)
Filters all cases where the security member (user or role) can work on at least one task.CaseQuery.FilterLink
canWorkOn(IUserToken userToken)
Filters all cases where the user token can work on at least one task.CaseQuery.IIntegerColumnFilterQuery
caseId()
Prepares a where statement for the columnCaseId
.
Must be followed by a call to a condition method.CaseQuery.IStringColumnFilterQuery
category()
Prepares a where statement for the columnCategory
.
Must be followed by a call to a condition method.CaseQuery.IIntegerColumnFilterQuery
creatorTaskId()
Prepares a where statement for the columnCreatorTaskId
.
Must be followed by a call to a condition method.CaseQuery.IStringColumnFilterQuery
creatorUserDisplayName()
Prepares a where statement for the columnCreatorUserDisplayName
.
Must be followed by a call to a condition method.CaseQuery.IIntegerColumnFilterQuery
creatorUserId()
Prepares a where statement for the columnCreatorUserId
.
Must be followed by a call to a condition method.CaseQuery.IStringColumnFilterQuery
creatorUserName()
Prepares a where statement for the columnCreatorUserName
.
Must be followed by a call to a condition method.CaseQuery.FilterLink
currentUserHasStarted()
Filters all cases the user of the current session has started.CaseQuery.FilterLink
currentUserIsInvolved()
Filters all cases the current session user is involved in.CaseQuery.FilterLink
currentUserIsOwner()
Filters all cases the current user is owner of.CaseQuery.FilterLink
currentUserOrHisRolesAreInvolved()
Filters all cases the current user or any of his roles are involved in.CaseQuery.ICustomFieldFilterQuery
customField()
Prepares a where statement for a custom field.
Must be followed by a call to a field value type.CaseQuery.IClobColumnFilterQuery
description()
Prepares a where statement for the columnDescription
.
Must be followed by a call to a condition method.CaseQuery.IClobColumnFilterQuery
displayDescriptionTemplate()
Prepares a where statement for the columnDisplayDescriptionTemplate
.
Must be followed by a call to a condition method.CaseQuery.IStringColumnFilterQuery
displayNameTemplate()
Prepares a where statement for the columnDisplayNameTemplate
.
Must be followed by a call to a condition method.CaseQuery.IDateColumnFilterQuery
endTimestamp()
Prepares a where statement for the columnEndTimestamp
.
Must be followed by a call to a condition method.CaseQuery.IIntegerColumnFilterQuery
environmentId()
Prepares a where statement for the columnEnvironmentId
.
Must be followed by a call to a condition method.CaseQuery.FilterLink
hasStarted(ISecurityMember member)
Filters all cases the given security member has started.CaseQuery.FilterLink
hasStarted(String memberName, String applicationName)
Filters all cases where the security member with given member name (user or role) in the given application has started.CaseQuery.FilterLink
isBusinessCase()
Selects only cases that arebusiness cases
.
For performance reasons you should preferCaseQuery.businessCases()
to restrict your query to business cases.
Example:
Get all business casesCaseQuery.FilterLink
isInvolved(ISecurityMember member)
Filters all cases 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)
.CaseQuery.FilterLink
isInvolved(String memberName, String applicationName)
Filters all cases where the security member with given member name (user or role) in the given application is involved in.
Compared to the methodisInvolved(ISecurityMember)
, this method evaluates the correspondingISecurityMember
on query execution.CaseQuery.FilterLink
isNotBusinessCase()
Selects only cases that are notbusiness cases
(e.g.CaseQuery.FilterLink
isOwner(ISecurityMember member)
Filters all cases the security member is owner of.CaseQuery.FilterLink
isOwner(String memberName, String applicationName)
Filters all cases the member of the application is owner of.CaseQuery.IStringColumnFilterQuery
name()
Prepares a where statement for the columnName
.
Must be followed by a call to a condition method.CaseQuery.FilterQuery
not(CaseQuery 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.CaseQuery.IStringColumnFilterQuery
ownerName()
Prepares a where statement for the columnOwnerName
.
Must be followed by a call to a condition method.CaseQuery.IIntegerColumnFilterQuery
ownerRoleId()
Prepares a where statement for the columnOwnerRoleId
.
Must be followed by a call to a condition method.CaseQuery.IIntegerColumnFilterQuery
ownerUserId()
Prepares a where statement for the columnOwnerUserId
.
Must be followed by a call to a condition method.CaseQuery.IWorkflowPriorityFilterQuery
priority()
Prepares a where statement for the columnPriority
.
Must be followed by a call to a condition method.CaseQuery.IIntegerColumnFilterQuery
processModelId()
Prepares a where statement for the columnProcessModelId
.
Must be followed by a call to a condition method.CaseQuery.FilterLink
roleCanWorkOn(IRole role)
Filters all cases where the role can work on at least one task.CaseQuery.FilterLink
roleIsInvolved(IRole role)
Filters all cases the role is involved in.CaseQuery.FilterLink
roleIsInvolved(String roleName, String applicationName)
Filters all cases where the role with given name in the given application is involved in.CaseQuery.IStringColumnFilterQuery
stage()
Prepares a where statement for the columnStage
.
Must be followed by a call to a condition method.CaseQuery.IDateColumnFilterQuery
startTimestamp()
Prepares a where statement for the columnStartTimestamp
.
Must be followed by a call to a condition method.CaseQuery.ICaseStateFilterQuery
state()
Prepares a where statement for the columnState
.
Must be followed by a call to a condition method.CaseQuery.FilterLink
tasks(TaskQuery taskQuery)
Adds an expression to the where clause that selects those cases that have at least one matching task for the giventaskQuery
.CaseQuery.IIntegerColumnFilterQuery
taskStartId()
Prepares a where statement for the columnTaskStartId
.
Must be followed by a call to a condition method.CaseQuery.FilterLink
triggeredByTasks(TaskQuery taskQuery)
Adds an expression to the where clause that selects those cases that have been created with a Trigger process element by tasks which matches the giventaskQuery
.CaseQuery.FilterLink
userCanWorkOn(IUser user)
Filters all cases where the user can work on at least one task.CaseQuery.FilterLink
userIsInvolved(IUser user)
Filters all cases the user is involved in.CaseQuery.FilterLink
userIsInvolved(String userName, String applicationName)
Filters all cases where the user with given name in the given application is involved in.CaseQuery.FilterLink
userOrHisRolesAreInvolved(IUser user)
Filters all cases the user or any of his roles are involved in.CaseQuery.FilterLink
userOrHisRolesAreInvolved(String userName, String applicationName)
Filters all cases the user or any of his roles are involved in.CaseQuery.INumberColumnFilterQuery
workingTime()
Prepares a where statement for the columnWorkingTime
.
Must be followed by a call to a condition method.
-
-
-
Method Detail
-
isBusinessCase
CaseQuery.FilterLink isBusinessCase()
Selects only cases that arebusiness cases
.
For performance reasons you should preferCaseQuery.businessCases()
to restrict your query to business cases.
Example:
Get all business casesimport ch.ivyteam.ivy.workflow.ICase; import ch.ivyteam.ivy.workflow.query.CaseQuery; CaseQuery query = CaseQuery.create().where().isBusinessCase(); List<ICase> businessCases = ivy.wf.getCaseQueryExecutor().getResults(query);
- Returns:
- the query for further composition
- See Also:
CaseQuery.businessCases()
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
isNotBusinessCase
CaseQuery.FilterLink isNotBusinessCase()
Selects only cases that are notbusiness cases
(e.g. sub cases).
For performance reasons you should preferCaseQuery.subCases()
to restrict your query to sub cases (technical cases).
Example:
Get all sub casesimport ch.ivyteam.ivy.workflow.ICase; import ch.ivyteam.ivy.workflow.query.CaseQuery; CaseQuery query = CaseQuery.create().where().isNotBusinessCase(); List<ICase> subCases = ivy.wf.getCaseQueryExecutor().getResults(query);
- Returns:
- the query for further composition
- See Also:
CaseQuery.subCases()
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
tasks
CaseQuery.FilterLink tasks(TaskQuery taskQuery)
Adds an expression to the where clause that selects those cases that have at least one matching task for the given
taskQuery
.This method considers only the where clause of the given
taskQuery
. All other parts are ignored.Example:
Get all cases that have tasks in state PARKEDimport ch.ivyteam.ivy.workflow.ICase; import ch.ivyteam.ivy.workflow.TaskState; import ch.ivyteam.ivy.workflow.query.TaskQuery; import ch.ivyteam.ivy.workflow.query.CaseQuery; CaseQuery query = CaseQuery.businessCases().where().tasks(TaskQuery.create().where().state().isEqual(TaskState.PARKED)); List<ICase> casesWithParkedTasks = ivy.wf.getCaseQueryExecutor().getResults(query);
- Parameters:
taskQuery
- task query with where clause to filter the tasks- Returns:
- the where query builder, for further building
- Throws:
IllegalArgumentException
- If the given taskQuery is null- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
triggeredByTasks
CaseQuery.FilterLink triggeredByTasks(TaskQuery taskQuery)
Adds an expression to the where clause that selects those cases that have been created with a Trigger process element by tasks which matches the given
taskQuery
.Cases can be triggered by tasks by using the Trigger process element.
This method considers only the where clause of the given
taskQuery
. All other parts are ignored.Example:
Get all cases that were created by tasks with kind code "Order"import ch.ivyteam.ivy.workflow.ICase; import ch.ivyteam.ivy.workflow.TaskState; import ch.ivyteam.ivy.workflow.query.TaskQuery; import ch.ivyteam.ivy.workflow.query.CaseQuery; CaseQuery query = CaseQuery.businessCases().where().triggeredByTasks(TaskQuery.create().where().kindCode().isEqual("Order")); List<ICase> casesCreatedByTasksOfProcessOrder = ivy.wf.getCaseQueryExecutor().getResults(query);
- Parameters:
taskQuery
- task query with where clause to filter the tasks- Returns:
- the where query builder, for further building
- Throws:
IllegalArgumentException
- If the given taskQuery is null- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
isInvolved
CaseQuery.FilterLink isInvolved(ISecurityMember member)
Filters all cases 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:
TaskQuery.IFilterableColumns.userIsInvolved(ch.ivyteam.ivy.security.IUser)
,TaskQuery.IFilterableColumns.userIsInvolved(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
CaseQuery.FilterLink isInvolved(String memberName, String applicationName)
Filters all cases where the security member with given member name (user or role) in the given application is involved in.
Compared to the methodisInvolved(ISecurityMember)
, this method evaluates the correspondingISecurityMember
on query execution.Example:
Get all tasks where the current user or the user 'Joe' is involved in:import ch.ivyteam.ivy.workflow.ICase; import ch.ivyteam.ivy.workflow.query.CaseQuery; CaseQuery query = CaseQuery.businessCases() .where().isInvolved("#Joe", "MyApp") // note: to convert a user name to a member name a '#' is added as prefix .or().isInvolved(ivy.session.getSessionUser().getMemberName(), "MyApp"); List<ICase> cases = ivy.wf.getCaseQueryExecutor().getResults(query);
- Parameters:
memberName
- e.g. a role "TopManagementRole", e.g. a user must be prefixed with # "#Joe"applicationName
- e.g. "MyApplication"- Returns:
- the query for further composition
- See Also:
TaskQuery.IFilterableColumns.userIsInvolved(ch.ivyteam.ivy.security.IUser)
,TaskQuery.IFilterableColumns.userIsInvolved(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.
-
canWorkOn
CaseQuery.FilterLink canWorkOn(ISecurityMember member)
Filters all cases where the security member (user or role) can work on at least one task.- Parameters:
member
- the security member (user or role)- Returns:
- the query for further composition
- Throws:
IllegalArgumentException
- If the given member is null- Since:
- 6.7
- See Also:
canWorkOn(ch.ivyteam.ivy.security.IUserToken)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
canWorkOn
CaseQuery.FilterLink canWorkOn(IUserToken userToken)
Filters all cases where the user token can work on at least one task.- Parameters:
userToken
- the user token- Returns:
- the query for further composition
- Throws:
IllegalArgumentException
- If the given member is null- Since:
- 6.7
- See Also:
canWorkOn(ch.ivyteam.ivy.security.ISecurityMember)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
roleIsInvolved
CaseQuery.FilterLink roleIsInvolved(IRole role)
Filters all cases the role is involved in. A role is involved in a case if the role is involved in at least one task of the case.
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.CaseQuery; import ch.ivyteam.ivy.workflow.ITask; import ch.ivyteam.ivy.security.IRole; IRole role = ivy.session.getSecurityContext().findRole("Admin"); CaseQuery query = CaseQuery.businessCases().where().roleIsInvolved(role); List<ICase> userInvolvedCases = ivy.wf.getCaseQueryExecutor().getResults(query);
- Parameters:
role
-- Returns:
- the query for further composition
- Throws:
IllegalArgumentException
- If the given role is null- See Also:
TaskQuery.IFilterableColumns.userIsInvolved(ch.ivyteam.ivy.security.IUser)
,TaskQuery.IFilterableColumns.userIsInvolved(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.
-
roleIsInvolved
CaseQuery.FilterLink roleIsInvolved(String roleName, String applicationName)
Filters all cases 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 Also:
TaskQuery.IFilterableColumns.userIsInvolved(ch.ivyteam.ivy.security.IUser)
,TaskQuery.IFilterableColumns.userIsInvolved(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.
-
userIsInvolved
CaseQuery.FilterLink userIsInvolved(IUser user)
Filters all cases the user is involved in. A user is involved in a case if
- the user is the creator of the case
the
user is involved
in at least one task of the case
The 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.CaseQuery; import ch.ivyteam.ivy.workflow.ICase; import ch.ivyteam.ivy.security.IUser; IUser user = ivy.session.getSessionUser(); CaseQuery query = CaseQuery.businessCases().where().userIsInvolved(user); List<ICase> userInvolvedCases = ivy.wf.getCaseQueryExecutor().getResults(query);
- Parameters:
user
-- Returns:
- the query for further composition
- Throws:
IllegalArgumentException
- If the given user is null- See Also:
TaskQuery.IFilterableColumns.userIsInvolved(ch.ivyteam.ivy.security.IUser)
,TaskQuery.IFilterableColumns.userIsInvolved(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.
-
userIsInvolved
CaseQuery.FilterLink userIsInvolved(String userName, String applicationName)
Filters all cases 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, appName)
- Parameters:
userName
- e.g. "Joe"applicationName
-- Returns:
- the query for further composition
- See Also:
TaskQuery.IFilterableColumns.userIsInvolved(ch.ivyteam.ivy.security.IUser)
,TaskQuery.IFilterableColumns.userIsInvolved(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
CaseQuery.FilterLink userOrHisRolesAreInvolved(IUser user)
Filters all cases the 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 case androleIsInvolved(ch.ivyteam.ivy.security.IRole)
for when a role is involved in a case.Example:
import ch.ivyteam.ivy.workflow.query.CaseQuery; import ch.ivyteam.ivy.workflow.ICase; import IUser; IUser user = ivy.session.getSessionUser(); CaseQuery query = CaseQuery.businessCases().where().userOrHisRolesAreInvolved(user); List<ICase> userInvolvedCases = ivy.wf.getCaseQueryExecutor().getResults(query);
- 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()
,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)
,roleIsInvolved(String, String)
,TaskQuery.IFilterableColumns.userOrHisRolesAreInvolved(ch.ivyteam.ivy.security.IUser)
,TaskQuery.IFilterableColumns.userOrHisRolesAreInvolved(String, String)
,TaskQuery.IFilterableColumns.currentUserOrHisRolesAreInvolved()
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
userOrHisRolesAreInvolved
CaseQuery.FilterLink userOrHisRolesAreInvolved(String userName, String applicationName)
Filters all cases the 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 case androleIsInvolved(ch.ivyteam.ivy.security.IRole)
for when a role is involved in a case.Example:
import ch.ivyteam.ivy.workflow.query.CaseQuery; import ch.ivyteam.ivy.workflow.ICase; import IUser; CaseQuery query = CaseQuery.businessCases().where().userOrHisRolesAreInvolved("Joe", "CRM"); List<ICase> userInvolvedCases = ivy.wf.getCaseQueryExecutor().getResults(query);
- 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)
,currentUserOrHisRolesAreInvolved()
,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)
,roleIsInvolved(String, String)
,TaskQuery.IFilterableColumns.userOrHisRolesAreInvolved(String, String)
,TaskQuery.IFilterableColumns.userOrHisRolesAreInvolved(ch.ivyteam.ivy.security.IUser)
,TaskQuery.IFilterableColumns.currentUserOrHisRolesAreInvolved()
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
currentUserIsInvolved
CaseQuery.FilterLink currentUserIsInvolved()
Filters all cases the current session user is involved in. The current session user is involved in a case if
- the current session user is the creator of the case
the
current session user is involved
in at least one task of the case
The current session user is involved in a task if- the current session user could work on the task
- the current session user is working at the task right now
- the current session user has completed the task
- the current session 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 current session user can work on the task but it is
delayed
Example:
import ch.ivyteam.ivy.workflow.query.CaseQuery; import ch.ivyteam.ivy.workflow.ICase; CaseQuery query = CaseQuery.businessCases().where().currentUserIsInvolved(); List<ICase> sessionInvolvedCases = ivy.wf.getCaseQueryExecutor().getResults(query);
- Returns:
- the query for further composition
- Throws:
IllegalStateException
- If there is no current session available- See Also:
TaskQuery.IFilterableColumns.userIsInvolved(ch.ivyteam.ivy.security.IUser)
,TaskQuery.IFilterableColumns.userIsInvolved(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
CaseQuery.FilterLink currentUserOrHisRolesAreInvolved()
Filters all cases 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 case androleIsInvolved(ch.ivyteam.ivy.security.IRole)
for when a role is involved in a case.Example:
import ch.ivyteam.ivy.workflow.query.CaseQuery; import ch.ivyteam.ivy.workflow.ICase; import IUser; IUser user = ivy.session.getSessionUser(); CaseQuery query = CaseQuery.businessCases().where().currentUserOrHisRolesAreInvolved(); List<ICase> userInvolvedCases = ivy.wf.getCaseQueryExecutor().getResults(query);
- 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)
,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)
,roleIsInvolved(String, String)
,TaskQuery.IFilterableColumns.currentUserOrHisRolesAreInvolved()
,TaskQuery.IFilterableColumns.userOrHisRolesAreInvolved(ch.ivyteam.ivy.security.IUser)
,TaskQuery.IFilterableColumns.userOrHisRolesAreInvolved(String, String)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
userCanWorkOn
CaseQuery.FilterLink userCanWorkOn(IUser user)
Filters all cases where the user can work on at least one task.- Parameters:
user
-- Returns:
- the query for further composition
- Throws:
IllegalArgumentException
- If the given member is null- Since:
- 6.7
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
roleCanWorkOn
CaseQuery.FilterLink roleCanWorkOn(IRole role)
Filters all cases where the role can work on at least one task.- Parameters:
role
-- Returns:
- the query for further composition
- Throws:
IllegalArgumentException
- If the given member is null- Since:
- 6.7
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
hasStarted
CaseQuery.FilterLink hasStarted(ISecurityMember member)
Filters all cases the given security member has started. A role is considered to have started a case if the given role is allowed to start a new case at the same process start the case was started on.
Example:
import ch.ivyteam.ivy.workflow.query.CaseQuery; import ch.ivyteam.ivy.workflow.ICase; import ch.ivyteam.ivy.security.IUser; IUser user = ivy.wf.getSecurityContext().findUser("Somebody"); CaseQuery query = CaseQuery.businessCases().where().hasStarted(user); List<ICase> casesStartedByUser = ivy.wf.getCaseQueryExecutor().getResults(query);
- Parameters:
member
-- Returns:
- the query for further composition
- Throws:
IllegalArgumentException
- If the given member is null- See Also:
currentUserHasStarted()
,hasStarted(String, String)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
hasStarted
CaseQuery.FilterLink hasStarted(String memberName, String applicationName)
Filters all cases where the security member with given member name (user or role) in the given application has started.Compared to the method
hasStarted(ISecurityMember)
, this method evaluates the correspondingISecurityMember
on query execution.Get all tasks where the current user or the user 'Joe' has started:
import ch.ivyteam.ivy.workflow.ICase; import ch.ivyteam.ivy.workflow.query.CaseQuery; CaseQuery query = CaseQuery.businessCases() .where().hasStarted("#Joe", "MyApp") // note: to convert a user name to a member name a '#' is added as prefix .or().hasStarted(ivy.session.getSessionUser().getMemberName(), "MyApp"); List<ICase> cases = ivy.wf.getCaseQueryExecutor().getResults(query);
- Parameters:
memberName
- e.g. a role "TopManagementRole", e.g. a user must be prefixed with # "#Joe"applicationName
- e.g. "MyApplication"- Returns:
- the query for further composition
- See Also:
currentUserHasStarted()
,hasStarted(ch.ivyteam.ivy.security.ISecurityMember)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
currentUserHasStarted
CaseQuery.FilterLink currentUserHasStarted()
Filters all cases the user of the current session has started.
Example:
import ch.ivyteam.ivy.workflow.query.CaseQuery; import ch.ivyteam.ivy.workflow.ICase; CaseQuery query = CaseQuery.businessCases().where().currentUserHasStarted(); List<ICase> casesStartedByUser = ivy.wf.getCaseQueryExecutor().getResults(query);
- Returns:
- the query for further composition
- Throws:
IllegalStateException
- If there is no current session available- See Also:
hasStarted(ch.ivyteam.ivy.security.ISecurityMember)
,hasStarted(String, String)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
isOwner
CaseQuery.FilterLink isOwner(ISecurityMember member)
Filters all cases the security member is owner of.
Example:
import ch.ivyteam.ivy.workflow.query.CaseQuery; import ch.ivyteam.ivy.workflow.ICase; CaseQuery query = CaseQuery.businessCases().where().isOwner(ivy.session.getSessionUser()); List<ICase> casesCurrentUserIsOwnerOf = ivy.wf.getCaseQueryExecutor().getResults(query);
- Parameters:
member
- can not be null- Returns:
- the query for further composition
- See Also:
ICase.setOwner(ch.ivyteam.ivy.security.ISecurityMember)
,ICase.getOwner()
,isOwner(String, String)
,currentUserIsOwner()
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
currentUserIsOwner
CaseQuery.FilterLink currentUserIsOwner()
Filters all cases the current user is owner of.
Example:
import ch.ivyteam.ivy.workflow.query.CaseQuery; import ch.ivyteam.ivy.workflow.ICase; CaseQuery query = CaseQuery.businessCases().where().currentUserIsOwner(); List<ICase> casesCurrentUserIsOwnerOf = ivy.wf.getCaseQueryExecutor().getResults(query);
- Returns:
- the query for further composition
- See Also:
ICase.setOwner(ch.ivyteam.ivy.security.ISecurityMember)
,ICase.getOwner()
,isOwner(ch.ivyteam.ivy.security.ISecurityMember)
,isOwner(String, String)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
isOwner
CaseQuery.FilterLink isOwner(String memberName, String applicationName)
Filters all cases the member of the application is owner of.
Example:
import ch.ivyteam.ivy.workflow.query.CaseQuery; import ch.ivyteam.ivy.workflow.ICase; CaseQuery query = CaseQuery.businessCases().where().isOwner("#Joe", "myApplication"); // note: to convert a user name to a member name a '#' is added as prefix List<ICase> casesCurrentUserIsOwnerOf = ivy.wf.getCaseQueryExecutor().getResults(query);
- Parameters:
memberName
- e.g. a role "TopManagementRole", e.g. a user must be prefixed with # "#Joe"applicationName
- e.g. "MyApplication"- Returns:
- the query for further composition
- See Also:
ICase.setOwner(ch.ivyteam.ivy.security.ISecurityMember)
,ICase.getOwner()
,isOwner(ch.ivyteam.ivy.security.ISecurityMember)
,currentUserIsOwner()
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
customField
CaseQuery.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.ICase; import ch.ivyteam.ivy.workflow.query.CaseQuery; CaseQuery query = CaseQuery.businessCases().where().customField().stringField("myCustomField").isEqualTo("valueToFind")"; List<ICase> casesWithMatchingField = ivy.wf.getCaseQueryExecutor().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 CaseQuery.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
CaseQuery.FilterQuery not(CaseQuery 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:CaseQuery subQuery = CaseQuery.businessCases().where() .customVarCharField1().equals("a").or() .customVarCharField2().equals("b") CaseQuery query = CaseQuery.businessCases().where() .not(subQuery)
SELECT * FROM IWA_IWA_Case 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.
-
caseId
CaseQuery.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
CaseQuery.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.
-
applicationId
CaseQuery.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.
-
processModelId
CaseQuery.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.
-
taskStartId
CaseQuery.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.
-
creatorUserId
CaseQuery.IIntegerColumnFilterQuery creatorUserId()
Prepares a where statement for the column
CreatorUserId
.
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.
-
creatorUserName
CaseQuery.IStringColumnFilterQuery creatorUserName()
Prepares a where statement for the column
CreatorUserName
.
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.
-
creatorUserDisplayName
CaseQuery.IStringColumnFilterQuery creatorUserDisplayName()
Prepares a where statement for the column
CreatorUserDisplayName
.
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.
-
creatorTaskId
CaseQuery.IIntegerColumnFilterQuery creatorTaskId()
Prepares a where statement for the column
CreatorTaskId
.
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.
-
environmentId
CaseQuery.IIntegerColumnFilterQuery environmentId()
Prepares a where statement for the column
EnvironmentId
.
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
CaseQuery.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
CaseQuery.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
CaseQuery.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
CaseQuery.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.
-
startTimestamp
CaseQuery.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
CaseQuery.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
CaseQuery.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
CaseQuery.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
CaseQuery.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.
-
state
CaseQuery.ICaseStateFilterQuery 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.
-
priority
CaseQuery.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.
-
stage
CaseQuery.IStringColumnFilterQuery stage()
Prepares a where statement for the column
Stage
.
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.
-
ownerRoleId
CaseQuery.IIntegerColumnFilterQuery ownerRoleId()
Prepares a where statement for the column
OwnerRoleId
.
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.
-
ownerUserId
CaseQuery.IIntegerColumnFilterQuery ownerUserId()
Prepares a where statement for the column
OwnerUserId
.
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.
-
ownerName
CaseQuery.IStringColumnFilterQuery ownerName()
Prepares a where statement for the column
OwnerName
.
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
CaseQuery.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.
-
-