BPEL定義のシミュレーションは、以下の手順で行います。
図E.3 BPEL定義シミュレーション実行の流れ
ビジネス・プロセス実行環境の設定
BPEL定義のシミュレーションを行う場合、ビジネス・プロセス実行機能を配備したIJServerクラスタの設定を変更します。JavaVMのオプションを以下のように指定します。
-Dcom.fujitsu.interstage.isi.bpel.loglevel=3
IJServerクラスタの設定変更は、Interstage Java EE管理コンソール、またはasadminコマンドを使用して行います。詳細はInterstage Application Serverの”Interstage Java EE管理コンソールヘルプ”、または”Java EE運用ガイド”の”Java EE運用コマンド”の”asadmin”を参照してください。
Webアプリケーションの折り返し定義とは、Invoke要素がWebアプリケーションを呼び出すことなく、あたかも呼び出したように振舞うための定義です。Webアプリケーションの折り返し定義は、Webアプリケーションごとに作成します。本定義を作成していない場合は、本来のWebアプリケーションの呼び出しとなります。isibeplgenturnback コマンドを使用して、WSDL定義から折り返し定義のひな型を作成します。
isibeplgenturnback コマンドについては、“ISI リファレンス”の“BPEL機能”の“セットアップコマンド”の“isibpelgenturnback”を参照してください。
コマンド実行すると、カレントディレクトリに折り返し定義を出力します。折り返し定義のファイル名は、WebアプリケーションのサービスエンドポイントのURLをURLエンコードした文字列に、”@”、オペレーション名、および”.xml”を連結したものです。WSDL定義に複数のオペレーションが定義されている場合には、オペレーションごとに折り返し定義のファイルが生成されます。Webアプリケーションが一方向型(one-way)のサービスの場合、折り返し定義のファイルは空ファイルとなります。
isibpelgenturnback C:\WebService001.wsdl Retrieving document at 'C:\WebService001.wsdl'. Generating a file for 'execute' operation in 'http://localhost/NOPService001/services/NOPService001'. Generated the file of the name 'C:\http%3A%2F%2Flocalhost%2FNOPService001%2Fservices%2FNOPService001@execute.xml'.
isibpelgenturnback /tmp/WebService001.wsdl Retrieving document at '/tmp/WebService001.wsdl'. Generating a file for 'execute' operation in 'http://localhost/NOPService001/services/NOPService001'. Generated the file of the name '/tmp/http%3A%2F%2Flocalhost%2FNOPService001%2Fservices%2FNOPService001@execute.xml'.
折り返し定義の内容は、SOAPメッセージそのものです。ひな型では値が設定されていないので、テキストエディタなどで値を設定してください。WSDL定義と、生成した折り返し定義ファイルの例を示します。
<?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions targetNamespace="http://sample" xmlns:impl="http://sample" xmlns:intf="http://sample" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <!--WSDL created by Interstage Web Service version: 1.2 (r6010:6011) Built on Jun 04, 2009 (02:22:19 JST)--> <wsdl:types> <schema elementFormDefault="qualified" targetNamespace="http://sample" xmlns="http://www.w3.org/2001/XMLSchema"> <element name="execute"> <complexType> <sequence> <element name="in0" nillable="true" type="xsd:string"/> </sequence> </complexType> </element> <element name="executeResponse"> <complexType> <sequence> <element name="executeReturn" nillable="true" type="xsd:string"/> </sequence> </complexType> </element> </schema> </wsdl:types> <wsdl:message name="executeRequest"> <wsdl:part element="impl:execute" name="parameters"/> </wsdl:message> <wsdl:message name="executeResponse"> <wsdl:part element="impl:executeResponse" name="parameters"/> </wsdl:message> <wsdl:portType name="NOPService001"> <wsdl:operation name="execute"> <wsdl:input message="impl:executeRequest" name="executeRequest"/> <wsdl:output message="impl:executeResponse" name="executeResponse"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="NOPService001PortSoapBinding" type="impl:NOPService001"> <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="execute"> <wsdlsoap:operation soapAction="execute"/> <wsdl:input name="executeRequest"> <wsdlsoap:body use="literal"/> </wsdl:input> <wsdl:output name="executeResponse"> <wsdlsoap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="NOPService001Service"> <wsdl:port binding="impl:NOPService001PortSoapBinding" name="NOPService001Port"> <wsdlsoap:address location="http://localhost/NOPService001/services/NOPService001"/> </wsdl:port> </wsdl:service> </wsdl:definitions>
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body> <executeResponse xmlns="http://sample"> <executeReturn></executeReturn> </executeResponse> </soapenv:Body> </soapenv:Envelope>
ビジネス・プロセス実行環境への配備は、以下の手順で行います。
以下の位置に折り返し定義をコピーしてください。
[Java EE共通ディレクトリ]\domains\interstage\applications\j2ee-modules\ode\WEB-INF\simulation
[Java EE共通ディレクトリ]/domains/interstage/applications/j2ee-modules/ode/WEB-INF/simulation
コピーしたファイルは、強化セキュリティモードの場合は、他のInterstage運用グループのユーザーが操作できるよう以下のとおり変更します。
所属するグループをInterstage運用グループに変更
chgrp isgroup http%3A%2F%2Flocalhost%2FNOPService001%2Fservices%2FNOPService001.xml
上記は以下の場合の例です。
折り返し定義のファイル名が、http%3A%2F%2Flocalhost%2FNOPService001%2Fservices%2FNOPService001.xmlの場合。
Interstage運用グループがisgroupの場合。
Webアプリケーションの折り返し定義の内容を頻繁に更新しテストを行う場合には、以下の設定を行うことを推奨します。
Interstage運用グループの書込み権限を付加
chmod g+w http%3A%2F%2Flocalhost%2FNOPService001%2Fservices%2FNOPService001.xml
上記は以下の場合の例です。
折り返し定義のファイル名が、http%3A%2F%2Flocalhost%2FNOPService001%2Fservices%2FNOPService001.xmlの場合。
シミュレーションの実行は、BPEL起動アプリケーションの実行で行います。
シミュレーションを実行後、折り返し定義が不要となったときには、配備先の折り返し定義のファイルを削除してください。削除後、必要ならばビジネス・プロセス実行環境を再起動してください。
シミュレーション結果は、ログとして出力します。 “BPEL機能のアプリケーション開発”の“BPEL定義の開発”の“ビジネス・プロセス実行機能のログ設定”の”シミュレーションログ”を参照してください。
ポイント
Webアプリケーションの折り返し定義ファイルを配備したときは、ログ設定をシミュレーションログに指定してください。シミュレーションログ以外の値を指定している場合、ビジネス・プロセス実行基盤の動作が異常となる場合があります。以下の動作となります。
IJServerクラスタの起動時
イベントログまたはシステムログに以下のメッセージが出力されます。
WARN:WSBPEL-47218: Simulation file was found when the loglevel is not 3.
BPEL定義を起動し、折り返し定義に対応するInvokeを実行した時
BPEL定義の実行は中断されます。
イベントログまたはシステムログに以下のメッセージが出力されます。
WARN:WSBPEL-47219: Simulation file was found when the loglevel is not 3: BPEL Process Name={%1}%2 ItemName=%3 FileName=%4
詳細は、“ISI メッセージ集”を参照してください。
ログファイル(isibpel.log)に以下のようなログが出力されます。ログの項目で開始/終了を出力する箇所に“###WARNING_SIMULATION_IS_IGNORE###”が出力されます。
2011-01-14 19:08:08.852 FSP_INTS-ESI_WSBPEL-SV INFO 00001 BPEL001 0000000000000000000 ----- Invoke Invoke01 ###WARNING_SIMULATION_IS_IGNORE### -----