Tuesday, July 7, 2015

OTN ArchBeat Podcast: BPM Challenges and Changes

I had the honor to be part of a great team of speakers and discuss the latest BPM challenges and changes in an OTN ArchBeat podcast that was moderated by Bob Rhubart.

Our OTN ArchBeat Podcast is a four-part series focused on Business Process Management.

The Conversation
  • Listen to Part 1:Take a seat at the virtual table as a panel of experts talks about how organizations are meeting some of the biggest BPM challenges.
  • Listen to Part 2: The expert panel panel shares insight into the Oracle BPM features they find the most useful, and how those features are being used to deal with real-world BPM problems.
  • Listen to Part 3: How does the new Oracle Process Cloud Service compare to Oracle BPM? The panelists talk it out.
  • Listen to Part 4: What’s the one thing you should know before starting your first Oracle BPM project? Advice you can use from people who know.
For the podcast show notes and additional and useful resources please consult the OTN ArchBeat Podcast page here.

Monday, July 6, 2015

Oracle BPM 12c Events (Part 3 of 3): Intermediate Events

The third and last set of events are referred to as "Intermediate Events" and as the name implies they can occur between the start events and end events.

"Intermediate Events" are sub-classified into two groups, "Catch Events" and "Throw Events".

"Catch Events" can occur anywhere in the middle of the process and what they do is that they block the process for specific conditions. We do have a variety of "Catch Event" activities such as a "Catch Message", a "Catch Timer" and a "Catch Signal" activity.

The "Catch Timer" event provides a delay mechanism in a process flow. The delay can be based on a specific date and time or on a recurring interval, for example, every day at a specific time.

The "Catch Message" activity is also used to model a request-response and receive-reply patterns. It is equivalent to a BPEL receive, so instead of having a "Send Activity" to call a service or a process and a "Receive Activity" to receive the response from a service or a process, you can use a "Throw Message" and a "Catch Message" respectively.

"Catch Events" also have a really nice capability as they can be attached as boundary catch events. What this means is that you can configure a task or a sub-process to listen to internal or external triggers.

For example, if a specific service does not respond back within a specified time frame to resume process execution.

Boundary events are either interrupting or non-interrupting. In the case of an interrupting boundary event the normal flow is interrupted and the exception path is taken. In the case of a non-interrupting boundary event then both normal flow and exception paths are executed. We usually use boundary events to handle exceptions.

"Throw Events" on the other hand can throw a message or a signal to another participant or process.

The "Throw Message" activity is used to send a message and is typically used to invoke an other BPMN process, a BPEL process, a SOA service adapter or a mediator that is exposed as a service.

The "Throw Signal" event activity is used to publish or broadcast a signal. You can use a combination of signal throw and signal start events to invoke multiple processes simultaneously.

So let's see how you can use a boundary event, more specifically the timer catch event as a boundary event, to wait for a service response. If the service doesn't reply back within a specified time-frame the process should terminate (but I will also be showing the non-interrupting feature of a boundary event).

For this demo I will need a service to simulate the order validation service. So i created a Java method to mock the order validation service and exposed it as a web service.

The order validation service is really simple; it accepts two parameters, an order id and another int representing the thread delay. The service just returns a boolean. The process will call this service and will pass it the delay. The service will wait for the supplied delay and return back a boolean based on the supplied order id.

Create the basic BPM application and BPM project with an asynchronous BPMN process that takes two integer parameters, orderId and serviceDelayInSeconds.

Create two integer process data objects to store the process arguments for reference throughout the process.

Assign the process arguments to the process data objects (on the "Start Message" select "Properties", "Implementation", "Data Associations" and drag source argument to target data object).

Next we will have to call the "Validate Order" service and to do so we need to first include an external reference to the service. To do so I will use a "SOAP Adapter" and I will drop it onto the "External References" swim-lane.

Enter a name for your service reference and in the "WSDL URL" enter the WSDL URL of your service.

In the "Localize Files" screen uncheck both copy options.

We will next use a "Service" activity in our BPMN process to call the service via the reference created above. So drop a "Service" activity between the "Start" and "End" events and give your service activity a name (i named it " Validate Order Service").

