Before you modify the source, compile and run the API samples as delivered. Doing so ensures that your development system is set up correctly and helps you to gain a basic understanding of workflow operations.
Compile the appropriate samples. For information about the samples supplied, see Process API Samples Overview. Here is the command-line syntax for running the MainSample application after it is compiled:
MainSample username password server_name:port_number/connectionPoint_name
wfDefinition_filename | wfDefinition_filename output_filename
As an example, the following command line shows how to run the unmodified samples as SysAdmin:
java -classpath .;%CLASSPATH% MainSample SysAdmin myserver:32771/myConnectionPoint
In this example, the connection point "myConnectionPoint" on the server myserver, port 32771. No workflow definition (*.pep) or output files are specified.
When the MainSample application runs without encountering errors, you receive output that is similar to the following example. (The output is shown 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.
The following files, which are created by running the unmodified samples, are located in the same directory as the MainSample.class file:
This file name is the default name for the output file. You can specify a different output file name as part of the MainSample application command line. The output file contains the text-formatted output of the MainSample application. The results of the application operation in the output file clearly indicate where and in what order the other classes are called. Additionally, the contents of the output file provide some indication of the type of information you can retrieve from each associated API.
This file contains all of the session-related information. The file logs all of the session-related calls. The information that is contained in the file is useful to resolve problems that involve connecting to and making calls to a Content Platform Engine server.