IBM FileNet P8, Version 5.2.1            

MilestoneSample

This stand-alone sample demonstrates how to log the work object number and user information for locked work objects.

Run the sample by entering a command similar to the following example:

    java MilestoneSample username password server_name:port_number/connectionPoint_name 
        queue_name output_filename

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.

Methods

General descriptions of the MilestoneSample methods follow:

main()

The main method uses common techniques for validating and defaulting argument values. The default value for the log output file is MilestoneSample.out. Main() constructs and passes VWSession and sample Logger class objects to the constructor. Main() handles the login and logoff for the session with the login() and logoff() methods of the sample SessionHelper class. It also provides workflow logging with an instance of the sample Logger class.

MilestoneSample()

The MilestoneSample constructor iteratively gets the VWQueue objects for the session (by using VWSession.getQueue), and gets the number of queues found (by using VWQueue.fetchCount). For each VWQueue object, the following actions are performed:

  1. Get a VWQueueQuery object for the queue object (by using VWQueue.createQuery for the type VWFetchType.FETCH_TYPE_QUEUE_ELEMENT).
  2. Retrieve the first queue element (by using VWQueueQuery.next).
  3. Obtain the workflow name for the queue element (by using VWQueueElement.getWorkflowName).
  4. Log the workflow name (by using the sample Logger.log).
  5. Get and display the milestone definitions (VWMilestoneDefinition objects) for the queue element (by using the sample MilestoneHelper).


Last updated: October 2015
milestonesample.htm

© Copyright IBM Corporation 2015.