In the "Implementation" tab, from the "Type" drop down select "Service Call" and using the browse button next to the "Service" field select the validate order service.

The "Validate Order Service" requires two parameters to be passed; the order id and a delay in seconds. So using the "Data Associations" map the orderId and serviceDelayInSeconds data objects to the service's arguments.

Let's assume that if the service responds back in less than 5 seconds then the process should follow the normal path, otherwise the process should follow a different path. To simulate this alternative path I will use a script task.

The script activity is marked as error-ed; that's because it doesn't have an incoming or outgoing sequence flow.

Next we will define the timer boundary activity. Select the "Catch Timer" event and drop it onto the service task. Give your boundary event a name (for example; "Response SLA") and in the implementation tab define an appropriate timer definition (in my case I defined a timer expression of 5 seconds).

Please note that just below the "Implementation Type" there are two checkboxes; "Interrupting Event" and "Suspending Event". I chose the "Interrupting Event" option, meaning that when this event fires the token will leave the main process and follow the flow the timer defines.

Next add a default sequence flow from your "Catch Timer" boundary event to the script task and a default sequence flow from the script task to the "Message End" activity.

Deploy your process and instantiate a new instance of your process using the Enterprise Manager. Enter an order id (for example 12345) and in the serviceDelayInSeconds enter a number that is less than the configuration of your "Catch Timer", for example, 2.

Go to the flow instances and inspect your instance; the "Catch Timer" boundary event didn't fire and the process followed the normal path.

Run another test but this time enter a delay that is greater than the configuration of your "Catch Timer", for example 7. Inspect your instance, you should notice that the boundary event fired and that the process left the main path and followed the path defined by the boundary event.

Download sample application: Intermediate Events

Wednesday, June 24, 2015

FMW Updates: Oracle Integration Cloud Service (ICS)

Oracle Integration Cloud Service (ICS) is a simple and powerful integration platform in the cloud to maximize the value of your investments in SaaS and on-premise applications. 

It includes an intuitive web based integration designer for point and click integration between applications and a rich monitoring dashboard that provides real-time insight into the transactions, all running on a mature runtime platform on Oracle Public Cloud.  

ICS will help accelerate integration projects and significantly shorten the time-to-market through it's intuitive and simplified designer, an intelligent data mapper, and a library of adapters to connect to various applications.

Wednesday, May 27, 2015

Oracle BPM 12c Advanced Error Handling and Recovery - Part 2

The second part of my two series article on "Oracle BPM 12c Advanced Error Handling and Recovery - Part 2" has been published by OTN.

The second part explores the important error recovery changes and improvements that Oracle made from an operations and management perspective in Oracle BPM 12c.

Please do read it and give me your feedback.

Thursday, April 16, 2015

Creating the platform of the future with Oracle Fusion Middleware 12c

I'm thrilled to announce that my article, co-authored with Ronald van Luttikhuizen,  on "Creating the platform of the future with Oracle Fusion Middleware 12c" has been published by Oracle Scene.

This article shows how Oracle Fusion Middleware 12c offers one complete, modern, open and integrated stack that allows you to create a future-proof platform. Oracle Fusion Middleware provides mobile and web access from any device based on user and customer experience best practices. It enables applications to be responsive and to create valuable insights by incorporating big and fast data capabilities; and gives you control over both structured as well as unstructured knowledge-driven processes. It also has best-in-class integration capabilities, both between the products in the Fusion Middleware stack, as well as with other applications and data either running in the Cloud or on-premise.

Wednesday, April 15, 2015

Oracle BPM 12c Events (Part 2 of 3): End Events

End events define how a process should finish and just like with start events, processes can have more than one end event.

As you can see from the sample process below, we are provided with a plethora of end events that include a “None End” event,  a “Message Send” event, a “Signal” event and a “Terminate End” and “Error End” event.

The “None End” event is the default end event in a manual and reusable process and as it’s name implies, it is used when your process doesn’t need to perform any action upon completion. When all process instance tokens reach the “None End” event, the instance is completed.

The "Message End" event, as the name implies, will send a message before an instance completion and is especially useful when you want to trigger another process or instance. The "Message End" event has one unique particularity, it can only be used with either a message start event or a message catch event.

