Monday, July 21, 2014

# 331 - OEP 12c leveraging EDN Lab

Here is a simple lab that shows OEP and EDN in action.

With 12c, OEP now includes EDN adapters.























My simple scenario -

A SOA composite receives messages of type MyCCTx. It then publishes an EDN event, NewCreditCardTXEvent. OEP has an EDN inbound adapter subscribing to this event. It then processes the event, applying the following rules –

·         Individual transactions must be under €1000.
o   Those over €1000 will be highlighted as fraud.
·         During a ten minute time range, the total transaction values must be under €1500.
o   i.e. 2 transactions, on the same card, for 800€ and 900€ occurring within ten minutes of each other will be highlighted as fraud.

For each event, OEP will publish an EDN event – CreditCardTxCheckedEvent.


The SOA composite also subscribes to the CreditCardTxCheckedEvent event, published by OEP. It writes all results to a file.

My XSD is as follows -




















Here is the SOA Composite - it includes 2 Mediators



The OEP EPN is as follows -







The inbound EDN adapter subscribes to the NewCreditCardTXEvent.
The outbound EDN adapter publishes the event CreditCardTXCheckedEvent.

Full lab doc here




Friday, July 18, 2014

# 330 BAM 12c first impressions...and my first 12c Data Object / BAM Dashboard

I just installed BAM 12c and am now kicking the tyres -

login url is http://localhost:port/bam/composer























Looks excellent -

We have 3 main roles - Viewer, Admin and Designer






Admin



















Here is what our admin manages -














So now some basic 12c concepts - (text taken from the BAM docs)

What does BAM 12c give us?

Event Stream Analytics and Alerts
Oracle BAM provides real-time pattern matching, trend analysis, rolling-window 
computations, and both static and dynamic thresholds. The built-in Continuous Query 
Language (CQL) engine evaluates incoming event streams against business 
requirements and data patterns of interest. You can define these patterns with 
easy-to-use business query and Key Performance Indicator (KPI) templates, insulated 
from the underlying CQL. Furthermore, you can archive the event streams for fuller 
analysis later.

Based on these data patterns, you can implement a wide variety of alerts and actions, 
such as emailing particular users, recording data, or launching a web service. You can 
even daisy-chain alerts and define custom actions.

Process Analytics and Dashboards

Oracle BAM provides a rich set of ready-to-use dashboards for all major components 
of Oracle Business Process Management (BPM) and Oracle Service-Oriented 
Architecture (SOA) Suite. These dashboards include metrics such as task queue depth 
and bottleneck analysis of business processes.

Business Friendly Charts

With the adoption of Oracle Application Development Framework (ADF) Data 
Visualization Tool (DVT) components, Oracle BAM offers a wide range of intuitive 
visualizations that you can include in dashboards, including treemaps, scatter charts, 
bubble charts, and KPI watchlists.

Architecture





















So now to a simple example - 

Creating Data Objects 























Types -

Simple -

A simple data object is used as is. It can contain indexes and hierarchies, but no 
other column additions or modifications. It corresponds to a database view in the 
BAM database. Other data objects can use or refer to simple data objects.
Administrators create simple data objects for very basic data.

Derived -

extends a simple data object or another derived data object. It 
inherits the columns and hierarchies of the parent data object and adds its own 
columns. Administrators create derived data objects if additional columns are needed.

External -

An external data object references data that is persisted outside of Oracle BAM. 
When a connection to the external data object is configured in Oracle WebLogic 
Server, Oracle BAM can access it. The external data object name may be changed 
from the actual table name, but the column names are unchanged. Some columns 
may not be selected for visibility in BAM.

Logical -

A logical data object references data in other archived relation data objects. Unlike 
a derived data object, it is read-only and not a physical data object. However, it can 
do more than add columns. It can rename or hide columns, or add calculated 
columns. It can also join two or more simple or derived data objects. Typically, in 
compliance with process star schema standards, one source data object is a fact 
table consisting of measures, while the others are dimension tables.
Administrators create logical data objects to modify columns or to enable queries 
of data from two or more data objects.

Simple, derived, and external data objects are physical data objects, which can be 
modified and are mapped to database tables. A logical data object is read-only, is not 
persisted, references data in other data objects, and is most commonly used to join 
other data objects.

Before you can use a data object with other BAM entities such as queries and 
dashboards, you must create a project. A project references one or more data objects 
and contains entities based on these data objects.






















Continuous Query Type - 

Stream or Relation - I choose relation as this is a simple example.

Specify maximum numbers of columns with different data types - I just accept the defaults here.

















Now I add a couple of columns - these 3 are pre-seeded.























attribute - A data field that can be used for filtering or references

dimension -A data field that provides a type of grouping on which aggregation is performed, used 
for drilling. For example, order dimensions might be supplier and product.

measure - A numeric data field that can be measured and used in comparisons to evaluate 
business processes e.g. orderValue.
















I now add some demo data











Designer 

Designing a basic Dashboard


I now go to the Designer Tab - and create a new project -


























btw. Create BPM Example — Creates a project with data objects for Oracle 
Business Process Management (BPM) processes.

I click Create

















Now, I add my data object to the project.

































I now add a business query - SupplierQuery


I now create a Dashboard

























I add a pie chart to the dashboard.



I link it to the business query.

Click Apply and it's done!




I add two more views -


In order to set the threshold, I clicked on the business view editor icon - that is the one in the middle

Click on Display Properties















I change a couple of things and save the dashboard


Viewer

The viewer clicks on the Home link
Here I open my recently created project and then the dashboard













Thursday, July 10, 2014

#14 SOA 12c New Features - Encrypting personally identifiable information (PII)

Great new feature enabling the encryption of sensitive data such as credit card number or SSN.

Here is a simple example of a order process where I can encrypt the (credit card number) field.

Here is my order XSD.

















The BPEL process just assigns input to output.






















Here is the composite view -











Notice the lock icon on the exposed service. Here I have defined the encryption.

Steps -





























Select the data to be encrypted -























Note the key name -










I know this is probably preaching to the converted, however - to reiterate -
e.g. one needs to decrypt the ccnr before sending it on to the CreditCardValidation Service.










Now all we need to do is create the csf key.
We can use WLST to do this -

Open a CMD window in the following directory




















Enter the cmd:
wlst
then
connect("weblogic","welcome1","t3://localhost:7101")
then you will see the prompt
wls:/DefaultDomain/serverConfig>
enter
 createCred(map="oracle.wsm.security",
key="pii-csf-key", user="weblogic", password="welcome1", desc="Key for
pii_security_policy")

You will see the confirmation





Now deploy and test -

































Review the BPEL audit trail
















Now wasn't that easy!

Now to decryption -






The BPEL process now calls the credit card validation service - the argument passed is the ccnr.
So I need to decrypt before calling -


























































The web service's logic is pretty banal -









Deploy and Test