Oracle Real-Time Decisions and BPEL

This week, apart from some interesting client work, I've been mostly spending my free time finishing off the BI and SOA section of the new masterclass, and working on the section after that on Oracle Real-Time Decisions. Although I spend a fair amount of time in the new masterclass looking at the OBIEE basics - data modeling, data loading, building dashboards and so on - I thought it'd be interesting to look at some of the more "left-field" applications of OBIEE components, and as Oracle recently bought the Real-Time Decisions technologies from Sigma Dynamics, I thought it'd be interesting to bring this new tool into the masterclass and do a bit of an introduction.

I went throught the basics of a Real-Time Decisions project a few months ago when I worked through the tutorial (there's a much more comprehensive Oracle By Example walk-through now available on OTN), but for the masterclass, I wanted to show how a basic model was built and then interfaced into the world of BPEL and Service-Orientated Architecture. Now I won't go into the full details of the example - you'll have to come to the event for that - but at a high level, we have a BPEL process that assigns contracts to install satellite TV to one of a number of service providers. In the past, contracts were assigned based purely on who could offer the best price; now, we want to incorporate a number of factors, such as whether the supplier did the job once and didn't need to be called back, whether customers rated the supplier well in subsequent customer surveys, whether they commonly reject jobs, and so on. Moreover, we want Real-Time Decisions to use the past history of service provider events - survey scores, work rejections and so on - to predict, with increasing accuracy, which supplier will be most appropriate for a job, with the underlying predictive model getting more and more accurate as we provide it with feedback from the informants.

So, how is the decision model put together? Firstly, a new Inline Service is created using the RTD Design Center application, a customized version of Eclipse. Once the project is created, data sources are defined together with the internal data model - "entities" and "session variables" - that the Inline Service will use.

Then, "Informants" are created, which are the inputs into the predictive models that we'll create in a minute. Informants tell the Inline Service, for example, whether a supplier did the job within the required time, what the supplier scored in the subsequent customer survey, whether they rejected the job and so on. The BPEL process I'll create later on will provide values to these informants through BPEL variables.

Next, we create the list of choices for the Inline Service to make, which in our case are the list of service providers that the decision service can choose from. Then, we create a number of predictive models, one for each metric ("on-time performance", "customer satisfaction" and so on), and then define performance goals which we then link to these metrics to to allow us to emphasize, for example, arriving on time, minimizing cost, only needing one visit to do the work and so on.

Now, we create one or more decisions. Decisions are things such as "Provide the best performing service provider", and take the metrics available for each service provider and apply weightings to them, so that for example we might place more emphasis at one point on keeping the customer satisfied with cost minimization a lesser goal; later on, we might define a new decision that changes the weightings and provides a service provider much more based on their ability to get to the customer on time.

Finally, we define some Advisors, the interfaces "out" of the Inline Service, that will be called from the BPEL process to get a decision on, in our case, the best service provider. Each advisor uses at any one point a particular decision, this allows us to emphasize at the start, say, of a year, customer service, whilst at the end of the year, when the figures become more important, we can switch to a decision based more on keeping costs down.

After deploying the service and running some sample data through it to provide values for the models, I can then view the Inline Service using the Decision Center application, like this:

...and then incorporate it into a BPEL process, to be used as the means of picking the most appropriate service provider based on my current business goals, and the predictive powers of the KPI models I've created. Within the BPEL process, I pass values from process outcomes and variables back into the Inline Service via the Informers I created earlier, creating a positive feedback loop that'll help the models learn and make better predictions later on.

Note that the above BPEL process uses straight Java calls to invoke the decision engine, send values to the Informants and so on - in a real deployment, we'd use Web Service calls, Assign process activities and so on, but the Java client was faster to set up for us so we used it for the initial prototype.

Anyway, that's what I've been up to for most evenings over the past few days, and thanks to Michel, Pierre and the RTD team for working with me to get it all up and running. Other than that, as a bit of news I've been made one of those Oracle Regional Fusion Middleware Directors (they'll obviously let anyone in now...), Jon's Macbook hard disk self-destructed earlier in the week which meant he *had* to go out an get a new 4GB Macbook Pro to replace it, and we've set up a mailing list for Rittman Mead Consulting so we can send out the occasional newsletter about what Jon, myself and our team are up to, where we're presenting, any consulting and education special offers, and a few "exclusive tips" that we'll save for newsletter subscribers - sign up here if you're interested (promise, no spam).

Apart from that, some more dates are getting added to the masterclass agenda - We're doing another date in the Netherlands, so that's 6th and 7th September, and the 25th and 26th October, plus we're also doing Hungary on the 11th and 12th October - contact the local Oracle University offices for booking details, once URLs are available we'll put them on the Masterclasses page. Also, if you're thinking of coming to one of the one-day events in Hong Kong, Singapore, Austrialia or New Zealand, make sure you book up soon as Oracle will either give the events the go or no-go at the end of July, depending on numbers - so don't leave signing up too late otherwise it might get cancelled. For me now though, it's a weekend of kids' parties - it's our son's fifth birthday party on Saturday, there's one to go to before that, and two on Sunday, so no doubt getting to work on Monday's going to be a bit of a rest.

Have a good weekend....