The "Signal Event" will publish a signal before completion.

The "Terminate End" is used to terminate, immediately, without any error handling, a process.

The "Error End" will throw an error before completion. This type of end event is used most commonly in subprocesses to trigger an exception to a main process.

Let's see how you can use these end events in practice.

Create the basic BPM application and BPM project (named both application and project "EndEventsDemo") and select "Composite with BPMN Process" in step 3.

 In the "BPMN 2.0 Process Wizard" specify a process name, for example DemoProcess and select "Asynchronous Service" as the service type and click "Next".

In the "Arguments" screen create an input argument to define the end event type as a user input to the process and click "Finish".

On the process canvas add a "None End", a "Signal End", a "Terminate End" and an "Error End" event. You should have a total of 5 end events for your demo process.

The new end events that you have added to your process are showing an error. This is because they don't have any incoming sequence flows. Therefore, place an exclusive gateway on the default sequence flow between the "Message Start" and "Message End" events and add conditional sequence flows from the exclusive gateway to a each of your other end event types.

Make sure that you define a condition expression for each of the non-default outgoing sequence flows. In my case, I've set the condition expression to the "Message End" type to bpmn:getDataObject('endType') = "message"

You should also notice a warning on the "Signal End" and "Error End" events. This is because these two end events don't have an implementation defined. So let's quickly implement these two end events.

For the purpose of this, I will create a new XML schema with a single element called "fraud" with a child string element called "transactionId".

Under the "Business Components" I have created a new "Business Exception" called "InvalidSSN" of error type string.

and created a new "Event Definition" called "FraudCheckEventDefinition" with an event called "FraudCheckEvent" of type "fraud " (the element type that I've created in my "FraudCheck" XML schema.

Go to your process and select the "InvalidSSN" exception type for the "Error End" event and the "FraudCheckEvent" for the "Signal End" event. 

Deploy your process and instantiate a new instance of your process using the Enterprise Manager. In the endType input parameter enter one of the values that you have defined in your complex gateway outgoing sequence flow (for example, "message").

Go to the flow instances and inspect your instance; you should notice that your process ended using the "Message End" event.

Initiate a new instance but this time use "signal" as the endType input parameter (assuming that your outgoing sequence exclusive gateway condition to the "Signal End" event is "signal"). Your process should have ended using the "Signal End" event.

Download sample application: End Events

Friday, March 27, 2015

Custom SOA Administrator

The default SOA administrator in a SOA/BPM installation is "weblogic". The SOA administrator, amongst other tasks, is the BPM Workspace administrator, the out-of-the-box web-based interface where users can access and manage their tasks. This is just fine for development and testing purposes.

However, at some point during your process lifecycle you will be faced with the task of creating and assigning a custom SOA administrator other than "weblogic" to serve your processes' administrative tasks, for example, mapping application roles to users and/or enterprise groups.

The first thing that you need to do is of course create your new SOA admin user using the Weblogic Administrator Console.

Next you need to point out to the SOA Infrastructure that James Cooper, as in the example above, will be the new SOA Administrator.

There are a couple of ways to do so.

The first and most easiest way is by assigning the "Administrators" group to your new user as in the image below.

The easiest way though is not always the right way. Doing so you are automatically granting access administrative access to applications like the Weblogic Console where you new SOA admin user can fiddle with your Weblogic settings.

A much better approach would be to map your new user to the SOAAmin application role using the Enterprise Manager. To do so, right click the soa-infra node and from the context menu select "Security > Application Roles"

On the "Application Roles" page enter SOAAdmin in the search box field and click on the search button. You should see the SOAAdmin application role displayed in the search results page and selected.

With the SOAAdmin application role selected click the edit button and in the "Edit Application Role" page click the "Add" button. This will open the "Add Principal" window where you can search for an application role, user or a group. Search for your user and click OK.

On the "Edit Application Role" click OK to apply the change. You will be redirected to the "Application Roles" page with the SOAAdmin user selected and under the membership for SOAAdmin you should see your new user.

The ultimate approach, and what I highly recommend, is to create a custom group on Weblogic Console, for example "MyAdminGroup", assign this new group to your user and add this new group as a member of the SOAAdmin application role.