Feed aggregator

Streamline Oracle Development with Cloud Services

Angelo Santagata - Thu, 2015-07-02 05:24
Streamline Java Development with Cloud Services
On-Demand Webinar Replay

Learn to deliver java applications to market faster. Reduce hardware and software costs for new development and testing environments. Improve DevOps efficiency. Build, test and run enterprise-grade applications in the Cloud and on premise.

Listen to this webinar replay with development expert James Governor, co-founder of RedMonk, and Daniel Pahng, President and CEO of mFrontiers, LLC, an ISV with hands-on experience developing enterprise mobility and Internet of Things (IOT) solutions, as they present this webcast on developing applications in the cloud.
Listen today!
For more information:
July 2015                                                                                          Oracle Corporation - All rights reserved

Calling Fusion SOAP Services from Ruby

Angelo Santagata - Wed, 2015-07-01 08:55
Just completed some integration work with a partner of ours using the Ruby language. Given that a lot of startups like Ruby I thought it would be useful to cut-n-paste the sample code here.
This example creates a simple (minimal) opportunity using the SOAP API in Sales Cloud. That said the code would be almost identical if you were querying HCM Data,
The approach we took here was to prototype the SOAP call using SOAPUI and then cut-n-paste the SOAP payload into the data variable. In a real industrialized solution I'd create the payloads in template form.


  def create_opportunity

  # Change yourhostname.com to your Fusion SOAP Endpoint Hostname

    http = Net::HTTP.new(uri.host, uri.port)
    http.use_ssl = true
    path = uri.request_uri
    http.read_timeout = 5
    http.open_timeout = 5


  # Change authorization header to contain Base64encoded string of username/password
    headers = {
    'Content-Type' => 'text/xml',
    'authorization' => 'Basic bBase64EncodedCredentialHere='
    }

   
   # Data Contains the payload
    <soapenv:Header/>
    <soapenv:Body>
    <typ:createOpportunity>
    <typ:opportunity>
    <opp:Name>Joel Test New1</opp:Name>
    </typ:opportunity>
    </typ:createOpportunity>
    </soapenv:Body>
    </soapenv:Envelope>'

    resp, data = http.post(path, data, headers)
  end

!TIP!
A quick test in a SOAP testing tool like JDevelopers Http Analyzer or SOAPUI is a MUST before executing this!

Apache Phoenix, SQL is getting closer to Big Data

Kubilay Çilkara - Tue, 2015-06-30 16:50


Here is a post about another project in the Big Data world, like Apache Hive from my previous post, enables you to do SQL on Big Data. It is called Apache Phoenix.

Phoenix is a bit different, a bit closer to my heart too, as I read the documentation on Apache Phoenix, the word 'algebra' and 'relational algebra' came across few times, and that mean only one thing, SQL! The use of the word algebra in the docs did give me a lot of confidence. SQL has closure, is based on a database systems model which has it's roots in logic and maths and especially a subset of algebra, The Set Theory.

Apache Phoenix is developed in Salesforce and is now one of the popular projects in Apache. Apache Phoenix is a SQL skin on top of HBase, the columnar (NoSQL) database of the Hadoop ecosystem, capable of storing very large tables and data and query them via 'scans'. HBase is part of the Hadoop ecosystem and the file system it uses is usually HDFS. Apache Phoenix is using JDBC on the client as a driver.

In the race to bring the easiest to use tools for Big Data, I think Apache Phoenix is very close. It is the SQL we know used since the 1970s. The Apache Phoenix team seems to be committed and willing to introduce all of the missing parts of SQL, including transaction processing with different isolation levels.  Making Phoenix a fully operational Relational Database layer on HBase. Have a look in their roadmap. The amount of current and suggested future SQL compatibility is remarkable, and this makes me take them really seriously.
  • Transactions
  • Cost-based Query Optimization! (Wow)
  • Joins
  • OLAP
  • Subqueries
  • Striving for full SQL-92 compliance
