Renew BAM demodata

Recently I did a POC with BAM 12c at the customer. In a series of post’s I will describe my findings/experiences.
In the first post of this series I described the initial situation (Impact of ACM Implementation on BAM). This post ended up with the following challenge.

We have a ACM Case consisting of about thirty Case Activities. The Case and the individual Case Activities are housed in a private composite (1 + ~30 composites).

Challenge: How can we group/filter in BAM by ‘specific’ metrics that are present in each Composite. For example ‘ Department ‘.

In the Fourth post (Populating BAM using JMS) I described that I have used an oracle tutorial to Populate BAM in SOA using JMS. This tutorial and sample project can be found on the Oracle website. In the image below, you see the corresponding composite.


By calling this RequestService from different BPM processes BAM can be loaded with data via JMS). After that I went to work with this data in BAM to create dashboards. Hereby I ran into the following problem:
The dashboards that have to be developed have a data scope of 2 weeks. To test this properly I need at least 2 weeks of data. For this I created a dataset that contains data for 2 weeks. This data set, however, concerns the last 2 weeks. This means that the data actually been directly out-dated.

My challenge: How can it be ensured that the data is up to date?

Using the commandline tool bamloadgen it is possible to provide BAM with data. With this tool it is even possible to use placeholders to renew the data. But the options are limited to today and yesterday (For details see Oracle documentation). This means that bamloadgen is not suitable to renew data from 2 weeks.

I made my own solution.

I extended the above Composite with functionality to read and renew the testdata.

Via a File Adapter the testdata is read. This data then moves through the Datamanipulation BPEL.

Via a java embedded task the date fields in the test data has been updated before putting them on the JMS queue. The java code of this task is shown below.

I think most of the code is self-explaning.

There is one thing that I will explain separately anyway. The data set I’ve used contains dates from 1 to 14 October 2016. The number of days between today and October 14 is added to the dates in the test data file. In the code this is the value of the variable ‘days ‘.

In the code, classes are used that are not part of the standard JDK APIs. Therefore, these classes has to be imported in the BPEL process, using a special import element

That’s all for this post.
You can download this implementation here.

Inspiration for this embedded java step I got from a 4 year old post of Lucas Jellema.

First steps with Java Embedding in Oracle SOA Suite 11g BPEL 2.0 – useful API calls


One thought on “Renew BAM demodata

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s