IBM FileNet P8, Version 5.2.1            

OperationsSample

This stand-alone sample demonstrates how to use the API classes to manage queue operations.

Run the sample by entering a command similar to the following example:
    java OperationsSample 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 OperationsSample methods follow:

main()

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

OperationsSample()

The OperationsSample constructor initializes local variables for the sample OperationsHelper and QueueHelper objects, then does the following actions:

  1. Get the queue object for the specified queue name argument (by using VWSession.getQueue).
  2. Add an operation (by using VWQueue.fetchQueueDefinition to get a VWQueueDefinition object, then use VWQueueDefinition.createOperation and VWOperationDefinition.createParameter to add the new operation and specify parameters).
  3. Update the system configuration queue definition (by using VWSession.fetchSystemConfiguration to get the VWSystemConfiguration object, VWSystemConfiguration.updateQueueDefinition to update the queue definition, and VWSystemConfiguration.commit to commit the changes).
  4. Get the list of operations defined on this queue (by using VWQueue.fetchOperationNames).
  5. Get the VWOperationDefinition objects (by using the sample OperationsHelper.getOperationDefinition) and print the information for each VWOperationDefinition object (by using the sample OperationsHelper.printOperationDetails).


Last updated: March 2016
operationssample.htm

© Copyright IBM Corporation 2016.