In addition to all this, it is also possible to turn an existing HBase table to an Apache Phoenix table using CREATE TABLE or even CREATE VIEW, the DDL statements that we know. How handy is that? Suddenly you can SQL enable your existing HBase database!

How to install and use Phoenix

The SQL skin can be installed to an existing Hadoop HBase installation very quickly. All you need to do is to download and extract the tarball. You can setup a standalone Hadoop environment, look at my previous blog post for that, and then install HBase and install Apache Phoenix

Once the Apache  Phoenix software is installed, then you can start it and query it with SQL like this.

From within the bin/ directory of Phoenix install directory run

$ ./sqlline.py  localhost

That will bring you to the phoenix prompt


0: jdbc:phoenix:localhost> select * from mytable;


Categories: DBA Blogs

New Tools releases , now with Java

Kris Rice - Tue, 2015-06-30 11:28
What's New   For the 90%+ of people using sqldev/modeler on windows, the JDK bundled versions are back.  So no more debating what to install or worrying about conflicting Java versions.   Lots of bug fixes.    My favorite bug is now fixed so you can use emojis in your sql> prompt. RESTful CSV Loading   We wrapped he same CSV import code in SQL Developer into the REST Auto-Enablement

Interaction Hub Image Now Available on the PeopleSoft Update Manager Home Page

PeopleSoft Technology Blog - Tue, 2015-06-30 11:23

As noted in a recent post, the PeopleSoft Interaction Hub is now part of the Selective Adoption Process.  You can get the first image now on the PUM home page.  (At the PUM home page, choose the PeopleSoft Update Image Home Pages tab, then select the Interaction Hub Update Image page from the drop down.)  This means customers can use the PeopleSoft Update Manager and our other life cycle tools to manage their upgrade and maintenance process for the Hub.  There is also a white paper posted there that describes the baseline customers must reach to start taking these images. 

Note that this will be the only way for customers to take maintenance and updates going forward, so we encourage everyone to move to the Selective Adoption process as soon as is feasible for your organization. This move brings the Interaction Hub in line with all other PeopleSoft applications, which use the Selective Adoption process.  This process also offers customers additional value and control, and enables you to benefit from the value of the latest features with a greatly streamlined life cycle process.  

For customers that are eager to learn more, there are many resources on Selective Adoption and PUM on the PUM home page as well as on our YouTube channel.

This first image of the Interaction Hub is functionally equivalent to the current release (9.1/Revision 3), but taking it gets you on the Selective Adoption process.  Some great enhancements are coming the the next image.


Make even more of UKOUG Tech15: APEX 5.0 UI Training - Dec 10th in Birmingham

Dimitri Gielis - Tue, 2015-06-30 01:48

APEX 5.0 has been released this spring. People who have already spent some time on this new version know this version is packed with new features aimed to make APEX developers even more productive, like the Page Designer.
Another striking new subset of features is aimed at creating better looking user interfaces for your APEX applications in an easy and maintainable way. 
The definition of user interface components in APEX 5.0 is very different to what we're used to. For example there is a new Universal Theme with Template Options and a Theme Roller. To get you up and running with this new toolset as quickly as possible, Dimitri Gielis of APEX R&D and Roel Hartman of APEX Consulting have joined forces and set up a one day course fully aimed at APEX 5.0 UI. So if you want to know not only how to use the new Theme, but also how to modify it to fit your needs, this is the event you should attend!

The training will be at the Jury’s Inn in Birmingham (UK) on Thursday Dec 10 - so conveniently immediately after the UKOUG Tech15 conference.
More information and registration see www.apextraining.eu

If you are from another country and think this training should be available in your country as well, please contact us - then we'll see what we can do!
Categories: Development

ReConnect 2015

Jim Marion - Mon, 2015-06-29 18:43

