Running the API Samples

To ensure that your development system is set up correctly and to gain a basic understanding of workflow operations, you should first compile and run the API samples as delivered (without modifying the source).

Compile the appropriate sample(s). See Process API Samples Overview for a description of the samples supplied. Once compiled, the command line syntax for the running the MainSample application is as follows:

    MainSample username password server_name:port_number/connectionPoint_name 
        wfDefinition_filename | wfDefinition_filename output_filename

where, for the required parameters, username is an existing Process Engine user ID, password the password for the specified user, server_ name is the Application Engine host (defaults to the local machine), port_number is the port number assigned for Java™ Remote Method Invocation (RMI) communications (defaults to 32771), and connectionPoint_name is the connection point to use.

and where, for the optional parameters, wfDefinition_filename is an existing workflow definition (.pep) file, and output_filename is the file in which to store the results of the application.

As an example, the command line to run the unmodified samples as SysAdmin, with the connection point "myConnectionPoint" on the server myserver, port 32771, without now workflow definition (*.pep) or output files specified, would be similar to the following:

 
    java -classpath .;%CLASSPATH% MainSample SysAdmin myserver:32771/myConnectionPoint

When the MainSample application runs without encountering errors, you will receive output similar to the following (in the same command window from which you ran the MainSample application):

Writing messages to file: MainSample.out
~~ Starting the main sample.

~ Starting SysConfigSample execution.
~ SysConfigSample execution complete.

~ Starting WFDefinitionSample execution.
~ WFDefinitionSample execution complete.

~ Starting LaunchSample execution.
~ LaunchSample execution complete.

~ Starting RosterSample execution.
~ RosterSample execution complete.

~ Starting StepProcessorSample execution.
~ StepProcessorSample execution complete.

~ Starting QueueSample execution.
~ QueueSample execution complete.

~ Starting MilestoneSample execution.
~ MilestoneSample execution complete.

~ Starting OperationsSample execution.
~ OperationsSample execution complete.

~ Starting SystemStepSample execution.
~ Launching Generated Workflow
~ SystemStepSample execution complete.

~ Starting StepProcessorSample execution.
~ StepProcessorSample execution complete.

~ Starting ProcessSample execution.
~ ProcessSample execution complete.

~ Starting StepProcessorSample execution.
~ StepProcessorSample execution complete.

~ Starting LogSample execution.
~ LogSample execution complete.

~~ MainSample execution complete.

Note: This output represents the typical console output results for the first time the MainSample application is run. If the MainSample application is run a second time, without modification, you will receive notification stating the required queues already exist.

The following files, created by running the unmodified samples, are located in the same directory as the MainSample.class file.: