When purchasing Oracle Fusion Middleware products, many companies will also obtain BAM license but never use it, fearing difficult configuration and integration. However, when working with BAM, I found it pretty straightforward. The only reservation I had, was way of providing BAM with actual data which was in my view not well documented (and forced use of IE of course (: ). But here comes OSB for help. Every operation which is exposed through OSB is potencial source of data. In this tutorial I will explain how to easily integrate BAM with existing OSB services using JMS. I assume that reader has some previous experiences with creating business and proxy services in OSB.
Now, lets assume that we have existing simple SOAP service exposed in OSB and proxy just routes messages to business service. For the sake of this tutorial there was created simple WSDL with just one operation to simulate whole process.
First, we have to creat new Business service, which will send data to created JMS queue. Lets name it BamBS
Choose jms as protocol. Add URL of your JMS queue. In my case, I created JMS connection factory with jndi name jms/OsbBamConnFactory and JMS queue with jndi name jms/OsbBamQueue so the resulting URL will look like this: jms://host:port/jms.OsbBamConnFactory/jms.OsbBamQueue - slash in jndi name is replaced with dot
Select Queue as Destination Type and Text as Message Type
When creation of business service is finished, we have to change original proxy routing, so it sends every message to BamBS: Select Edit Message Flow -> Click on proxy -> Add Pipeline Pair -> Add stage -> Edit stage
We will now publish messages to BamBS
Save all changes. When CreateUser operation is called, message is now send also to JMS Queue. Lets test if everything works.
Launch test console and execute call
Go back to Weblogic console, select JMS QUEUE you created and select monitoring tab. Select queue and click on Show Messages.
Now select message and you will see whole content of message
So that was OSB part. Are you tired already? Dont despair, the sweet end is near :) We will now move to BAM console. Log in to BAM console, and select Architect tab.
We have to create BAM data object, which will hold values which come from JMS Queue. In top left corner select Data Objects and choose directory, where you want to put your object. In my case it is in Samples directory. Select Create Data Object.
Name the object and add required fields. Sometime it takes a little bit longer to create data object. It may look like nothing is happening for while, quite the contrary.
We now have to create Enterprise Message Source to pull data from JMS Queue. In top left corner select Enterprise Message Sources and select Create
Name Message source, fill JNDI Service Provider URL, Connection Factory Name and Queue Name and select created data object
Fill data correspondingly to your message element and map message to data object. Save configuration. It may take a while again :)
Enterprise Message Source is stopped when created. You have to start it first to receive messages.
Now, thats it. All is set up. When you now look back to your data object, in content tab, you can see message which arrived from JMS queue (if not, send it again).
You can now create dashboards with graphs and charts containing KPIs, showing realtime data which flow through your webservices exposed in OSB.Publikované: 10. dec 2014 15:02 | Počet prečítaní: 5560
Do you see yourself working with us? Check out our vacancies. Is your ideal vacancy not in the list? Please send an open application. We are interested in new talents, both young and experienced.Join us