It is just a little less than a month until the PeopleSoft ReConnect conference in Rosemont, Illinois. I will be presenting PeopleTools Developer: Tips and Techniques on Thursday from 11:30 AM to 12:20 PM in Grand Ballroom H.

Video Tutorial: XPLAN_ASH Active Session History - Part 6

Randolf Geist - Sun, 2015-06-28 16:30
The next part of the video tutorial explaining the XPLAN_ASH Active Session History functionality continuing the actual walk-through of the script output.

More parts to follow.

Apple Watch Impressions with Jeremy Ashley: Time for the Best User Experience in the Enterprise Cloud

Usable Apps - Sat, 2015-06-27 04:40

In part two of a three-part series, Ultan O'Broin (@usableapps) talks with Jeremy Ashley (@jrwashley) about his impressions of the Apple Watch and other insights during a day in the life of a Group Vice President in Oracle. Read part one.

"Perhaps it's an English thing,” says Oracle Applications User Experience Group Vice President, Jeremy Ashley, "but just being able to keep eye contact with someone when we're talking means I can pay closer attention to people."

 Inspiring Cloud UX in Oracle

Jeremy Ashley: Inspiring user experience leadership of strategy, science, and storytelling.

"A glance at my Apple Watch and I know immediately if something is important. I can decide if I need to respond or it can wait. I don't have to pull out my smartphone for that."

This story of combining the personal convenience of wearable technology with empathy for people is typical of the man who sets the vision for the Oracle Applications Cloud user experience (UX).

It’s just one of Jeremy's impressions of the iWatch, as it's known. Now that he's used the Apple Watch for a while since we first chatted, I wanted to find out about his experience and what it all means for enterprise UX.

iWatch iMpressions

"I just love the sheer build quality of the watch; so utterly Apple," Jeremy begins. His industrial design background surfaces, bringing together traditions of functionality, classic craftsmanship, and exuberance for innovation: "Sweet. I can even use it to tell the time!"

A bloke with an eye for pixel-level detail, Jeremy has explored how to get the best from the Apple Watch, right down to the exact precision needed for the force touch action on the built-in Maps app. He's crafted a mix of apps and favorite glances to suit his world, such as for battery life, his calendar, and stocks. He admires the simplicity and visualizations of the built-in Activity app too, swiping the watch face to see his latest progress as we talk in his office full of what's hot in technology and a selection of clocks and traditional woodworking tools.

Microtransactions at a glance from the wrist

Microtransactions at a glance from the wrist delight the wearer and make life—and work—more convenient.

"The watch really shows how the idea of context automates the routine and looks after the little things that make life easier and delight you in simple ways, such as not having to swipe a credit card to pay for coffee."

In the enterprise world, these kinds of little experiences, or "microtransactions" as Jeremy calls them, translate to wearer convenience when working. For example:

  • Automatically recording the time spent and location of a field service job
  • Accepting terms and conditions when attending a confidential demo meeting as you check in at reception
  • Adding data to the cloud, such as updating a win probability as you walk away from a sales engagement
  • Seeing at a glance that a supply chain fulfillment is complete

Oracle Glance and the Enterprise

Oracle's concept of glance is device agnostic and reflects a key UX strategy—mobility—or how we work flexibly today: across devices, pivoting around secure enterprise data in the Oracle Cloud.

"Smartwatches are like mobile dialog boxes," Jeremy explains. "They start that user conversation with the cloud in simple, 'in-the-moment,' deeply contextual ways. Glance and the cloud together automatically detect and deliver the who, what, and where of microtransactions, yet because it's all on a watch, the experience remains personal and familiar. That really resonates with wearers."

The smartwatch is a personal and familiar paradigm in the enterprise too

Jeremy Ashley: The smartwatch is a personal and familiar paradigm that also resonates in the enterprise.

Jeremy shared some thoughts on where such innovation is heading:

