Wednesday, February 29, 2012

OBPM 11g And Human Workflow Services

In this posting I describe a case in which I demonstrate the working of the Human Workflow Services of the Oracle BPM Suite 11g. Or rather the SOA Suite 11g, as it is used for human workflow in BPEL as well.

But before I do so, a brief explanation of what the Human Workflow Services is.


So What is it?

It probably is the most used part of what also is known as the SOA Suite API. The Human Workflow Services provide services to, how surprising, handle human tasks. But there also is an API for Oracle Business Rules, B2B, and the User Messaging Services, to mention a few others.

Ever worked with the OBPM's Workspace or Worklist? Just realize that practically all data you see in there and all actions you can perform are provided by the Human Workflow Services. If you ever need to provide a custom worklist, for example to embedded it in some 3rd party application, the Human Workflow Services is what you will be using.

The most commonly used services probably are the following:
  • TaskQueryService To provides operations to query tasks, based upon keywords, category, status, business process, attribute values, etc.
  • TaskService Provides single task operations, to manage task state, to persist, update, complete, reassign, or escalate tasks, etc.
  • IdentityService To authenticate users (when loggin on into the workspace), to lookup user properties, roles, group memberships, etc.
Other services are the TaskMetaDataService, UserMetaDataService, TaskReportService, RuntimeConfigService, and TaskEvidenceService.

Except for the IdentityService all other services have both a SOAP as well as a remote EJB interface. The IdentityService is a thin SOAP layer on top of WebLogic.


How to Use It?

All services require authentication, except for the IdentityService (obviously). Authentication is based upon a user name/password combination or a previously determined login token. It is a best practice to only authenticate the user once per session, using a user name/password combination. The engine will instantiate a workflow context (similar to a servlet context) and returns a token that references the workflow context. This token can then be used in successive calls to the API. This prevents that with every call a new workflow context needs to be instantiated, which is a relatively expensive operation.



It is also a best practice to use identity propagation of an already logged on user, which in case of SOAP can be done by passing on a SAML token. All SOAP services (except for the IdentityService) have two different end points: one that requires a SAML token and one without. To prevent getting frustrated because of problems with authentication, be aware that when using a tool like soapUI the default end point probably is the SAML one. If you cannot use identity propagation, you will be using the TaskQueryService.authenticate operation to get the workflow context token.

A typical pattern to execute a human task, would be as follows:
  1. Requiring a token using the TaskQueryService.authenticate operation,
  2. Getting a list of tasks based upon some filter using the TaskQueryService.queryTasks operation,
  3. Acquiring (locking) a specific task for execution using the TaskService.acquireTask operation,
  4. Updating the payload of the task using the TaskService.updateTask operation,
  5. Setting the outcome (commiting) the task using the TaskService.updateOutcome operation.
Hereafter I will give an example of this 5-step pattern to execute a human task.

The addresses of the WSDL's are not too consistent, I suppose to prevent us from becoming lazy. The address of the TaskQueryService WSDL is:

http://host:port/integration/services/TaskQueryService/TaskQueryService?WSDL

The address of the TaskService WSLD is:

http://host:port/integration/services/TaskService/TaskServicePort?WSDL


Executing a Human Task Example

Step 1

To get a workflow context token, the following request would give me one for the user "cdoyle" with password "welcome1":



The response will be a <workflowContext> element with a <token> in it that can be used in successive calls.


Step 2
Now I can query tasks for the user cdoyle. Let's assume I want to query all tasks that either are assigned to the group cdoyle belongs to or explicitly have been assigned to cdoyle. I can use the TaskQueryService.queryTasks operation with the following query (the simplest I can think of):



As you can see the token has been copied into the request. To get all tasks I have set the <taskPredicateQuery> attributes startRow and endRow to 0. I could also have left these attributes out all together. The startRow and endRow attributes support paging of tasks, which can be handy in case of a custom worklist. The response is a <taskListResponse> with a list of <task> elements. Each <task> element has subelements like <title>,
<priority>, and <taskId>.


Step 3

The <taskId> uniquely identifies the task instance, and is used in the next call to the TaskService.acquire operation, to lock a task, for example:



The response of this operation will contain a <payload> element which is of type anyType and contains the human task payload as configured in the process. In my example the payload concerns a (how original!) a sales

