Wednesday Dec 17, 2014

Customizing Oracle MFT File Rename Java Callout

Review and Use Case

So now that you have all digested the previous Overview blog in this Customizing MFT series, you fully understand the components of Custom Actions(callouts) and have built the Newline Conversion sample from the Oracle MFT Documentation section Processing Transfers with Custom Callouts you are ready to build another real world scenario that implements a file rename inside of the MFT engine. I say inside because that differentiates it from the use case where a file is written to the file system or remote FTP server and then renamed after it is delivered. This use case is a file comes in from a Source that has extra characters in the name such a time-stamp that you wish to remove using standard Java regular expressions. I.E. order20151011.xml would be renamed to order.xml or customer12345.csv is renamed to customer.csv.

Components

XML Config File

As you know, each of the callout actions needs an xml config file that defines the interface. Below is the config file for this sample that defines things like action name, library name, help text and parameters that are configured in the designer. This sample is used in Target Pre-Processing and takes 2 parameters, SourceExp and ReplaceWith. Details for configuring callout config files were covered in the last blog entry so go reread that if this isn't clear, To proceed, just download the file from the link below or copy the bolded text into your favorite text editor and save the file RenameRegexp.xml it into a new folder named RenameRegexp.

RenameRegexp.xml

<?xml version="1.0" encoding="UTF-8"?>
  <mft:Callouts xmlns:mft="http://xmlns.oracle.com/mft"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.oracle.com/mft callout.xsd ">
    <mft:Callout description="Rename Regexp"
      helpText="File Rename with Regular Expressions"
      groupName="Target-pre" timeout="300"
      implementationClass="com.oracle.callout.sample.RenameRegexp"
      libraryName="RenameRegexp.jar" name="RenameRegexp">
    <mft:Parameter description="SourceExp" mandatory="true"
      helpText="Source Regular Expression Pattern"
      name="SourceExp" parameterType="string"/>
    <mft:Parameter description="ReplaceWith" mandatory="true"
      helpText="ReplaceWith Regular Expression Pattern"
      name="ReplaceWith" parameterType="string"/>
   </mft:Callout>
</mft:Callouts>

Java Source Code

As you know, there are different API's for Source, Pre and Post Target callouts. This example illustrates the Pre Target interface that is not modifying the file contents like the Newline Conversion example did. To review this topic visit the MFT Documentation page titled Java Code Requirements and Tips. The java class receives 2 strings at runtime for regular expression substitution that are configured in the Designer Transfer artifact. The  new and interesting code being used here to get and set the new file name are the methods PluginContext.getTransformedInputFileName and PluginOutput.setNewFileName. The regular expression substitution is implemented with an old reliable single line of code using String.replaceAll. Below are a code snippets illustrating this.

   	PluginOutput out = new PluginOutput();
	oldfname = pluginContext.getTransformedInputFileName() ;
 	newfname = getNewname(oldfname, SourceExp, ReplaceWith);
	if (newfname != null && newfname.length() > 0) { 
		out.setNewFileName(newfname);
	}
   ... 
   public String getNewname(String oldfname, String srcexp, String repexp) {
	return oldfname.replaceAll(srcexp, repexp);

   }

Download the full RenameRegexp.java file and place it in a newly created child directory of your RenameRegexp folder called com/oracle/callout/sample.

Compile, Package and Install

This section assumes the following environment variables have been set.

  $MW_HOME where your MFT WebLogic is installed

  $JAVA_HOME where your JDK 1.7 is installed

Compile

From the command prompt, run the following command. The command is split to multiple lines.

  $ $JAVA_HOME/bin/javac

   -classpath $MW_HOME/mft/modules/oracle.mft_12.1.3.0/core-12.1.1.0.jar

   com/oracle/callout/sample/RenameRegexp.java

Package

Now use the JDK "jar" command to build a java jar file as shown below. The cmd is split to multiple lines.

  $ $JAVA_HOME/bin/jar

     cvf RenameRegexp.jar com/oracle/callout/sample/RenameRegexp.class

Install

This involves 2 steps, first copy the jar file to the MFT server callout folder and another to import the config xml file. Use the copy command shown below. Note the domain name below may be different in your environment.

  $ cp RenameRegexp.jar $MW_HOME/user_projects/domains/base_domain/mft/callouts/

NOTE: If you have an MFT export of a file transfer that uses this callout, you can import it and skip this WLST step.