"The Apple Watch won't replace the smartphone, for now. We still need that identifier device—a kind of personal beacon or chip, if you like—that lets us make an elegant 'handoff' from a glance on our wrist to a scan for denser levels of information or to a commit to doing less frequent tasks on other devices. The watch just isn't designed for all that."

Activity app Stand goal glances on Apple Watch

Apple Watch Activity glances for stand goal progress

A perfect example of Oracle Cloud UX strategy and design philosophy together. Jeremy glances back at his Activity app and sees his new stand goal progress. That standing desk is paying off!

But, innovating user experience in Oracle is an activity that definitely does not stand still. We'll explore how such innovation and design progress pays off for enterprise users in a future blog post.

Got Time Now?

Discover more:  

New PeopleTools Mobile Book

Jim Marion - Fri, 2015-06-26 19:44

My wife and I have been writing another book. We are reviewing proofs now, which means we are getting close to publication. I did a quick search on Amazon and see that Amazon is taking pre-orders: PeopleSoft PeopleTools: Mobile Applications Development. Publication date is currently set for October 16, 2015, which means it will publish just before OpenWorld. Fluid and MAP have been out for about a year. If you guessed that a new PeopleTools mobile book would cover these mobile technologies, you guessed correctly. But I saw no reason to stop there. After describing how to use Fluid and MAP, the book moves on to building responsive mobile applications using standard HTML5 development tools and libraries including jQuery mobile and AngularJS. Just today I spoke with a customer still using PeopleTools 8.50. What are the odds that customer will be using PeopleTools 8.54 in the next year? The second section of this book, using HTML5 is perfect for a customer in this situation because it describes how to connect a modern single page application to a PeopleSoft back end using iScripts and REST services (one chapter for each back end solution). The book finishes with examples of building native and hybrid applications for PeopleSoft using the Android SDK, Apache Cordova (my personal favorite), and Oracle's Mobile Application Framework. Here is a rough outline:

Chapter 1 shows you how to prepare your workstation for mobile development. This includes configuring HTML5 browsers, developer tools, and emulators.

Chapter 2 digs into Fluid, showing two examples of creating Fluid pages. The first is a basic page whereas the second is a two-column responsive page. This chapter covers search pages; toolbar actions; and fluid field, page, and component features. The point of this chapter is to help the reader feel comfortable with Fluid. Fluid includes a lot of new features based on HTML5, CSS3, and JavaScript. I really want customers to understand, however, that they can build Fluid pages using core PeopleTools without any knowledge of the modern web concepts. Of course, you can build some really amazing solutions if you know HTML5, CSS3, and JavaScript.

Chapter 3 explains the new Mobile Application Platform (MAP): what it is, when to use it, and how to use it. A chapter wouldn't be complete without examples, so there are plenty of examples to help you start your next MAP project.

Chapter 4 segues into modern mobile development. The rest of the book takes the user interface outside of PeopleTools. Before moving away from Application Designer, however, we need a data model and a scenario. This chapter presents the scenario and lays the foundation for the rest of the chapters. In this chapter you will work with SQL and the Documents module.

Chapter 5 shows us how to create our first HTML5 front end. I wanted to make this chapter as simple as possible so I used jQuery Mobile. In this chapter the reader will write very basic HTML and have the opportunity to see how jQuery Mobile progressively enhances simple markup to create impressive mobile solutions.

Chapter 6 is the exact opposite of chapter 5. Here I wanted to demonstrate flexibility and performance. This chapter is intentionally designed to provide a challenge for developers. Readers tell me it is a good chapter, perhaps a little intimidating, but very worthwhile. In this chapter you will work with AngularJS, Topcoat, and FontAwesome.

Chapter 7 shows the reader how to build back-end services for Chapters 5 and 6 using iScripts.

Chapter 8 is the same as Chapter 7 but uses REST services instead of iScripts. If you are new to PeopleSoft REST services and want to learn how to configure REST services as well as how to work with Documents to serve JSON from Integration Broker, then you will find this chapter very valuable.

