Thursday, April 9, 2015

#394 Oracle Process Cloud Service coming soon

Check out the overview here

#393 BAM 12c Continuous Queries and Streams

First to the docs -

The Continuous Query Service (CQS) is a BAM-specific wrapper around the
Continuous Query Language (CQL) engine within the Oracle Complex Event
Processing Service Engine. The CQS is a pure push system: query results are delivered
automatically. The CQS supports both stream (non-persistent) and archived relation
(persistent) data objects.
When you create a query, the CQS sets up tables in the CQL engine, registers the
query, and listens for data changes from the persistence engine. The query result is
processed in the CQL engine, then pushed to the CQS and on to the report cache.

Now to the creation of a Continuous Query -
They act on Streams, so we have to begin by defining such a DO.

Stream DO

I will use a simple StockSale scenario here.

Here is my process -

Here are my BI settings -

I create a simple BAM dashboard to output stock symbol and price.

I output the salient data in a table -

I now create a DO of type Simple/Stream -

Note I specify one String column for the StockSymbol,
one decimal column for the stock price.

I add these via Add Column

Now, I add this new DO to my Designtime project.

Inserting Data into the Stream DO

In Designtime - I create an Alert to insert data
into the StockPriceStream1 DO - for sales over 500

Choose the option - When a data field...

I add an Action -

I do the data mapping -

I now create a high value stock sale.

I create the Stream DO Data tab

Create a Continuous Query based on the Stream DO

I want to detect duplicates on high price sales -

Note the rolling window I am using -

I will insert duplicates into a separate DO - DuplicateSales.

I realise that the above should contain custNr and orderNr but this
is just a quick demo ;--)

I add the new DO to the DesignTime project.

Now to the insert - I do this via an action, configured on the
Continuous Query -

Here is the list of available actions -

So I choose the last option - Insert values...

Map Fields -

Test by creating 2 processes for large orders with the same payload.

Here I see the  duplicate orders in the Stream,
on which the Continuous Query is based.

The duplicate has been detected and written to the
DuplicateSales DO -

#392 BAM 12c --> Data Retention, Hierarchies and Treemap views

Just some salient info on the above and other matters -

Data Retention

Click on the Administrator link and select your DO.
Click the Retention tab -

Note: Default 0 means that data will be retained indefinitely.


Here is my process payload - I will create a hierarchy supplier / product.

 First I create some BI indicators in the BPEL process -

I see these in the BAM DO -

I now create a hierarchy -

I now create a Tree Query -

Add a couple of more orders for different products, from supplier Nc Inc. 

Check out the business query in BAM -

TreeMap View

In a Treemap view, hierarchical data groupings are arranged in rectangles within
rectangles. For example, our hierarchy is supplier/product. The sum of price per product
determines the size of the rectangles, and their colors.
The treemap view is based on a tree query.

So I create one based on the above -

at the bottom, one see the actual values -

Now I add a couple of orders for various products from another supplier.

As you can see, the Tree view has been updated accordingly.

#391 BAM 12c --> Calculated Fields. Creation /Use of, in Business Queries

Very simple example here, based on the BAM example from post #389

Here I add a calculated field to the NCTestProcess DO -

Here is the expression -

I now go into Designer mode and create a new Business Query based on this DO -

Create a view based on the query -

Validate the results by doing a simple test -

Here I have an order for an iWay, whatever that is.
It's initial price is 1900. The discount of 10% will be applied.
That makes an end price of 1710.
Now VAT at 19% is applied to that, which gives us 324.9