Next, run a WLST command to import the RenameRegexp.xml file

  $ $MW_HOME/mft/common/bin/wlst.sh

Connect to your WebLogic Server using your host, port and admin credentials

  connect("weblogic", "<PASSWORD>, "t3://localhost:7901")

Enter the WLST CreateCallout command substituting the location of your files.

  createCallouts('/home/oracle/mft/callouts/RenameRegexp/RenameRegexp.xml')

Do a listCallouts() command to verify it worked.

  listCallouts()

Enter the exit() command to quit WLST.

  exit()

Deploy a Transfer and Test

This section requires some knowledge of Java Regular Expressions. This implementation uses the java String.replaceAll method. It is recommended to use an external tool test test your expressions in advance. There are many available but www.regexplanet.com has a nice online tool for testing your expressions before entering them into the MFT Designer. For this example, you will use following parameter values to rename a file order20151011.xml to order.xml.

  SourceExpr:  ([A-z])\d+(.*)

  ReplaceWith: $1$2

Design and Deploy

At this point, the RenameRegexp callout action will appear in your Transfers Target Pre-Processing UI and is ready to use in any Transfer. Go to the Designer and build a Transfer "Rename Transfer" with a Source and Target of "Rename FTP Source" and "Rename FTP Target". The FTP Embedded Source  uses a location of "/rename/in" and the FTP Remote Target uses a location of "/rename/out". The Transfer should look like the following screenshot.


You need to configure the Pre-Processing Action in the Transfer with the below parameters as shown in the screens below.

  SourceExpr:  ([A-z])\d+(.*)

  ReplaceWith: $1$2

Now Save and Deploy this Transfer as you would any other Oracle MFT Transfer.

Test

To test use any FTP Client to connect to the MFT embedded FTP server and copying a file named  "order20151011.xml" to the "/rename/in" folder. When completed, go to the MFT Monitoring console and view the transfer report as shown below.


Congratulations, you have implemented a very handy, configurable and reusable rename custom callout that you can use in any Transfer Pre-Target Processor Action and it only took 76 lines of code! A completed export of this Transfer is also  available for download

Monday Nov 24, 2014

Customizing Oracle MFT with Java Overview

This is the first in a series of how to customize Oracle Managed File Transfer (MFT) using java callouts. It is assumed you have a working knowledge of Oracle MFT and can build, deploy and test basic transfers with Oracle MFT. We'll start by reviewing the instructions in the documentation section Processing Transfers with Custom Callouts then discuss terminology, types, invocation order and use cases for Sources, Pre-Targt and Post-Target.
[Read More]

Tuesday Oct 07, 2014

Reliving Oracle Open World 2014

The most exciting Oracle Open World conference to date, has me revelling in being a part of a ginormous, efficient, and intelligent Oracle army that is breaking shackles and helping organizations move onwards to the next frontier of innovation. An unbridled Larry Ellison in his new role as CTO showed hands-on demos to move on-prem to the cloud. Roadmap sessions revealed far more than powerpoint decks with exciting live demos of new technology with Integration Cloud Service, Mobile Cloud Service, API Management, and business driven event management for Fast Data. Outstanding customer and partner presentations, had a packed audience of more than 60,000 people sitting on the edge of their seats, grasping the immensity and reality of cloud, mobile, and the internet of things.

Oracle seems committed to the Cloud more than ever and it seems a matter of when rather than if a customer will move to the cloud. And across the board the repeat message that resonated was that moving to the cloud was going to be possible with a few pushes of a button rather than hiring experts and rewriting code. Some highlights of the Service Integration sessions at Oracle Open World 2014:

  •  72 total sessions for Oracle SOA Suite, including both Oracle-led, and external submissions across Cloud, Mobile, Fast Data, Internet of Things, and B2B.
  •  Unprecedented number of customers and partners speaking in our sessions: including Canon Imaging Systems, Ricoh Americas, Larsen and Toubro, Engineers Australia, Bristlecone, Ascension Health, Farmers Insurance, JDSU, Keste, Agilent, KPMG, Children’s Hospital of Philadelphia, LA County Department of Health, and many more. 
  • 10 live product demos; 7 hands-on labs, including Cloud, Fast Data, Managed File Transfer and several more.
  • Cloud and Mobile had spotlight this year with extensive coverage over all other solution areas including Managed File Transfer, B2B, Fast Data, and Internet of Things.

Here are some previous posts that summarize the sessions that were covered on Oracle SOA Suite this year:

Overall Oracle Open World 2014 was a mindblowing event with outstanding teamwork and exceptional delivery on every front from the customer, partner and employee base of the organization. I am personally very grateful to have been part of this amazing show. You can watch the Oracle SOA Focus On for uploads of speaker decks. And continue to learn more about Oracle SOA Suite here: oracle.com/soa

Thursday Sep 11, 2014

Taking Enterprise File Exchange to the Next Level with Oracle Managed File Transfer 12c


Managed File Transfer(MFT) is a popular method for simplifying business-to-business communication scenarios, especially within industries that are moving away from legacy electronic data interchange systems. With Oracle SOA Suite 12c, Oracle recently announced Oracle Managed File Transfer 12c. You can now access all resources related to Oracle Managed File Transfer 12c over here: Learn How to Fully Integrate Your File Transfer Solution This resource kit includes white papers, datasheets, podcasts from our experts, customer stories, and more.

In addition, the following sessions at Oracle Open World 2014 will help you take a deep dive into MFT:

 Processing Large Files with Oracle Managed File Transfer and Oracle SOA Suite [CON7826]

            Presenters: Pandurang Ranjalkar, Larsen & Toubro Infotech Limited & Dave Berry, Senior Manager, Oracle 

Abstract: Files are as prevalent in today’s enterprise integration solutions as they have ever been. Using event patterns that require no polling, files can be delivered with pass-by-reference, which minimizes the memory footprint in your integration processes. This session explores various use cases for solving the age-old problem of processing large files, including using standard Oracle Managed File Transfer compression to reduce the upload time for the end user; using Oracle Managed File Transfer to pass a directory to an Oracle SOA Suite application to process files individually; and, finally, using an Oracle SOA Suite application to debatch very large files delivered from Oracle Managed File Transfer.

Cloud File Delivery with Oracle Managed File Transfer [CON7976]

           Presenters: Dave Berry, Senior Manager, Oracle & Ed Macosky, Senior Director, Software Development, Oracle

Abstract: Organizations transferring files in a hybrid mode from on-premises to the cloud require special tooling to deliver files securely and reliably. Oracle Managed File Transfer supports cloud endpoint protocols, encryption, and user access, leveraging the Oracle WebLogic Oracle Platform Security Services security layer instead of the more typical operating system security model. This gives administrators the flexibility to define users, groups, and roles that match their security needs. In addition, new Oracle Managed File Transfer cloud endpoints extend the reach of the cloud to cloud integrations. This session and demo illustrate these Oracle Managed File Transfer cloud use cases.

To find more related SOA sessions at Oracle Open World, access Oracle SOA Suite Focus-On

Friday Sep 05, 2014

Ovum Lauds Oracle SOA Suite 12c, Differentiates Cloud and Mobile Integration

Ovum has recently published a paper on Oracle SOA Suite and lays out differentiation.  According to the paper, with the latest release of Oracle SOA  Suite, Oracle has again proved that it can swiftly respond to customer requirements while ensuring continuity in product strategy to offer a unified platform for a wide range of integration requirements. Here is an excerpt from the paper:

Oracle SOA Suite 12c has introduced several new features and capabilities that resonate with the current integration priorities of enterprises, especially cloud and mobile integration. What differentiates Oracle SOA Suite 12c from competing platforms is its emphasis on simplifying the process involved in the development, testing, and execution of integration flows connecting a wide range of applications. 

This developer-centric approach is evident in the simple approach offered by the Oracle Cloud Adapter software development kit (SDK) for the development of new adapters to software-as-a-service (SaaS) applications. Furthermore, Oracle Cloud Adapters handle several inherent intricacies of SaaS integration, such as session management, data mapping, and specific security requirements to help reduce development efforts and costs. The developer-centric approach is also evident in the developer tooling enhancements introduced as part of Oracle SOA Suite 12c release. 

Another noteworthy feature is the integration between Oracle MFT and Oracle SOA Suite and Oracle B2B 12c, which provides support for complex orchestration use cases, such as the extension of enterprise applications to B2B e-commerce and cloud integration scenarios. 

Key messages 

 Oracle has further refined its approach to cloud and mobile integration. 

 Developer productivity is a key theme for Oracle SOA Suite 12c. 

 Oracle MFT strengthens the overall value proposition of Oracle’s integration middleware stack. 

 To read the rest of the paper download today: A Unified Platform for On-Premise, B2B, Cloud, and Mobile


Monday Jun 30, 2014

Managing Files for the Hybrid Cloud - Oracle Managed File Transfer 12c

Summary from the White Paper "Managing Files for the Hybrid Cloud"

Fully integrated file transfer solutions are a core requirement in the new and hybrid world of cloud and on-premise enterprises. Organizations still make heavy use of files utilizing bulk, batch, and real-time updates for application integration. As cloud Software as a Service (SaaS) is introduced in the IT landscape, file integrations simply increase in both size and volume. The general approach for on-premises and partner file integrations using Managed File Transfer (MFT) is similar to other IT infrastructure integration: Plan, Scope and Deliver incrementally. 

For most organizations, MFT is not new but rather there is a need to put together a single enterprise wide file transfer solution that scales to partners and the cloud. Changes in security and compliance requirements are driving IT organizations to replace aging or custom script based file transfer technologies. Encryption such as PGP and Secure FTP servers are still the norm, but they must utilize existing Identity Management to define users, groups and roles for remote access. Finally, the need to integrate MFT with existing integration tooling such as Oracle SOA Suite cannot be overstated. Since MFT typically does not support document transformations and other complex orchestration use cases, it is critical for MFT to act as a file gateway when used in tandem with the existing integration platform.


Figure 1: End to End Secure FTP to File Use Case

File processing has matured a lot in the recent years. Even though real-time processing is dominant in many integration patterns, files are still the bread and butter for many industries while integrating back-end enterprise systems. Cloud integrations are expected to increase the demand for file-based integrations even more. Built- in functionality for security, encryption, and global visibility have long been core MFT requirements. But as this paper has illustrated, an easy to use MFT solution that integrates with existing technologies, is an invaluable tool for solving complex problems such as partner EDI transactions, processing very large files or securing the enterprise. 

Learn More and Download the White Paper: Oracle Managed File Transfer

Thursday Jun 26, 2014

Oracle Unveils Oracle SOA Suite 12c

Oracle Banner

Oracle today announced the availability of Oracle SOA Suite 12c, a major release that dramatically simplifies integration across today's larger application infrastructure spanning on-premises, cloud, mobile, and Internet of Things (IoT) devices.

New in this release are enhancements to the Oracle Cloud Adapters for SaaS applications, which eliminate the complexity and security challenges associated with custom coded Web services integration. Mobile integration is also simplified with support for the REST/JSON standards as well as easy to use transformation tools to translate between traditional enterprise SOAP interactions and REST.

Oracle SOA Suite 12cOracle Managed File Transfer 12c was also released to enable secure file exchange and management with internal departments and external partners. Oracle Managed File Transfer, which is tightly integrated with Oracle SOA Suite 12c, protects against inadvertent access to unsecured files at every step in the end-to-end transfer of files.

Prior to the release of Oracle SOA Suite 12c, some existing Oracle SOA Suite customers and partners had the opportunity to test 12c and provide feedback. In these videos, customers and partners share why they are excited about the 12c release due to the enhancements in cloud integration, mobile integration, managed file transfer, templates to jumpstart integration, ease of use improvements and more.Video Images

After you have checked out the videos, register for the upcoming Oracle SOA Suite 12c webcast with Oracle Group Vice President Amit Zavery describing the highlights of Oracle SOA Suite 12c including the business benefits as well as leading a panel of integration experts from Dell, JDSU, and Keste on how they use Oracle SOA Suite to improve their business.   Next, view the brand new data sheets, white papers, podcasts and more.  Here is your guide:

New to Oracle SOA Suite:

Existing Oracle SOA Suite customer:

Clear your calendar to drink in all of the enhancements in this major update to Oracle SOA Suite:

Yes, there is a lot in this release!  Stay tuned for more Oracle SOA Suite 12c assets in future blogs including highlights from the 6 new Podcasts with Oracle SOA Suite Product Management.  In each of these podcasts, I interview Demed, Simone, Robert, Dave, and Vikas (2) on their respective areas within Oracle SOA Suite 12c for their insights into what's new and exciting.  An overview of this release is covered in the Oracle Press Release "Oracle Unveils Oracle SOA Suite 12c"

New Features in 12c Montage

About

Find Us on facebook Follow us on twitter Oracle SOA Suite forum
SOA PM team
Welcome to the Oracle SOA Suite team blog. We'll use this site for news and information that did not make it into our official documentation for a reason or another.

Search

Archives
« April 2015
SunMonTueWedThuFriSat
   
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  
       
Today