This class is a helper class for some of the other samples. This sample demonstrates how to implement reusable roster-specific methods, which can be accessed by other classes or applications.
The sample code assumes that you created a session and supplied a user name and password with appropriate access privileges.
For more information, see the comments in the sample source. The samples are supplied in the Developer samples section of the IBM® FileNet® P8 Platform publication library.
See also Running the API Samples.
General descriptions of the RosterHelper methods follow:
RosterHelper()
The RosterHelper constructor sets variables to point to the VWSession and sample Logger class object arguments.
displayProcessInformation
Displays the process information from the items in the default roster by using VWSession.getRoster to get the VWRoster object. VWRoster.createQuery is then used to get a VWRosterQuery object (based on VWFetchType.FETCH_TYPE_ROSTER_ELEMENT), VWRosterQuery.next gets each VWRosterElement object. VWRosterElement.fetchWorkObject is used to get the VWProcess object from the VWWorkObject object. VWProcess.fetchWorkflowHistory gets the workflow history, and log information in the VWProcess object is logged by using the sample Logger class.
displayRosterContents
Displays the contents of the "DefaultRoster" using VWSession.getRoster to get the VWRoster object, and the local methods displayRosterElements and displayWorkObjects to display the VWRosterElement and VWWorkObject objects.
displayRosterElements and displayWorkObjects
Displays the VWRosterElement or VWWorkObject objects in the specified VWRoster object by using VWRoster.createQuery to get a VWRosterQuery object (based on VWFetchType.FETCH_TYPE_ROSTER_ELEMENT or VWFetchType.FETCH_TYPE_WORKOBJECT). The sample Logger.displayWorkObjectInfo is used to display the VWWorkObject information. For VWRosterElement objects, VWRosterElement.getFieldNames and VWRosterElement.getFieldValue are used to display the system-defined field names and user-defined exposed field names. The sample Logger class is then used to log the data by using VWRosterElement.getWorkObjectNumber, VWRosterElement.getWorkObjectName, and VWRosterElement.getServerLocation.