<QuoteReqest> element:



The response also contains a <state>, <substate> and <taskId> elements, that will show that the task has been assigned and acquired:


Step 4

Now let's assume that this is the payload of a Review Quote task, and that I want execute that task by updating the quantity to 2 and setting the status from "new" to "OK".

To update the payload of the task, I use the TaskService.updateTask operation. This has a lot of attributes. I will keep it simple, meaning that I don't add attachments or comments, etc., so for me it suffices to copy and paste the complete <task> element from the response of Step 3 into the <task> element of the request:


In its response it will give the updated payload, and (among a lot of other things) it will say who did the update and when:


Step 5

To commit the task, I use the TaskService.updateOutcome operation. You will also find that this operation has a lot of attributes. I will keep it simple again, and copy and paste the complete <task> element from the response of Step 4 into the <task> element of the request of the TaskService.updateOutcome operation (left out a lot of the elements for reasons of brevity):



If you watch carefully, you will see that the <taskId> is both in the <systemAttributes> subelement of <task> as well as a separate <taskId> element of its own (at the bottom). The latter one is used to determine the task instance.

The value I entered for outcome, has to correspond with the possible outcomes I defined for the Human Task definition:



In its response this operation will give back the changed payload, plus a number of other elements, among them the <state> element that will have the value COMPLETED now:


hAPI programming!

Wednesday, September 21, 2011

Tips for Installing Oracle BPM Suite 11g FP4

Edited on October 20, 2011 regarding the location of OPatch (due to progressive insight, and some comments).

When installing Oracle BPM Suite 11g FP4 I ran into a couple of things, of which I thought I better write that down for some next time. If you are a SOA Suite install crack, don't bother to read on, as I probably have nothing new to tell you. In case you are new to it or do installations only occasionally, you might find this saving you considerable time. It would have done so in my case.

You typically install the SOA/BPM Suite on top of WebLogic. The MW_HOME is the (middleware) folder containing the wlserver_10.3 folder (among others). The Common Oracle Home will be [MW_HOME]\oracle_common, while the SOA_ORACLE_HOME will be [MW_HOME]\Oracle_SOA1. In the readme for the PS4 installation ORACLE_HOME refers to both, so read the instructions carefully.

The first instruction is to make sure you have the latest OPatch. When you download it, you will find that the instructions of OPatch itself say you can find OPatch in ORACLE_HOME. There actually is one in both ORACLE_HOMES. Probably the same one, I did not bother to find out and copied the download OPatch to both folders.

The instructions are particularly written for Unix, so needs some "translation" to make it applicable for Windows:
  • Where it reads "$ORACLE_HOME" you should replace that by "%ORACLE_HOME%" (duh!)
  • To patch the Oracle Common Home it tells you to use the following command:

    $ORACLE_HOME/OPatch/opatch napply -invPtrLoc $ORACLE_HOME/oraInst.loc

    It took me some time to find out that the invPtrLoc only applies to Unix only, and that for Windows you can simply leave it out. On Windows the inventory information is located in the registry instead of the oraInst.loc file. So the command for Windows is simply:

    %ORACLE_HOME%\OPatch\opatch napply

PSA stands for Patch Set Assistant. I skipped the backup of the database, because as a developer I can simply recreate the SOA INFRA any time without loosing any valuable information.

The instructions will tell you to run PSA from the ORACLE_HOME\bin folder. Now that's a bit confusing as there is a psa.bat in the bin folder of both ORACLE_HOME's. But if you read the PSA instructions carefully, you will find it refers to SOA_ORACLE_HOME ([MW_HOME]\Oracle_SOA1. An educated guess already made me already think so.

If you are using OTN you may not be referred to the proper post-installation guide. The one it currently points to, is the post-installation steps for Oracle SOA Suite for Healthcare Integration. If you need that do that first, but then you still have to do the BPM post-installation instructions.

BTW, this guide discusses the commands for Unix as well as Windows, and specifically uses SOA_ORACLE_HOME. But that's for weenies, and not us developers, as we like finding out the hard way, right?

While I'm at it I might as well past the command I used for updating the policy store, as it may just fit your environment as well:

wlst.cmd %soa_oracle_home%\bin\bpm-ps4fp-upgrade.py --username weblogic --password welcome1 --wlsHost localhost --adminServerListenPort 7001

The post-installation instructions tell you to delete the DOMAIN_HOME\servers\...\tmp. Many of us developer probably choose to deploy the SOA Suite on the Admin Server, so the only servers\tmp folder you then have is DOMAIN_HOME\servers\...\AdminServer\tmp. According to the documentation about domain configuration files, you can simply delete the contents of that folder, so that is what I did. Have some patience, as that folder contains GB's of files.

If you followed my example, the next post-installation instruction may make you start cursing, as it will tell you to copy some library into a sub-folder of the tmp you just deleted. I, on the contrary, kept my usual cool, and just started the server. I still kept my cool when looking at several exceptions, not recalling if those were new, of whether I've seen those before. So I bounced the server and found that the exceptions disappeared. Also the WebLogic Console and the Enterprise Manager appear to function normally (pfew!).

I stopped the server, and continued with task 3, regarding copying the jar file adflibSOAMgmt.jar. And bounced the server again.

Finally, the readme on OTN mentions that you should have a soa-jdev-extension.zip. The one I have also mentions a bpm-jdev-extension.zip. Both instructions do not mentions to actually install them. I did both in the usual way (JDeveloper -> Help -> etc.).

That's when I was ready.

Tuesday, September 20, 2011

Oracle BPM FP4 Is Out!

Finally, it's there, the long awaited Feature Pack 4 for the Oracle Business Process Modeling Suite.

Instructions for Customers to get this are as follows:

  1. This is available as a patch under the following bug id: Patch 12413651: SOA PS4 BPM FEATURES PACK

  2. The patch is password protected and is available to those BPM customers that request it from support by filing an SR

  3. It is intended for use by BPM customers only. SOA Suite customers should check with Support and Product Management before requesting it.

Information on PS4FP will be blogged at http://blogs.oracle.com/bpm soon.

Documentation is available at http://www.oracle.com/technetwork/middleware/soasuite/documentation/11gr1ps4featurepackdoc-462677.html

Wednesday, September 14, 2011

OBPM 11g: Showing More Detailed Log Info

One of those too stupid to be discussed items is how you can make the SOA Suite show detailed information about the payload for activities like a script activities, or what is going on inside a business rule. After all, every SOA/BPM developer is assumed to know how to set log levels, right?

Well every developer is also assumed to know what they say about assumptions, and how frustrating it is to loose valuable time on finding out how to do simple things. So bare with me while I state the obvious.

Showing Detailed Payload Information

When the audit level is set to Production (which seems to be the default), only data associations for asynchronous activities are logged. You can see which level you are using, e.g. in the Audit Trail page, as shown below.



Because I have set the log level to Development, I do not only see detailed information about the payload that left the Handle Time-out sub-process, but also of the instance system fault.

This log level can be set in the Enterprise manager, but (as the pop-up with the information indicates) not in the Log Configuration, but in the SOA Infrastructure Common Properties. You can find it as shown below.





Show What's Going on in Business Rules

Another one of those "too obvious" things is showing detailed information about what is going on inside a business rule.

When you ask you always get an answer like: "You can turn on debug tracing in the Rules SE by setting the log level for oracle.soa.services.rules to TRACE:32 to get more detailed logging of what is happening." Absolutely a valid answer, but when you have not had to much exposure to setting log levels, this can take you some time to find out how to do.

This is done by changing the Log Configuration, as follows:



Friday, August 12, 2011

Oracle SOA/BPM - Searching and Reporting Using Process Payload

For searching business process instances using specific attributes from the payload, the regular way to do so when using the Oracle SOA Suite is by using mapped attributes (formerly known as flex fields).

Using mapped attributes is pretty straight-forward. You configure them in the Administration tab of the Workspace, and map a specific element of the payload onto a mapped attribute. Once it has been mapped, the attribute can be added as a column to the task list and is available for filtering. The mapped attributes can also be used in custom code via the API.


Things to Consider

Mapped attributes have some important aspects to consider:
  • They can only be used for simple type attributes (String, Number, Date),
  • Mappings are task-specific, so to be able to search for example on an order.status element throughout the process you have to map it for each activity,
  • There is a limited amount of mapped attributes (20 Strings, 10 Number and 10 Dates),
  • Changes to mapped attributes are only applied to instances instantiated after the mapping took place,
  • When instances are purged all historical data of those instances will no longer be available. In a production environment, purging of instances typically is done by a Systems Administrator with no (functional) knowledge of specific processes.
Especially the latter two aspects may require a different approach to secure full flexibility regarding searching and reporting on instances. This might for example be the case when there is a requirement that historical data should be kept indefinitely, or should only be purged in a controlled way by a Applications Administrator. In case of BPM, the requirement for a flexible approach on searching and reporting on process instances is pretty common.

In such cases an alternative to using mapped attributes (and reporting using the dehydration store) is to have a some custom database in which significant updates to process data are being stored. The advantage over using flex fields would be that:
  • There is no limitation in the amount of attributes,
  • The data of old instances can be manipulated, e.g. by providing default values for new attributes,
  • Management of the custom database can be delegated to some Application Administrator that does have (functional) knowledge about the process.
The advantage of not needing to create a mapping per task, will obviously be over-compensated by the fact that the process has to do a service call every time the data needs to be saved, but again this buys back a lot of flexibility.

Instead of using service calls to save this data, you may consider composite sensors. A composite sensor is a specific type of BPEL Process Manager Sensors. Be aware though that composite sensors can only monitor incoming and outgoing messages, and not changes of the payload within a process instance. For this reason in most cases this won't be an alternative.

Tuesday, August 09, 2011

Using JAXB for Manipulating Payload of Human Tasks in SOA Suite

In some cases you may want to manipulate the payload of a human task of an OPBM or BPEL process instance using JAXB. An example would be when you are using some other framework than ADF Faces for creating the UI, and you want to work with Java objects instead of manipulating XML programatically.

To do so with JDeveloper, you can generate the JAXB content model by right clicking the xsd and choose "Generate JAXB x.x Content Model".




Be aware that you must do this using the human-task-specific payload, and not the xsd that was used to define the variable that gets passed into that human task, otherwise to your sad surprise you will get all kind XML validation issues when trying to push the data back to the process. Fortunately on its turn the xsd of the human-task-specific payload imports the original xsd, so when the original xsd changes, the human task specific payload automatically changes with it. You still have to regenerate the JAXB content model to let it reflect the changes.

The following picture shows the OrderCreationPayload.xsd of an OrderCreation human task. It imports an Order.xsd. The JAXB content model has to be generated using the OrderCreationPayload instead of the Order.


Friday, June 03, 2011

DWM FT and Hyperion BPM Solution Workbench for Essbase Retired

As of December 2010, OUM provided full support - Estimating, Delivery, and Training - for Business Intelligence (BI) Custom engagements (including Hyperion Essbase). This support represented a major milestone in the evolution of OUM and enables BI Custom (including Hyperion Essbase) practices to transition from the legacy methods to OUM.

The following methods and their associated estimating models therefore have been officially retired:

  • Oracle Data Warehouse Method Fast Track (DWM FT)
  • Hyperion BPM Solution Workbench for Essbase Engagements

Tuesday, May 24, 2011

Use Cases or User Stories

When teaching use cases, a question that comes up now and then is what the difference is between a use case and a user story as used on agile projects. There is a lot to be found on the internet discussing this. Two useful references and a start for further investigation are mentioned below. What I try to do here is capture my conclusion of these discussions. But before coming to this, let's briefly discuss what is what.


User Story

A user story is a short statement about what a user wants to do, and why. A user story typically fits on an index card. The idea is that the development team uses this user story as a starting point of a conversation with this user about how this should work in practice, to get an understanding of what needs to be done to support that.

On some projects a particular format is being used for user stories, being "As a ... I want ... so that ...". Reviewing this format it becomes clear that the first ... can be compared with the actor of a use case, and the last one with the goal of a use case (although in many cases tend to be finer-grained). So the big difference apparently is in the middle, where it is described what the actor does to achieve that goal.


Use Case

Next to specifying a goal, a use case captures one or more scenarios describing the interaction between an actor and a system to achieve that goal. Scenarios may be captured using a format like:

1. This use case starts when the actor does ...
2. The system responds by doing ...

3. The actor does ...
...
x. The use case ends when ...


There is one main success scenario (happy path), there may be one or more alternate scenarios (other ways to achieve the same goal), and there may be one or more exception scenarios (describing what happens when that goal is not achieved).

You also capture what triggers the use case (which in many cases will be repeated as the first sentence of the main success scenario), pre-conditions (what needs to be in place when the use case starts), and post-conditions (what will have been achieved when the use case ends).


What's Different?

So, apparently, a use case elaborates more on what the actor does to achieve a goal. A user story has just one statement regarding that and, compared to a use case, concerns just one scenario. Also, compared to a user story, a use case adds a trigger, pre-conditions and post-conditions to that.

Some people say that use cases capture too much detail, and claim that user stories are better for this reason. Other people state that in practice user stories tend to oversimplify things, resulting in the first iterations taking much more time than anticipated. The way to resolve that is by elaborating more on the user story. When you think about it, that makes sense, doesn't it? I mean, at the end of the day even on agile projects the developers need to deal with details as well. They only may do it in a different way.


Conclusion

In my opinion the core difference has best been captured by a guy called Jim Standley who stated that a user story is a promise to have a conversation and a use case is the recording of that conversation.

So rather than arguing if user stories are better than use cases or vise verse, I think the better question is: "How formal do you need to be?". The more formal, the more appropriate use cases start to become.

Added to this, you should also think about "When do we need to be this formal?". I can imagine systems being developed starting with user stories, and then write use cases after the fact, because some external testing team requires that, or because the customer needs it for system maintenance.


Some Suggestions

If you are on an agile project creating use user stories, but you are required or may need to create use cases later on, make sure that a user story matches exactly scenario, and name them uniquely. That should not be too difficult.

Then, when the user stories have been realized and you need to deliver the use cases, you can then use the name of the user story as the name of the corresponding scenario. You combine all user stories that share the same user goal into one use case. Add the trigger, pre-conditions, and post-conditions to that, stir for one minute, and you're done!


Further Reading

Stellman/Green: User Stories vs Use Cases

Discussion at Allistair Cockburn: A user story is to a use case what a gazelle is to a gazebo.

Tuesday, May 10, 2011

Old Methods Die, Long Live OUM!

Just wanted to let you know that the retirement of the following methods is planned for June 01, 2011:

* Oracle Data Warehouse Method Fast Track (DWM FT)
* Hyperion BPM Solution Workbench for Essbase Engagements

Thursday, March 17, 2011

OUM 5.4 Has Been Released!

Yesterday OUM 5.4 has been released. Among other things, the following improvements has been made:
  • Tactical SOA View added
  • Various techniques regarding monitoring and improving SOA (instrumentation)
  • A white paper about how to apply OUM with Scrum
  • Several SOA templates
The Tactical SOA View helps to get up-to-speed with OUM on SOA projects that do not (directly) have an enterprise approach.

The templates concern a Service Contract, a Service Catalog spreadsheet in case you don't have an Enterprise Repository, and some more.

Check it out!

Thursday, March 03, 2011

Installing OBPM Suite 11g PS3 using XE

When installing the OBPM Suite 11g PS3, I ran into an issue with the Metadata Services (MDS) schema on my XE database. The error I got when I tried to start the WLS SOA domain was "ORA-04063: package body "DEV_MDS.MDS_INTERNAL_SHREDDED" has errors". I checked the schema and found that all three existing packages were invalid. Recompile did not solve the issue.

I Googled a bit and found out that I had to re-run the Repository Creation Utility, as apparently there is an extra environment variable to set before you run this. I fixed it as follows:
  • Open a dos-box in the ..\rcuHome\bin folder
  • Enter: set rcu_jdbc_trim_blocks=true
  • Run rcu.bat
  • Drop the existing repository
  • Recreate a new one
  • All invalid objects disappeared!
BTW, the tips in a previous posting, are still valid. Especially the one regarding setting the JVM memory setting of the WLS SOA domain:

set DEFAULT_MEM_ARGS=-Xms512m -Xmx768m

Wednesday, October 13, 2010

OPBM and External Activities

I'm currently involved in a project where OBPM 10g is being used in combination with another system providing the user interface.

The idea is that this external system (let's call it system X), polls the engine to find out if there is a task to perform by some logged on user, and if so supports that task as (what is called) an external activity. This polling mechanism would allow you to go from one activity to another where each activity supports one single screen. As a result you are basically modeling a screen flow rather than a business process.

The problem is that you cannot model the screen flow 100%. Think for example about a screen that should provide a pop-up to do some things and then return. There is no (reasonable) way to use OPBM to support this pop-up functionality.

Another problem becomes apparent when you need to call services inside a screen flow. What are the criteria to decide whether OPBM or system X should call the services?

After a couple of weeks and progressive insight, I have come to the conclusion that you should try to prevent modeling a screen flow as a process. So my guideline is to let system X handle the complete screen flow (including the service calls that are specific for that screen flow), in a similar way how you would use a native OBPM screenflow. That really makes life simpler. More over, if you later decide to implement the screen flow in OPBM instead, there is a straight-forward "migration" that won't impact the business process itself.

Monday, May 31, 2010

Some Tips for Installing Oracle BPM 11g on Windows XP

Some tips to get Oracle BPM 11g running on Windows XP, that you may not easily find in the documentation available.

What to collect before you install Software used:
  • Oracle 10g XE Universal
  • Repository Creation Utility 11.1.1.3.0
  • Weblogic 10.3.3 + Coherence - Package Installer
  • SOA Suite 11.1.1.2.0
  • SOA Suite 11.1.1.3.0 (patch on 11.1.1.2.0 with BPM)
  • JDeveloper 11.1.1.3.0

When it is not possible to connect JDeveloper to the internet for a check for update:
  • soa-jdev-extension
  • bpm-jdev-extension

Install the software according to the Quick Installation Guide for Oracle SOA Suite as can be found on the Documentation for Oracle SOA Suite page. On XP I did not need to configure anything out of the ordinary. You can install it in the order listed above. Do a typical install of the SOA Suite in a new Oracle home, e.g. named Oracle_SOA1 (the default). Right after that install the 11.1.1.3.0 patch the same way you installed 11.1.1.2.0.


BPM Domain

Create a domain for the BPM Server, using the config.cmd in the [ORACLE_HOME]\common\bin. On the Select Domain Source tab select:
  • Oracle BPM Suite
  • Oracle SOA Suite
  • Oracle Enterprise Manager
  • Oracle Business Activity Monitoring
  • Oracle WSM Policy Manager
  • Oracle JRF - 11.1.1.0

Call the domain e.g. bpmdomain. Use the Sun JDK, and configure the JDBC Component Schema according to the schemas created by the Repository Creation Utility.

On the Select Optional Configuration screen you now have the option to select a single server or managed server configuration. Due to restrictions in the way XP uses memory, choose the latter by NOT checking anything and just press Next. This will result in a separate admin and BPM server.

Once finished, locate the setSOADomainEnv.cmd file e.g. in the [ORACLE_HOME]\user_projects\domains\bpmdomain\bin\ folder. Change the memory settings as follows:

set DEFAULT_MEM_ARGS=-Xms512m -Xmx768m

I could not get it running with -Xmx1024. Do not set -Xms512m to 768, as that will result in both servers taking a minimum of 768 Mb, and also a significant longer start-up time.


JDeveloper

In JDeveloper create an application server connection to the admin server, pointing to the bpmdomain (in my case), and test the connection. All 9 tests should succeed.

To prevent a 502 error while deploying without any further information about what is going wrong, make sure you disabled the proxy settings in JDeveloper.

Wednesday, May 12, 2010

BPM 11g Generally Available

You may already have noticed that BPM 11g is generally available. As BPM 11g runs on the SOA Suite, it would not be correct to call it the "BPM Suite" anymore. As a matter of fact, BPM 11g currently is only available as a patch on the SOA 11g Suite.

To run BPM 11g on your laptop you will need the following:
  • Oracle Server (to setup a playground environment Oracle Server 10g XE is good enough)
  • Weblogic Server 10.3.3 (unless you need it for something else, without OEPE)
  • Repository Creation Utility 11.1.1.3.0
  • SOA Suite 11.1.1.2.0 (SOA Suite 11g)
  • SOA Suite 11.1.1.3.0 (which includes BPM and is a "patch" on 11.1.1.2.0)
  • JDeveloper 11.1.1.3.0
  • JDeveloper extensions for SOA and BPM (via the check for update feature of JDev)
Excluding the database, for Windows that is 769 MB + 254 MB + 1.7 GB + 1.9 GB + 1.2 GB + 262 MB, is uh ... only 6 GB! Goodbye "next-next-finish", and hello download managers!

The good news is that for the same money you also get all the rest of JDeveloper and also BPEL with that!

Thursday, April 29, 2010

BPM & Use Cases, Who's Counting? Revisited

Whenever I have questions about use cases myself, I grab my use case bible which is Writing Effective Use Cases from Alistair Cockburn. One of the sections in that book is named Your Use Case Is Not My Use Case, which discusses that different people writing use cases for different purposes or audiences, may write use cases differently. This posting I also could have named My Use Case Is Not My Use Case, at least not at Different Points in Time, as you will soon find out.

In one of my earlier postings called BPM & Use Cases, Who's Counting? I discuss an example and suggest that some automatic notification activity is part of the preceding interactive activity. Then in a total different context I noticed myself arguing to a colleague that a notification in her use case model was a use case of its own. It then realized that in general this is a better approach.

The following example will show why:


Assuming that the Customer is not a direct user of your system, for the Notify Customer activity you could argue that it would be part of the goal of the Account Manager to notify the customer. But for the Notify Warehouse I find it way more intuitive to claim that it is a goal of the Shipping Clerk to be notified that there is work to do. But that would imply that the first notification would be part of the Review Order use case, while the second notification would be a use case of it's own. Does that sound inconsistent or what?

So I therefore want to change my opinion and suggest that in principle you should consider a notification activity to be a use case of its own, having the one being notified as primary actor (i.e. having the goal). Make sense, not?

Wednesday, February 24, 2010

Why in Oracle BPM Automatic Activities Belong to the Automatic Role (at least one of the reasons)

Strictly speaking, an automated activity does not have a human actor as role involved, and from that perspective the automated one does not belong in the swim-lane of that role, but in the one of the "automatic" role instead.

You may say that this is smells like over-designing the thing, and moreover it takes extra space, so rather not.

But there also is a practical edge to this. I happened to notice that there are certain circumstances in which automatic activity can actually show up in the workspace of people having that role. That can happen when the automatic activity takes some time to complete, and (if memory serves me well) I also saw this sometimes happening with timers. Very confusing for the user, because it looks like he or she has something to do, while the workspace does not allow doing so.

I therefore recommend always to put automatic activities in the "automatic" role, at least once you start implementing the process. The obvious exceptions being automatic activities inside a screen-flow.

How to Recognize the Requirements in Use Cases?

One of the core values of using a method is that it provides a common "language". That holds for all kind of methods, including those for software engineering. It for example helps when everybody has a same understanding of what a "use case" is. It also helps to have a common format for use cases. Similar to the agreement that (at least in the western culture) we write from left to right, top to bottom, contents at the beginning, index at the end. As is the case with a book, you will appreciate that a common format for use cases not only helps those writing them, but especially those reading them (business as well as IT people).

Next I will discuss a format that I have learned to appreciate very much, and can recommend to everyone who is writing use cases.

If you have not already decided upon a common format, or when you have the opportunity to do so, you may consider writing use cases in a two column format. I learned this technique more than a year ago from a great guy called Vince Bordo (hi Vince!). I practice this technique since then, as I find it to be more effective than what I used to do (i.e. a one-column format).

In practice this looks as in the following example, which is a reformatted version of a use case I used in some previous posting:


The beauty of this format is that it visually depicts what the system needs to do in order to satisfy the requirements, as that is exactly what the right column is about. The left column describes how actors (primary as well as secondary) interact with the system in order to satisfy the goal of the use case.

In theory (I would not try this in practice, but in theory) you should be able to cut out the right hand column of the use case and only hand that over to the developeras and tell them that this is what they need to realize. That, plus the supplemental requirements of course.

Thursday, December 03, 2009

Use Cases, Explaining Main Success, Alternate and Exception Scenarios

Once you understand the difference between a main success scenario, an alternate scenario and an exception scenario, you may wonder why it took you so long to get there. The reason probably being that the explanation was pretty abstract, talking about scenario's that do or don't have the same goal, post-conditions that add to or are instead of those of the main success scenario, blah, blah, blah...

Having gone this road myself, I started to wonder if there is a simpler way to explains what should be pretty natural for most of us. And as always, finding an example that relates to day-to-day life did the trick for me to explain it to others. The example being the following.

Suppose that have to drive from A to B. Your goal being to be in time for a customer meeting. The post-condition being that you successfully reached your destination in time.

So the main success scenario is that you drive from A to B, without interruptions.

An alternate scenario would be that you have to take a small detour by going through a gas station to get some gas. An extra post-condition this detour might add to the one of the main success scenario, could be that you have to obtain the gas bill, otherwise you employer won't cover your expenses.

An exception scenario might be that your car breaks down, and you will never be in time for the customer meeting. A post-condition of this exception scenario might be that you have to inform you customer that you have to cancel the meeting. This post-condition replaces the post-condition of the main success scenario.


Other exception scenario's might concerning a serious traffic jam, getting busted for speeding, car-jacking, and so on.

Now that was not too difficult, was it?

Sunday, November 29, 2009

Is There Life After Oracle BPM Studio 10g?

Let me begin with the answer, which is: absolutely!

After a Thomas Kurian discussed the positioning of Oracle BPM (fka ALBPM) a year ago (is it that long? Yes it is!), I must admit I was worried about the strength of Oracle BPM being properly appreciated. For quite some time focus seemed to be solely on the Oracle BPA with BPEL (from the SOA Suite) combination only.

But times (and vision?) have changed since then. Recently I was in a conference call in which a preliminary version of BPM 11g was demo-ed. And I was surprised in a positive way. Oracle BPM 11g seems to preserve all the good of 10g, while at the same time it is really integrated with the rest of the product stack.


Some Things That Struck My Eyes

With BPM 11g Oracle managed to continue the ALBPM "experience" of easy process modeling and implementation. In a series of short iterations you transform the BPMN 2.0 process you collaboratively modeled with the business analysts in an executable one, without a paradigm shift like you for example would have when going from BPMN to BPEL. For me this always has been one of the major strong point of BPM. What has been added to this is a so-called zero-code environment of developing screen and including external resources (like services).

Some of the more technical features that I found appealing were:
  • Usage of the common adapter framework, as is already available in the SOA Suite,
  • Support for easy (ADF-Faces) development of rich task forms with AJAX support (without bothersome JSP development),
  • A web-based UI for modeling processes by business analysists,
  • Native integration with Oracle BAM,
  • A composite (SCA) view on business processes, which (among other things) supports native integration with BPEL,
  • Native integration with Oracle Business Rules,
  • Unification of the BPM and BPEL worklist,
  • With all this, an improved support for true Business Process Management.

What About The BPA Suite?

The positioning of BPA has not changed, but became more clear instead. BPA is typically for a more enterprise approach to business analysis, including a top-down approach to business process modeling, including BPMN. When you have a human-centric business process, you can decide to export these to Oracle BPM 11g. Otherwise, BPEL is the obvious choice.

Boy, I can't wait to get my hands dirty with BPM 11g, which hopefully will be somewhere in March 1010!

Friday, November 27, 2009

OUM 5.3 Has Been Released

November 13 there has been an announcement that the Oracle Unified Method version 5.3 has been released. As explained in a previous posting, we do offer OUM to our customers.


What's New?

Although the increase in version number (from 5.2 to 5.3) seems to suggest this to be a minor upgrade, some of us will receive as a major upgrade.

For example, this version includes an initial support for Business Intelligence (BI) and Enterprise Performance Management (EPM) implementation. We also added a view for Software Upgrades, which will help in in quickly determining which tasks to consider for an upgrade of Oracle software products, including middleware, database, enterprise application products and Business Intelligence solutions.

Regarding the other, existing views, a lot of improvements have been applied. Especially Envision (the focus area of OUM covering enterprise / business level aspects) has been upgraded, and is rapidly reaching a "mature" state. Two of the topics that I would like to point out are IT Governance and IT Portfolio Planning, mainly because I have been personally involved in that (sorry, too hard to resist)!


Training

Perhaps even more important than having a comprehensive method, is being able to provide training on that, and assist in applying the method. In the last year The Oracle Methods Team therefore has put considerable effort in creating various training modules, from high-level overviews that make you understand what OUM is all about, to more task-oriented modules around requirements gathering or analysis and design.

Customers won't find them in the curriculum of the Oracle University (yet) but don't let this keep from for asking for it, as we can deliver customer training.

See you in class!