MFT SOA Integration

This post describes about how to Integrate Oracle Managed File Transfer and SOA



A SOA target in Oracle Managed File Transfer corresponds to an MFT service binding component in SOA or simply we can depict above scenario as



Even though above diagram depicts the flow is from MFT to SOA but while developing we will first create SOA composite and will give the SOA composite endpoint URI in the MFT target. So, high level steps are


  • In Jdeveloper Create SOA project with BPEL in components section and MFT Adapter in service Section. Deploy the SOA project and get the endpoint URI.
  • In MFT Create Source as file and create target as SOA by providing the Endpoint URI 

Create BPEL with define services later


Create MFT Adapter at service section




Click finish and join MFT adapter and BPEL




In the Bpel create Receive activity wire it to the MFTService  and set input variable Check the check box for  Create Instance.





Create reply activity



Add assign activity


Deploy the project MFT_SOA_Integration


Copy the endpoint URI we will use this when creating MFT target


Login to MFT Console (http://host:port/mftconsole)


Go to Design tab to create the MFT Artifacts(Source,target,Transfer)

create source



We can also give other properties but as of now we will leave other values to default


Now create target by providing the SOA Endpoint URI


In the advance options keep message type as text



Create Transfer


Add the already created source and target in the transfer


After adding source and target to transfer


In the Source add content filter as Sample*.txt which means that we are going to read files of above pattern


In the target side set delivery preference, as inline which means until the file is of 1048576 bytes data in the file will be sent as payload. If file size is more than that file will be moved as reference


Now save and Deploy



Keep the file in the location (D:\DEMO\MFT) with some text.
Now go to Monitoring tab you can see our deployed Transfer



Go to Transfer Instances and instances





If we click the “id” of instance we can see the flow



Now go to BPEL we can see the instance is created for the soa project


Open the flow instance


In the above scenario we are getting file content in the payload .If the file size is more than 104850 bytes we can get the file as reference.




Now create file size more than 104850 and resubmit the transfer in the monitoring tab new instance is created with file in reference




MFT FAN-OUT USE CASE SAMPLE



Oracle Managed File Transfer can transfer files on its own using embedded FTP and sFTP servers and the file systems to which it has access. In this use case, we will transfer same file to multiple targets.
To Design the above use case, we need to create three Artifacts in the Designer page of the Oracle Managed File Transfer Console. Three artifacts are source, Target, Transfer

Source: It defines the origin of file location of the file from which MFT will pick
Targets: It is the destination location where the MFT put the file.
Transfer: This artifacts links one source to one or more targets. 


Login to mft console open design tab and create source and select type as file because we will read file from local folder (where the MFT is running)


Create two targets with names FAN_OUT_Target1 and FAN_OUT_Target2



Create a transfer with name MFT_FAN_OUT


In the transfer, we will add the source and targets we already created

        
        Add Source




          Add target







Transfer has been created with one source(FAN_OUT_Source) and Two targets (FAN_OUT_Target1, FAN_OUT_TARGET2)


In the source, we will restrict the files it will read by providing the value in the content filter as below. Here we are restricting to read file with name Sample*.txt



Save the changes and Deploy the MFT_FAN_OUT transfer.We can see the deployed transfer in the Monitoring tab deployments section.



Now place the file in the source directory same file has been moved to two targets 

After file has been moved to target directory file is not deleted from source directory. We have the options in the Source to delete and archive the file after the transfer. 


Files Impacted with MDS IP Address Change




We had a situation where we need to move MDS to new machine with no change in password or service name. File that needs to be changed after Meta data database is moved to New machine are

$Oracle_Home/user_projects/domains/base_domain/config/jdbc

SOALocalTxDataSource-jdbc.xml
SOADataSource-jdbc.xml
opss-datasource-jdbc.xml
opss-auditview-jdbc.xml
opss-audit-jdbc.xml
mds-soa-jdbc.xml
mds-owsm-jdbc.xml
mds-ess-jdbc.xml
ess-oracle-xa-jdbc.xml
ess-oracle-jdbc.xml
ess-oracle-int-jdbc.xml
EDNLocalTxDataSource-jdbc.xml
EDNDataSource-jdbc.xml

In all the above files change the localhost to new host name (IP Address). Based on your domain configuration you may have more files.



Along with these files we also need to change in


 $Oracle_Home/user_projects/domains/base_domain/config/fmwconfig
jps-config-jse.xml (In this file we need to change at two places)
jps-config.xml