This 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 you created a session and supplied a user name and password with appropriate access privileges.
Refer to the comments in the sample source for further information. The samples are located on the P8 Documentation CD or ESD image in:
ecm_help\developer_help\process_java_api\Developer Files\samples\api
See also Running the API Samples.
General descriptions of the RosterHelper methods follow:
The RosterHelper constructor sets variables pointing to the VWSession and sample Logger class object arguments.
Displays the process information from the items in the default roster 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 and VWRosterElement.fetchProcess are 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 using the sample Logger class.
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.
Displays the VWRosterElement or VWWorkObject objects in the specified VWRoster object 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 using VWRosterElement.getWorkObjectNumber, VWRosterElement.getWorkObjectName, and VWRosterElement.getServerLocation.