Monday, September 28, 2009

BPM & Use Case, Who's Counting?

(O)BPM and Use Cases

Business process modeling and implementation using the Oracle BPM Suite should be an iterative process. Because of that you try to postpone the need to create (paper) specifications as long as possible. After all, your running BPM prototype is the specification. Otherwise, while you are iterating, the paper specification would need to be changed as well, resulting in a lot of overhead which would not add much value, but cost the more.

However in some situations it me be necessary to create (preferably nearly after-the-fact) specifications, for any combination of the following reasons:
  • Acquire official approval of the detailed requirements
  • Support change control
  • Provide the base for test scenarios.
When your customer is standardized on use cases, that is a reasonable format for those specifications.

A Quiz

Now let's do a quiz and count use cases in a simple BPMN diagram that has been created with OBPM. For those that are not familiar with use case modeling: a use case captures requirements from the perspective of an actor that wants to achieve some goal using the system. So how many use cases do you count in the following business process, when for now you ignore the Receive Order by JMS activity?


The good answer is three. In case you had another answer, read on!

Counting Use Cases

The first use case is Place Order. The (primary) actor is the customer, and the goal is placing an order. The global interactive activity Place Order covers that, and will kick of the process. As a result the first thing that will happen, is that the system automatically notifies the account manager through the automatic Notify Account Manager activity. You may think this is the second use case, but consider this:
  • The notification is triggered by entering the order by the customer
  • The notification will take place immediately after entering the order, right after the user pressed the submit button.
So from the actor's perspective, sending the notification is part of the single-setting and a direct result of the actor's doing. The account manager is a secondary actor in this use case.

Still Not Convinced?

When your thinking was that the notification is part of the second use case, which by the way is Handle Order, consider this. The receiving of the notification by the account manager may have happened much earlier than the actual handling of the order by that account manager. So the notification itself is not an integral part of the single setting in which the account manager handles the order. So, yes receiving the notification is the trigger of the Handle Order use case, but not part of that use case itself (i.e. not the first step of the scenario).

For a similar reason as discussed for the Place Order use case, the (automatic) Create Back-order activity is part of the Handle Order use case. The creation of the back-order actually is handled through an alternate scenario of the Handle Order use case.

The last and final use case is the Ship Order, obviously.

Requirements vs Solutions

Now let's review the Receive Order by JMS activity, and let's assume that this only supports a different channel through which the same customer can place an order. The JMS queue may for example be used to pass in some SMS message. From a requirements perspective you can state that this is part of the Place Order use case. The argument being that using a OPBM screen or sending a text message are just two different solutions to the same actor goal: placing an order. Supporting different channels is "just" a supplemental requirement for the Place Order use case.

Now if you really think about it, you probably will agree with me that when doing a more detailed analysis of the Place Order use case, will reveal several reasons for (in the end) having at least two use cases, one for placing the order through a screen and another one for placing it by SMS. If you are a fancy use case modeler you could even model the Place Order use case as a super-type use case, having to siblings: Place Order through Workspace and Place Order by SMS.

So when you had "four" or "five" as your answer, depending on your reasoning, you might have been correct as well.

Introducing a Timer

Another interesting aspect to consider is what happens when the Notify Account Manager activity is not done directly after the customer issued the order, but for example by a trigger at 8:00 in the morning. In that case, the notification is no longer part of the single setting Place Order.

Mind that for the reason explained earlier, this still does not mean that the notification becomes part of the Handle Order use case. But who is the primary actor here and who is having the goal? In this case the primary actor is the timer. It depends on how you formulate the goal, but for reasons of simplicity, let's assume that it is the customer having a goal of the account manager handling the order as soon as possible. But granted, it is debatable.

Conclusion

So, in conclusion: unless there is a timer involved, all automatic activities are part of the interactive use case that precedes them, which may be outside the OBPM process (in another system sending the message).

5 comments:

Unknown said...

I don't agree with the concept of using Timer as an actor. As you rightly mentioned: "a use case captures requirements from the perspective of an actor that wants to achieve some goal using the system"; if you use Timer as an Actor in the Notify Account Manager Use Case, what goal is the Actor (Timer) achieving?
To me, Timer can just be the "trigger" to this use case. Actor should be Account Manager, who receives the notification - which is his goal.

Jan Kettenis said...

Saumyo.

I did not want to make this posting too complex, but you do have a point. The Timer itself does not have a goal, but "acts" on behalf of a real business actor. I agree with you that the Account Manager is the true business actor rather than the customer. That was a mistake.

However, there are actually two solutions to this problem.

One is to say that the timer is (only) the trigger, as you suggest. But then the timer is no longer explicitly visible. Also, the Account Manager is not actively doing something during the (single-setting) notification use case. Although correct from an academic point of view, saying that the Account Manager is the primary actor for some people may be counter-intuitive as the Account Manager normally will not be involved in a single-setting, but hours or even days later instead.

So, as the timer already appears in the business process diagram, another solution could be to model it as a secondary actor. That makes it more explicit that the Account Manager is not actively doing something, but the Timer is.

In both cases the Timer is not the primary actor. Nevertheless, to prevent that academically correct stands in the way of understandable, I may choose to use Timer as primary actor anyway.

dubai hotels said...

I think those who are interested in this subject should be able to find good information that will be beneficial. Whenever I have questions about the use cases myself, I take my Bible is to write use cases for the efficient use of Alistair Cockburn.

تقنية المعلومات said...

thanks this is very helpful article great job we all like it

nago said...

Thanks for sharing, I will bookmark and be back again

BPM