Chapter 9 shifts from HTML5 to native. In this chapter the reader will learn how to use the Android SDK to consume the services built in chapter 8. The point of this chapter is not to teach Android development but rather how to consume PeopleSoft services from Android.

Chapter 10 turns to a native application category described as Hybrid applications. In this Chapter the reader will learn how to convert the Chapter 6 prototype into an on-device application that has access to device specific features such as the camera. In fact, the example shows how to use the Cordova API to take a selfie.

Chapter 11 brings us back to Oracle-specific technology by showing how to build a hybrid application using Oracle's Mobile Application Framework (MAF). I chose to spend a little more time in this chapter to teach some of the specifics of MAF. For example, I wasn't very excited about the default appearance of buttons on Android so I included steps showing how to extend the MAF skin.

Publication is still a few months away, but we are getting close. I'm really hoping to be able to give away copies during my OpenWorld session this year.

SQL*Plus tips #7: How to find the current script directory

XTended Oracle SQL - Fri, 2015-06-26 14:06

You know that if we want to execute another script from the current script directory, we can call it through @@, but sometimes we want to know the current path exactly, for example if we want to spool something into the file in the same directory.
Unfortunately we cannot use “spool @spoolfile”, but it is easy to find this path, because we know that SQL*Plus shows this path in the error when it can’t to find @@filename.

So we can simply get this path from the error text:

rem Simple example how to get path (@@) of the current script.
rem This script will set "cur_path" variable, so we can use &cur_path later.
 
set termout off
spool _cur_path.remove
@@notfound
spool off;
 
var cur_path varchar2(100);
declare 
  v varchar2(100);
  m varchar2(100):='SP2-0310: unable to open file "';
begin v :=rtrim(ltrim( 
                        q'[
                            @_cur_path.remove
                        ]',' '||chr(10)),' '||chr(10));
  v:=substr(v,instr(v,m)+length(m));
  v:=substr(v,1,instr(v,'notfound.')-1);
  :cur_path:=v;
end;
/
set scan off;
ho (rm _cur_path.remove 2>&1  | echo .)
ho (del _cur_path.remove 2>&1 | echo .)
col cur_path new_val cur_path noprint;
select :cur_path cur_path from dual;
set scan on;
set termout on;
 
prompt Current path: &cur_path

I used here the reading file content into variable, that I already showed in the “SQL*Plus tips. #1″.
UPDATE: I’ve replaced this script with a cross platform version.

Also I did it with SED and rtrim+ltrim, because 1) I have sed even on windows; and 2) I’m too lazy to write big PL/SQL script that will support 9i-12c, i.e. without regexp_substr/regexp_replace, etc.
But of course you can rewrite it without depending on sed, if you use windows without cygwin.

PS. Note that “host pwd” returns only directory where SQL*Plus was started, but not executed script directory.

Download latest version

Categories: Development

Oracle Priority Support Infogram for 25-JUN-2015

Oracle Infogram - Thu, 2015-06-25 14:36

RDBMS



Solaris


Ops Center

From the Ops Centerblog: Ops Center 12.3 is Released

Java

Building Simple Java EE REST Service Using Oracle JDeveloper 12c, from Oracle Partner Hub: ISV Migration Center Team.

Asynchronous Processing, from The Java Source.

JDeveloper and ADF

The 10 Most Recently Created Notes for JDeveloper/ADF as of 22 June 2015, from Proactive Support - Java Development using Oracle Tools.

, from WebLogic Partner Community EMEA.

And from the same source:




NetBeans


JavaScript


Web Computing

HTTP/2 and Server Push, from The Aquarium.

Security


EBS

From the Oracle E-Business Suite Support blog:




From the Oracle E-Business Suite Technology blog:


…And Finally


