The MainSample application is a top-level application that demonstrates how to call the runtime operations in the other sample files. The MainSample application represents one way of developing a simple application to work with the APIs.
This sample application does not use the Swing components that are found in the Step Processors and Launch Step Processor samples or the LogViewer sample. Instead, the sample relies on the command-line input and the standard console for output.
Run the sample by entering a command similar to the following example:
java OperationsSample username password server_name:port_number/connectionPoint_name
wfDefinition_filename | wfDefinition_filename queue_name output_filename
MainSample initializes a logger object and a session object, which are used throughout the workflow process. MainSample instantiates the session object as an instance of the SessionHelper class and uses it to log on to a session. These two objects are then passed to sampleClass, which is an instance of the MainSample class.
The sampleClass object creates and launches a workflow definition, completes the steps, and writes history information to log files. To do so, the sampleClass object configures the workflow session with an instance of the SysConfigSample class. SysConfigSample creates a queue, an exposed field, and an index. To view details of workflow design and launch, see the WFDefinitionSample and LaunchSample classes, which are used by this sample.
The outer class sampleClass then invokes the runtime operations, which are performed by the following sample classes: