Monday, August 25, 2014

#12 BPM 12c New Features- Debugging

Let's debug the fault handling demo process, from the previous post - in that scenario
process A (callingProcess) called process B (calledProcess) via the Validate activity.

Here is the calling process














Steps


1. Set the breakpoints in the process -














I set these on the Start and End activities.













You can also set these at composite level -





















2- Start the Debugger



















You can accept the defaults -



















Now you see this message -













HTTP Analyzer starts - here I can enter my test order data.


















The debugging session starts -




















Debugging is controlled by the following icons -































I click step into









I click step into again

Now control is passed to the BPM process -










I can also add breakpoints, whilst in the debugging session -





















We can view incoming data, via the Data tab -















The process variables haven't been assigned, as yet.
I click step into

Debugging halts at the newly created breakpoint on the Validate activity -
Here I can view/change the payload.

















I click step into again - control returns to the composite -








Here we are about to call the Order validation process.

Control now goes to the called Order validation process.








I have not set any breakpoints here - so I click -






Control returns to the calling process -




Simple, yet effective!

More info on the debugger itself in the JDev Guide available here














#11 BPM 12c New Features --> Fault Handling/Fault Policy Editor in Studio

Here is a simple example that demonstrates use of the new policy editor , available with 12c - 


This simple process checks if an order value >= 1000, if not the error is thrown.

Here is the End (Error) activity definition -


I deploy this process.

I then call this process from another one, in a separate project.


I test the happy path with an order > 1000

I also test with an order < 1000


Now I add an error handler to the calling process.


I re-test with a value < 1000


The error path is not taken -


I now add a fault policy to the project.

The following file is generated and the policy editor is active.

I now change the Default Action as follows -

This directs the BPM engine to rethrow the fault to the BPM process,
So that it can be caught and processed there.

Re-deploy and re-test


Back in the policy editor, we can make this handling more specific i.e. just for this LowValue error -


Other fault handlers can also be added -

Here I add one to handle remoteFault -


Here I specify retry as the default action.



The number of retries is configured here -


I re-deploy the calling project.

I then shutdown the called project.


I then test the calling project.














#10 BPM 12c New Features: Business Catalog Enhancements


Note: Bold / Cursive from the ORCL docs


















Some cool new features with 12c...

- Data Object Inheritance

- Data Object Business methods
 -- Covered in a previous blog post

- Enumerations


Data Object Inheritance


Inheritance enables you to reuse the data and behavior defined in a business object.
This avoids duplicating data structures and scripts, making maintenance easier and
less error-prone.
To use inheritance you create a business object as the child of another business object
that defines the attributes and methods that you want to reuse. The latter is called the
parent object.





OrderBO is based on the following XSD definition.













Here is the context sensitive menu for the business object -


















No opportunity here to create a Child Business Object.

Now let's look at another business object -




I create a BO based on Order.








Now, I can create the child object.













As you can see, I can add attributes and methods to the child object.

Enumerations


You can use enumerations to model a collection of values of the same type.
Enumerations enable you to check and restrict the values of a certain argument at
compile time, avoiding bugs and errors in runtime.

Example:

























Now let's validate our incoming order country attribute against the enumeration.

I can add a couple of entries here -










Leveraging Enumerations in your process

Example 2 follow ...