I’m (finally!) back on iPhone after an unpleasant jaunt into Android telephony and found a weather app I love. It makes use of the built in barometer on iPhone combined with user reporting, radar, etc. to give really accurate predictions on precipitation. I tested it the other day with an approaching thunderstorm and it was accurate on the arrival and intensity of the rain to within a few minutes: Dark Sky update looks to 'revolutionize weather forecasting’ by tapping iPhone sensors, from The Verge.

Hive (HiveQL) SQL for Hadoop Big Data

Kubilay Çilkara - Thu, 2015-06-25 14:30


In this  post I will share my experience with an Apache Hadoop component called Hive which enables you to do SQL on an Apache Hadoop Big Data cluster.

Being a great fun of SQL and relational databases, this was my opportunity to set up a mechanism where I could transfer some (a lot)  data from a relational database into Hadoop and query it with SQL. Not a very difficult thing to do these days, actually is very easy with Apache Hive!

Having access to a Hadoop cluster which has the Hive module installed on, is all you need. You can provision a Hadoop cluster yourself by downloading and installing it in pseudo mode on your own PC. Or you can run one in the cloud with Amazon AWS EMR in a pay-as-you-go fashion.

There are many ways of doing this, just Google it and you will be surprised how easy it is. It is easier than it sounds. Next find links for installing it on your own PC (Linux).  Just download and install Apache Hadoop and Hive from Apache Hadoop Downloads

You will need to download and install 3 things from the above link.

  • Hadoop (HDFS and Big Data Framework, the cluster)
  • Hive (data warehouse module)
  • Sqoop (data importer)
You will also need to put the connector of the database (Oracle, MySQL...) you want to extract data from in the */lib folder in your Sqoop installation. For example the MySQL JDBC connector can be downloaded from hereDon't expect loads of tinkering installing Apache Hadoop and Hive or Sqoop, just unzipping binary extracts and few line changes on some config files in directories, that's all. Is not a big deal, and is Free. There are tones of tutorials on internet on this, here is one I used from another blogger bogotobogo.


What is Hive?

Hive is Big Data SQL, the Data Warehouse in Hadoop. You can create tables, indexes, partition tables, use external tables, Views like in a relational database Data Warehouse. You can run SQL to do joins and to query the Hive tables in parallel using the MapReduce framework. It is actually quite fun to see your SQL queries translating to MapReduce jobs and run in parallel like parallel SQL queries we do on Oracle EE Data Warehouses and other databases. :0) The syntax looks very much like MySQL's SQL syntax.

Hive is NOT an OLTP transactional database, does not have transactions of INSERT, UPDATE, DELETE like in OLTP and doesn't conform to ANSI SQL and ACID properties of transactions.


Direct insert into Hive with Apache Sqoop:

After you have installed Hadoop and have hive setup and are able to login to it, you can use Sqoop - the data importer of Hadoop - like in the following command and directly import a table from MySQL via JDBC into Hive using MapReduce.

$  sqoop import -connect jdbc:mysql://mydatbasename -username kubilay -P -table mytablename --hive-import --hive-drop-import-delims --hive-database dbadb --num-mappers 16 --split-by id

Sqoop import options explained:
  •  -P will ask for the password
  • --hive-import which makes Sqoop to import data straight into hive table which it creates for you
  • --hive-drop-import-delims Drops \n\r, and \01 from string fields when importing to Hive. 
  • --hive-database tells it which database in Hive to import it to, otherwise it goes to the default database. 
  • --num-mappers number of parallel maps to run, like parallel processes / threads in SQL
  • --split-by  Column of the table used to split work units, like in partitioning key in database partitioning. 
The above command will import any MySQL table you give in place of mytablename into Hive using MapReduce from a MySQL database you specify.

Once you import the table then you can login to hive and run SQL to it like in any relational database. You can login to Hive in a properly configured system just by calling hive from command line like this:

$ hive
hive> 


More Commands to list jobs:

Couple of other commands I found useful when I was experimenting with this:

List running Hadoop jobs

hadoop job -list

Kill running Hadoop jobs

