IBM FileNet P8, Version 5.2.1            

WorkPerformerSample

This sample demonstrates how to retrieve, modify, and complete a step by using the VWWorkObject class.

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

    java WorkPerformerSample 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 WorkPerformerSample methods follow:

main()

The main method uses common techniques for validating and defaulting argument values. The default value for the log output file is QueueSample.out. It 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.

WorkPerformerSample()

The WorkPerformerSample constructor uses the sample QueueHelper.getQueue for the following activities:
  • Gets the VWQueue object (specified as the argument to the constructor)
  • Starts a process thread for WorkPerformerSample
  • Invokes the local run method to run this process

processQueue()

Retrieves the VWWorkObject objects from the queue by using VWQueue.createQuery (based on the type VWFetchType.FETCH_TYPE_WORKOBJECT), and iterates through the queue (by using VWQueue.next) calling the local processWork method to process the work objects.

processWork()

Processes a work object that is obtained from the query of a queue by using VWWorkObject.doLock to lock the VWWorkObject object for modification, VWWorkObject.getFieldValue to get the field information, VWWorkObject.setFieldValue to set a field value, and VWWorkObject.doDispatch to complete the work object.



Last updated: March 2016
workperformersample.htm

© Copyright IBM Corporation 2016.