IBM FileNet P8, バージョン 5.2.1            

API サンプルの実行

ソースを変更する前に、提供された状態のまま API サンプルをコンパイルして実行してください。そうすることで、開発システムが正しくセットアップされていることを確認でき、ワークフロー・オペレーションの基本的な理解が得られます。

該当するサンプルをコンパイルします。提供されたサンプルの詳細については、Process API サンプルの概要を参照してください。以下は、コンパイル後の MainSample アプリケーションを実行するためのコマンド行構文です。

    MainSample username password server_name:port_number/connectionPoint_name 
        wfDefinition_filename | wfDefinition_filename output_filename
必須パラメーターは以下のとおりです。
  • username は既存の Content Platform Engine ユーザー ID です。
  • password は指定されたユーザーのパスワードです。
  • server_nameApplication Engine ホスト (デフォルトはローカル・マシン) です。
  • port_numberContent Platform Engine Manager ポート (デフォルトは 32771) です。
  • connectionPoint_name は使用する接続ポイントです。
オプション・パラメーターは以下のとおりです。
  • wfDefinition_filename は既存のワークフロー定義 (.pep) ファイルです。
  • output_filename はアプリケーションの結果を格納するファイルです。

例として、以下のコマンド行は未変更のサンプルを SysAdmin として実行する方法を示します。

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

この例の接続ポイントは、サーバー myserver、ポート 32771 の「myConnectionPoint」です。ワークフロー定義 (*.pep) ファイルも出力ファイルも指定されていません。

MainSample アプリケーションがエラーなしで実行されると、以下の例のような出力が表示されます。 (出力は、MainSample アプリケーションを実行したのと同じコマンド・ウィンドウに表示されます。)

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.
注: この出力は、MainSample アプリケーションを最初に実行したときの一般的なコンソール出力結果を表しています。変更しないまま、MainSample アプリケーションを 2 回目に実行した場合、必要なキューは存在するという通知が表示されます。

以下のファイルは、変更していないサンプルを実行することによって作成され、MainSample.class ファイルと同じディレクトリーに配置されます。



最終更新日: 2016 年 3 月
compile_the_samples.htm

© Copyright IBM Corp. 2016.