hadoop job -kill job_1234567891011_1234

List particular table directories in HDFS

hadoop fs -ls mytablename


More resources & Links



Categories: DBA Blogs

Groovy Time! How to use XML dateTime and duration in BPM 12c

Jan Kettenis - Wed, 2015-06-24 14:27
In this article I show some examples of handling XML dateTime and durations in Groovy in the context of a Oracle BPM 12c application.

Working with dates and durations in Java has always been painful. Mainly because date and time is a complex thing, with different formats and time zones and all, but I sometimes wonder if it has not been made overly complex. Anyway. Working with XML dates is even more complex because the limited support by XPath functions. Too bad because in BPM applications that work with dates this has to be done very often, and as a result I very often see the need to create all kinds of custom XPath functions to mitigate that.

This issue of complexity is no different for Groovy scripting in Oracle BPM 12c. And let handling of dates be a typical use case for using Groovy scripting because of this limited support by XPath. Therefore, to get you started (and help myself some next time) I would like to share a couple of Groovy code snippets for working with XML dates and durations that may be useful. These example are based on working with the XML dateTime type, and do not handle with the complexity of time zones and different formats. In my practice this is 99% of the use cases that I see.

In my opinion you still should limit using Groovy to handle dates and to the minimum, and rather use custom XPath functions, or create a Java library which you can can import in Groovy. But when you have to, this just might come in handy.

Instantiate an XML DateIf you have an XML element of type dateTime, you use an XmlCalender object. An XmlCalender object with the current time can instantiated as shown below:

Date now = new Date()
GregorianCalendar gregorianNow = new GregorianCalendar()
gregorianNow.setTime(now)
XmlCalendar xmlDate = XmlCalendarFactory.create(gregorianNow)


Instantiate a Duration and Add it to the DateTo instantiate a duration you use an XmlDuration object. In the code below a duration of one day is added to the date:

XmlDuration xmlDuration = new XmlDuration("P1D")
xmlDate.add(xmlDuration)


The string to provide is of type ISO duration.

