Today, I am sharing my learning with SOA and BAM 12c Integration.
My requirement is to send payload from BPEL process to BAM 12c server for monitoring some of the KPI with respect to business flow.
As per my knowledge there is no BAM adapter in Oracle SOA 12c, So I have leveraged Variable sensors to do this. Here is the high level technical information before we get into in details. Variable Sensor trigger the action to populate desire payload into JMS queue. There will be EMS configured in BAM 12c to poll this JMS queue and populate Data object. Once you have payload in Data object, you can create view, dashboard of your desire.
1) Open BPEL process and click on change to monitor view which you will see on top right corner.
2) Now create variable sensor by selecting desire variable, in my case I am interested to publish incoming payload into Receive activity variable to BAM, so I am selecting Receive Activity variable.
Now define Sensor Action, In this example I am publishing to JMS queue. so provide the required details such as CF and queue JNDI names. Make sure CF and JNDI are targeted to BAM server as this queue will be polled by BAM EMS later.
3) Next, Go to http://host:port/bam/composer, BAM 12C comes with lot of new UI features. You can create your own project which acts as workspace for all your dataobjects, queries, Views and Dashboards.
So before we start defining any reports, first we need to define dataobject and EMS to poll the JMS queue for payload.
Click on Administrator Tab, Then Click on Data Objects which will pop up the Data Object Create Window, Here you will mention the name of data object, type(in my case it is Simple Data Object) and then you can select Query type as Relation and click on Create. For explanation on attributes of this window, Refer 4.1.3 section of oracle documentation:
Once you have Data Object definition in place, you can go ahead and add the columns which will be placeholders for incoming payload from SOA process.
Next, Click on Enterprise Message Sources ->Provide the desire name and click on Create.
Now, configure EMS with source and Dataobject details. Make sure you provide the exact JNDI of JMS queue which is used in sensor action.
Next, mention the XML formatting details such as Element Name and its namespace, It is little bit tricky. So what I do is I will take the copy of runtime payload from SOA instance and try to match root element and its name space of data I am interested to publish to BAM. This way you can avoid any confusion.
Last Thing is, mapping incoming payload elements with Data object columns.
Once you complete this basic setting, click on Start button on top. This will enable your newly configured EMS to poll the JMS queue and populate the Dataobject columns.
That's It!, Now go to Designer View and create your own Brand New BAM Project which act as workspace for your data object, Views and Dashboards. Now you will create Business Queries by selecting your desire Data Object. Once you create Business views out of newly created queries, you are all set to create your desire reports which can be tabular format, pie charts, bars and etc.
This is it. For BAM 12c new features and more details, refer Oracle BAM 12c documentation.
Happy Learning!!!