Oracle® Fusion Middleware
User's Guide for Technology Adapters
11g Release 1 (11.1.1)
E10231-02
A few weeks ago, I encountered this class not found error on "oracle.tip.adapter.file.outbound.FileReadInteractionSpec" while using JCA file adapter in SOA 11.1.1.5.
It turned out that Oracle just decided to move their class around a bit :(
I fixed my issue by editing the .jca file:
<interaction-spec className="oracle.tip.adapter.file.outbound.FileIoInteractionSpec">
<property name="SourcePhysicalDirectory" value="foo1"/>
<property name="SourceFileName" value="bar1"/>
<property name="TargetPhysicalDirectory" value="foo2"/>
<property name="TargetFileName" value="bar2"/>
<property name="Type" value="COPY"/>
</interaction-spec>
Look closely, you can see they change the class to "oracle.tip.adapter.file.outbound.FileIoInteractionSpec".
Additionally, you can choose which of these parameters are used as defined here, or overwritten dynamically by the BPEL variables. The following example shows how to replace 3 parameters at run time, but using "TargetDirectory" from jca, although jca internally references it as "TargetPhysicalDirectory" (I guess that's called undocummented Oracle feature :)
<invoke name="InvokeCopyFile" bpelx:invokeAsDetail="no"
inputVariable="Invoke_FileMove_InputVariable"
outputVariable="Invoke_FileMove_OutputVariable"
partnerLink="JcaCopyFile" portType="ns2:FileMove_ptt"
operation="FileMove">
<bpelx:inputProperty name="jca.file.SourceDirectory"
variable="sourceDirectory"/>
<bpelx:inputProperty name="jca.file.SourceFileName"
variable="sourceFileName"/>
<!-- ### do not assign target directory, pick up from jca directly, so it can be ###
<bpelx:inputProperty name="jca.file.TargetDirectory"
variable="targetDirectory"/>
-->
<bpelx:inputProperty name="jca.file.TargetFileName"
variable="targetFileName"/>
</invoke>
2013-02-20 update:
with jdev 11.1.1.6 and bpel 2.0, here is the syntax:
<invoke name="InvokeMoveOperation"
partnerLink="moveFile2Error" portType="ns3:FileMove_ptt"
operation="FileMove"
inputVariable="InvokeMoveOperation_FileMove_InputVariable"
outputVariable="InvokeMoveOperation_FileMove_OutputVariable"
bpelx:invokeAsDetail="no">
<bpelx:toProperties>
<bpelx:toProperty name="jca.file.SourceDirectory" variable="sourceDirectory"/>
<bpelx:toProperty name="jca.file.SourceFileName" variable="filename"/>
<bpelx:toProperty name="jca.file.TargetDirectory" variable="targetDirectory"/>
<bpelx:toProperty name="jca.file.TargetFileName" variable="filename"/>
</bpelx:toProperties>
</invoke>
Is it possible to override the Type at runtime or need to create a separate adapter for each MOVE / COPY / DELETE action?
ReplyDelete