The imports to use can also be a pain to find. That actually took me the most time of all, but that can just be me. The ones needed for the above are shown in the following picture (you can get to it by using clicking on Select Imports on the top-right corner of the Groovy script.

Quick and Dirty - Refreshing a Select List of Values

Denes Kubicek - Tue, 2015-06-23 06:14
This is a quick and dirty solution but it works. It shows hot to update a select list of values on demand without a lot of coding.

Categories: Development

AJAX Callback and jQuery creating Page Items Dynamically

Denes Kubicek - Tue, 2015-06-23 05:40
This example shows a couple of interesting techniques:
  • 1. How to create and use an AJAX Callback process instead of an Application Process on Demand,
  • 2. how to create a dynamic page item,
  • 3. how to modify the item display settings and reference Font Awsome icon set and finaly,
  • 4. it shows how to call an AJAX process from javascript.
This question is based on a recent forum posting where this question was asked.

Have a look and enjoy.

Categories: Development

Creating Custom Listening Connectors using Integration Broker SDK

Javier Delgado - Tue, 2015-06-23 03:48
One of my customers recently had the need of allowing a third party web application to attach files into PeopleSoft. After trying a number of different approaches (the integration had to be done at the web application client level, which significantly reduces the options to manipulate the request to PeopleSoft before sending it, particularly when dealing with old web browsers), I gave up and came to the conclusion that I needed a custom listening connector in Integration Broker to implement such integration. 



The process of developing and installing a custom listening connector in Integration Broker is quite well described in PeopleBooks, however, I thought it would helpful to document the process I have followed.

Samples

PeopleSoft comes with some samples of connectors developed using the Integration Broker SDK. The most interesting one for listening connectors is ExampleServletListeningConnector.java located in the following folder:

$PIA_HOME/webserv/IFHRDEV/applications/peoplesoft/PSIGW.war/WEB-INF/SDK/src/samplelisteningconnectors.java

I've used this sample as the basis for my custom connector. In some cases, I also found quite handy to decompile the standard connectors such HttpListeningConnector. I could not find any exhaustive source of documentation of the Integration Broker SDK, so decompiling the existing connectors proved to be a good way to understand how to best use the SDK.

Note: For decompiling the Java class files I have used a very simple tool names cavaj. It is a very simple tool, but still helpful.

Development
Taking the previously mentioned sample as the basis, I have coded my own connector. If you are not interested in the details, you may want to skip to the next section.

What I needed to do in my connector was basically two things:

  1. Encode the incoming file using Base64, as binary files could not be processed otherwise by the existing PeopleCode Message API.
  2. Pass any parameters received in the HTTP Header or the URL as part of the IBInfo (Integration Broker information included in every internal Integration Broker message.


If you want to check the actual code, you can download the source code from this link:



Compiling
Once your source code is ready, you need to compile it. The first step for Java compilation is to set the environment variables so they point to the Java SDK. In my case, I was using the PeopleSoft HCM 9.2 Update Image 11, and these were the commands I needed to use:

export JAVA_HOME=/opt/oracle/psft/pt/jdk1.7.0_71
export PATH=$PATH:$JAVA_HOME/bin

Then I went to the directory were my java file was placed and run the following command to compile the file:

javac -cp /home/psadm2/psft/pt/8.54/webserv/peoplesoft/applications/peoplesoft/PSIGW.war/WEB-INF/classes:/home/psadm2/psft/pt/8.54/webserv/peoplesoft/applications/peoplesoft/PSIGW.war/WEB-INF/lib/mail.jar:/opt/oracle/psft/pt/bea/wlserver/server/lib/weblogic.jar FileUploadListeningConnector.java 

The paths may obviously differ in your case, but the important thing is to include the following directories/jar files in your class path:

  • $PIA_HOME/webserv/peoplesoft/applications/peoplesoft/PSIGW.war/WEB-INF/classes
  • mail.jar
  • weblogic.jar

Please note that weblogic.jar was needed because I was using WebLogic as my web server. In case you use WebSphere, you need to change this jar file.

Deployment
Once the file is compiled, you need to copy the resulting class file to the following directory:

$PIA_HOME/webserv/IFHRDEV/applications/peoplesoft/PSIGW.war/WEB-INF/classes/com/peoplesoft/pt/integrationgateway/listeningconnector

The next step is to let WebLogic know that there is a new servlet available. This can be done by editing the following file:

$PIA_HOME/webserv/IFHRDEV/applications/peoplesoft/PSIGW.war/WEB-INF/web.xml

All you need to do is to duplicate the sections referring to ExampleServletListeningConnector and replace those appearances with your connector name. In my case, I was using PeopleTools 8.54, and these were the lines I had to include:

(...)
<servlet>
<servlet-name>ExampleServletListeningConnector</servlet-name>
<servlet-class>com.peoplesoft.pt.integrationgateway.listeningconnector.ExampleServletListeningConnector</servlet-class>
</servlet>
<servlet>
<servlet-name>FileUploadListeningConnector</servlet-name>
<servlet-class>com.peoplesoft.pt.integrationgateway.listeningconnector.FileUploadListeningConnector</servlet-class>
</servlet>
(...)
<servlet-mapping>
<servlet-name>ExampleServletListeningConnector</servlet-name>
<url-pattern>/ExampleServletListeningConnector/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>FileUploadListeningConnector</servlet-name>
<url-pattern>/FileUploadListeningConnector/*</url-pattern>
</servlet-mapping>
(...)

Testing
In order to test the new connector, you need to reboot the web server so the changes made to register the new servlet are taken. Once this is done, you can check if the new listening connector is responding by using the declared URL:

http://webserver/PSIGW/FileUploadListeningConnector


Pages

Subscribe to Oracle FAQ aggregator