Description:
------------
This sample illustrates the ability of the FTP Adapter to perform a mid-process synchronous read operation via an "invoke" activity. This sample illustrates the following adapter functionality:
1. File Adapter (Read Operation)
2. FTP Adapter (Synchronous Read operation)
a) Ability to specify the file name to be read during runtime
b) Retryable fault handling
c) Remote Archival
3. File Adapter (Write Operation)
4. Logical to Physical Mappings for directories
The process is initiated by the presence of a "trigger" file appearing in a local directory monitored by the inbound file adapter. The trigger file contains the name of the file to be read by the synchronous read operation. This file name is passed via headers to the adapter. This can be done using the "Adapters" tab in the "invoke" config. screen. This synchronous read file operation is performed against a remote directory on a FTP server. The result of the read is then transformed and written out to a local directory via the outbound file adapter.
The data files/schemas/transformation being used in this process correspond to those used in the 121.FileAdapter\FlatStructure sample.
Modelling the Synchronous Read Operation for the File/FTP Adapter:
------------------------------------------------------------------
1. Create a partner link called "SyncReadPL".
2. For the partner link created in step 1, create a wsdl via the ftp adapter wizard.
3. In step 4 of the wizard, select the operation type as "Put File". Rename the operation name to "SynchronousRead".
4. Browse and select the "address-csv.xsd" schema.
5. Make the following changes in the WSDL created as a result of finishing the ftp adapter wizard:
a) Add an element to the schema defined under the <types> element. This should be defined as:
<element name="empty"><complexType/></element>
If the schema has no target namespace then add one.
b) Add a message element called "Empty_msg" whose structure is defined by the element created in step 5(a). For example:
<message name="Empty_msg">
<part name="Empty" element="...:empty"/>
</message>
c) In the <operation> element rename the "input" tag to "output". Now the file adapter would be able to return native data files corrsponding to the schema defined in step 4.
d) Add an input message pointing to the empty message defined in step 5(b). For eg:
<input message="tns:Empty_msg"/>
6. Make the following changes in the configured properties for the interaction:
a) Change the value of the "InteractionSpec" parameter to
"oracle.tip.adapter.ftp.outbound.FTPReadInteractionSpec"
b) Change the name of the parameter "FileNamingConvention" to "FileName". Set the name of the file to be read.
c) Add a parameter called "deleteFile" with value set to "true". This signals the post-processing action is to delete the file after the read completes.
d) Add a parameter "LogicalArchiveDirectory" set to "archive".
e) Add a parameter "UseRemoteArchive" set to "true". This signals where archival should take place post-processing.
The parameters should now look like the following:
<jca:operation
FileType="ascii"
LogicalDirectory="syncReadDir"
LogicalArchiveDirectory="archive"
UseRemoteArchive="true"
InteractionSpec="oracle.tip.adapter.ftp.outbound.FTPReadInteractionSpec"
FileName="address.txt"
DeleteFile="true"
OpaqueSchema="false" >
</jca:operation>
7. Configure an "invoke" activity pointing to the partnerLink created above. Select the auto-create variables option for both input and output.
*Note* The above configuration can be done similarly for the file adapter.
To Compile and Deploy:
----------------------
1. Configure the host name, user, password etc for the FTP server in
<BPM_HOME>\integration\orabpel\system\appserver\oc4j\j2ee\home\application-deployments\default\FtpAdapter\oc4j-ra.xml.
2. For step 1 to take effect the bpel server would need to be restarted.
3. All paths used in this sample are logical paths. The mapping to physical locations are present in bpel.xml.
Ensure that they are correct. The directories on the ftp server need to be specified for the "syncReadDir"
and "archive" properties.
To test:
--------
1. Login to the BPEL Console.
2. Ftp address_csv.txt to the ftp server directory configured for the synchronous read.
3. Copy the trigger file (address.trg) into ..\SynchronousRead\triggerDir directory. This kicks of a process instance.
4. Check that an output file has been created in "outputDir" directory on the local file system. Also check that the processed file has been placed in the remote archive directory of the ftp server.
5. Ftp address_csv.txt to the ftp server directory configured for the synchronous read again. Shutdown the Ftp Server.
6. Copy the trigger file (address.trg) into ..\SynchronousRead\triggerDir again. This would result in an error. However we have configured the following in the associated partner link in bpel.xml:
<property name="retryMaxCount">5</property>
<property name="retryInterval">20</property>
This ensures that this operation is retryed 5 times with the prescribed wait interval. If during these retries the Ftp Server is restarted, then the read would occur successfully.
没有合适的资源?快使用搜索试试~ 我知道了~
JDeveloper指南22
共417个文件
xml:102个
wsdl:75个
class:48个
需积分: 0 16 下载量 47 浏览量
2008-06-24
20:49:46
上传
评论
收藏 683KB RAR 举报
温馨提示
JDeveloper 指南
资源详情
资源评论
资源推荐
收起资源包目录
JDeveloper指南22 (417个子文件)
InvoiceVerifyService.wsdl.bak 7KB
DynamicSyncRead.jpr.bak 6KB
FTPDebatching.jpr.bak 6KB
application.xml.bak 312B
BuyBook.bpel 22KB
BuyBook.bpel 22KB
OrderBokking.bpel 20KB
OrderApproval.bpel 15KB
BuyBook.bpel 13KB
BuyBook.bpel 11KB
BuyBook.bpel 11KB
FulfillOrder.bpel 7KB
POAcknowlege.bpel 6KB
BPELProcess1.bpel 6KB
TestBPEL.bpel 5KB
DynamicSyncRead.bpel 4KB
BatchOrderProcessing.bpel 4KB
FTPDebatching.bpel 4KB
BookStore1.bpel 4KB
BookStore2.bpel 4KB
BookRating.bpel 1KB
OrderApproval.cdi 4KB
TestBPEL.cdi 2KB
HelloService.cdi 495B
TestESB.cdi 455B
FulfillOrder.cdi 349B
_payload_2d_body.class 34KB
_Footer1.class 22KB
_Header1.class 15KB
_OrderApproval.class 12KB
XMLBeansSerializer.class 3KB
JAXBSerializer.class 3KB
VerifyPayAccountParameterFactory.class 2KB
VerifyPayAccountParameterFactory.class 2KB
VerifyPayAccountParameterFactory.class 2KB
VerifyPayAccountParameterFactory.class 2KB
VerifyPayAccountResultFactory.class 2KB
GetBillDocTypeResultFactory.class 2KB
BookDscTypeFactory.class 2KB
BookDscType.class 1KB
VerifyPayAccountParameter.class 1KB
VerifyPayAccountParameter.class 1KB
VerifyPayAccountParameter.class 1KB
VerifyPayAccountParameter.class 1KB
GetBillDocTypeResult.class 1KB
VerifyPayAccountResult.class 1KB
PubRatingBean.class 1KB
HelloWorld2ResponseElement.class 747B
HelloWorldResponseElement.class 744B
HelloWorldElement.class 705B
HelloWorldService.class 667B
HelloService.class 652B
Hello.class 633B
Hello.class 633B
Orders.class 563B
Orderitems.class 476B
HelloServicePortType3.class 399B
HelloServicePortType1.class 399B
HelloServicePortType2.class 399B
HelloServicePortType4.class 399B
HelloServicePortType.class 397B
IVerifyPayAccountParameter.class 395B
IVerifyPayAccountParameter.class 393B
IVerifyPayAccountParameter.class 392B
IVerifyPayAccountParameter.class 390B
HelloWorld2Element.class 383B
HelloSerive.class 379B
HelloService.class 377B
HelloService.class 377B
IGetBillDocTypeResult.class 374B
IBookDscType.class 369B
IVerifyPayAccountResult.class 312B
PubRatingHome.class 291B
PubRating.class 249B
build.cmd 252B
headerfooter.css 4KB
txt.csv 9B
WebServices.deploy 4KB
WebServices.deploy 4KB
webapp.deploy 4KB
.dummy 0B
.dummy 0B
Tutorials-HelloService-WS.ear 19KB
TestESB.esb 193B
ProcessOrder.esb 193B
Project2.esb 193B
Project1.esb 192B
ESBTest.esb 192B
DefaultSystem_HelloWorldService.esbsvc 2KB
DefaultSystem_APXIIMPT.esbsvc 2KB
DefaultSystem_Select.esbsvc 2KB
TestGroup_ESBTest.esbsvc 2KB
TestGroup_HRService.esbsvc 2KB
TestGroup_Service1.esbsvc 2KB
ProcessOrder_OrderRouter.esbsvc 797B
TestGroup.esbsys 557B
ProcessOrder.esbsys 227B
bpel_OrderApproval_1.0.jar 434KB
bpel_FulfillOrder_1.0.jar 70KB
bpel_OrderBokking_1.0.jar 39KB
共 417 条
- 1
- 2
- 3
- 4
- 5
Connection_Linux
- 粉丝: 4
- 资源: 49
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0