Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Stardust/Knowledge Base/API/JavaAPICookbook/QueryingWorklists"
< Stardust | Knowledge Base
(→Introduction) |
(→Introduction) |
||
Line 23: | Line 23: | ||
} | } | ||
+ | |||
+ | </source> | ||
Scenario 2: | Scenario 2: | ||
This API usage will provide you information of a use case where you need to find the number of AIs currently in the worklist of a particular user. | This API usage will provide you information of a use case where you need to find the number of AIs currently in the worklist of a particular user. | ||
− | |||
− | |||
− |
Revision as of 08:50, 5 February 2014
Introduction
This article will provide examples/usage of different Query API's. It is assumed that you are familiar with the modeling the processes with Stardust.
Scenario 1:
This API usage will provide you the User and User group related information, precisely which users belong to which user groups.
UserQuery userQuery = new UserQuery(); UserGroupQuery userGroupQuery = new UserGroupQuery(); UserGroups usergroups = queryService.getAllUserGroups(userGroupQuery); for (UserGroup userGroup : usergroups) { System.out.println("userGroup****** " + userGroup.getId()); UserQuery userQuery1 = userQuery.findAllForUserGroup(userGroup.getId()); Users existingusers = queryService.getAllUsers(userQuery1); System.out.println("existingusers.getSize****** " + existingusers.getSize()); for (User user : existingusers) { System.out.println("user" + user.getId()); } }
Scenario 2:
This API usage will provide you information of a use case where you need to find the number of AIs currently in the worklist of a particular user.