Search This Blog

New Line Character in BPEL - SOA

New Line Character in BPEL - SOA :


My Requirement to create new line between two words.

Example :



Input    :  Krishna Moorthi
Output :  Krishna
              Moorthi

create BPEL variable varNewLine  and assign Values as "
"

Now use "Krishna"+ $varNewLine  + "Moorthi".

:-) :-)

File / FTP Adapter SOA - COPY / MOVE / DELETE Operation

File Adapter Move / Copy Operation :


File Adapter or FTP Adapter in 11g won't direct support in GUI mode.

In Some scenarios we need to perform move or copy   from one folder to another folder. Following code will support

FileMove.jca

MOVE Operation 
=================================================================
<adapter-config name="FileMove" adapter="File Adapter"
                wsdlLocation="FileMovet.wsdl"
                xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
    <connection-factory location="eis/FileAdapter"/>
    <endpoint-interaction portType="FileMove_ptt" operation="FileMove">
        <interaction-spec className="oracle.tip.adapter.file.outbound.FileIoInteractionSpec">
            <property name="SourcePhysicalDirectory" value="D:\Krishna"/>
            <property name="SourceFileName" value="HelloWorld.txt"/>
            <property name="TargetPhysicalDirectory" value="D:\Moorthi"/>
            <property name="TargetFileName" value="HelloWorldNew.txt"/>
            <property name="Type" value="MOVE"/>
        </interaction-spec>

    </endpoint-interaction>
</adapter-config>
=================================================================

COPY Operation 
=================================================================
<adapter-config name="FileMove" adapter="File Adapter"
                wsdlLocation="FileMovet.wsdl"
                xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
    <connection-factory location="eis/FileAdapter"/>
    <endpoint-interaction portType="FileMove_ptt" operation="FileMove">
        <interaction-spec className="oracle.tip.adapter.file.outbound.FileIoInteractionSpec">
            <property name="SourcePhysicalDirectory" value="D:\Krishna"/>
            <property name="SourceFileName" value="HelloWorld.txt"/>
            <property name="TargetPhysicalDirectory" value="D:\Moorthi"/>
            <property name="TargetFileName" value="HelloWorldNew.txt"/>
            <property name="Type" value="COPY"/>
        </interaction-spec>

    </endpoint-interaction>
</adapter-config>
=================================================================


DELETE Operation 
=================================================================
<adapter-config name="FileMove" adapter="File Adapter"
                wsdlLocation="FileMovet.wsdl"
                xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
    <connection-factory location="eis/FileAdapter"/>
    <endpoint-interaction portType="FileMove_ptt" operation="FileMove">
        <interaction-spec className="oracle.tip.adapter.file.outbound.FileIoInteractionSpec">
            <property name="TargetPhysicalDirectory" value="D:\Moorthi"/>
            <property name="TargetFileName" value="HelloWorldNew.txt"/>
            <property name="Type" value="DELETE"/>
        </interaction-spec>

    </endpoint-interaction>
</adapter-config>
=================================================================


Invoke Change in BPEL :


 <invoke name="Invoke1" inputVariable="Invoke1_FileMove_InputVariable"
                outputVariable="Invoke1_FileMove_OutputVariable"
                partnerLink="FileAdptMoveTest" portType="ns1:FileMove_ptt"
                operation="FileMove" bpelx:invokeAsDetail="no">
<bpelx:inputProperty name="jca.file.SourceDirectory" variable="sourceDirectory"/>
<bpelx:inputProperty name="jca.file.SourceFileName" variable="sourceFileName"/>
<bpelx:inputProperty name="jca.file.TargetDirectory" variable="targetDirectory"/>
<bpelx:inputProperty name="jca.file.TargetFileName" variable="targetFileName"/>
</invoke>



control the speed of JMS Consumer

There is an activation agent which can be used to control the speed at which the adapter posts messages to BPEL 


in 11G the setting would be configured as a binding property in the composite.xml the corresponding (inbound) <service>, e.g. 


<service name="Inbound">
<interface.wsdl interface="http://xmlns.oracle.com/pcbpel/demo1#wsdl.interface(SampleInbound_PortType)"/>
<binding.jca config="Dequeue_jms.jca">
<property name="minimumDelayBetweenMessages">1000</property> ------ this is the property that is being implemented.
</binding.jca>
</service> 



This setting ensures that there at least will be 1000 milliseconds delay between the two consecutive messages being posted to the BPEL process.


Note: this setting pertains only to BPEL, and only to one adapter polling thread. If multiple adapter polling threads (e.g. multiple JMS dequeuer threads) have been configured, this setting will control the speed of each thread, not the combined speed.


By implementing the above mentioned solution, I would like to highlight one point though, you need to keep in mind that the delay will happen all the time regardless of heavy or light load.