February 9, 2006

...Learn TDD with Codemanship

Business Actors & System Actors

An interesting question has come up on the Agile Modeling Yahoo! group. Here's the jist of it:

Quote Brian McLean:

I'm designing / documenting a process in which a person, call him Jim, inputs various pieces of information into 4 systems so that the total solution can operate (yes, I know there should be only 1 system - we just haven't built it yet ;-). Jim fills a business role which can be titled 'Installer'.

To complete the process Jim performs functions in these 4 systems and I'm interested in just 1 for now. I want this system to be role-based and I've named the role that is able to perform this function 'Business Administrator'.

My confusion is this: I've modeled some bus. use cases to represent the process and the bus. actor is 'Installer'. I've also modeled use cases that show the system functionality that supports Jim's process and I've created the actor 'Business Administrator'.

These were my original quesions (still UML based, but I'm open to all
suggestions):

Q: How can I best capture that Jim is both 'Installer' and 'Business Administrator'? (i.e. I want to show a link between these 2 actoirs in my model.)

Q: In the business process activity diagrams, how do I capture the link between the process and the use cases that more deeply describe the functionality used that complete steps in the process? (i.e. Process step 'Install on system A' uses use case 'Create item').


From Brian's post, I think he's looking at a situation like this:


What he wants to show is the relationship between the Business Actor and each of the actors that communicate with the system use cases.

There are a number of scenarios I can think of that suggest that UML doesn't currently provide a way to achieve this. UML only allows one kind of relationship between actors, which is the generalisation relationship. If Actor A generalises Actor B, that means that Actor B can do anything Actor A can do (and maybe more).

In the diagram, we can see a problem with this straight away. If we modeled that the Business Actor generalised Actor A, we can see straight away that Actor A now has all the functional entitlement of Business Actor - including access to any use cases in other systems that Business Actor uses. We can't say that Business Actor specialises Actor A, because then Business Actor has access to all the use cases available to Actor A - including use cases that aren't included in the flow of the Business Use Case.

So we have a quandry. Business Actor needs some of the functional entitlement of Actor A, and some of the functional entitlement of Actor B, but Actor A and Actor B don't need all of the functional entitlement of Business Actor.

So a generalisation relationship can't describe the relationships between the actors, unless those roles are strictly constrained by the business use cases. If Actor A generalised Business Actor, then it could only access system use cases that are included in the business use cases accessible to Business Actor.



This encourages a level of inflexibility where system permissions are only assigned for roles in forseeable business scenarios.

For this to work, Business Actor would also have to inherit from both Actor A and Actor B - multiple inheritence! Although UML allows it, I'm not sure about that at all. Maybe it's just a question of style.

From a purely practical point of view, I think it's enough to show that Business Use Case includes (or is extended by) specific system use cases. I can figure out the functional entitlements required from that with very little effort.

Finally, Brian hints at showing relationshiops between specific instances of actors ("Jim") and the roles they play. Again, if he's talking about Jim being a "kind of" Installer and a "kind of" Business Administrator. This points back to generalisation again. For an instance to be of two types implies that one of those types has some kind of generalisation relationship with the other.

This is where I think UML fails. What Brian is asking is "how do I show that Jim can play two roles at the same time?", and he's therefore asking "how do I show that the kind of person Jim is can be both of these things simultaneously?" Is Mary a wife or a mother? Well, where type is concerned, she's neither - she's a woman. Wife and mother are roles that can be played by women at the same time. There's no need to create a class called Wife and class called Mother and have one inherit from the other.

What use case models in UML lack is a way to express how some type of person can play different roles with respect to different systems. How can I be a customer to Vodafone, and a coach to BUPA, all at the same time? In BUPA business use cases, am I an instance of the actor Customer? Nope. I'm an instance of type Person playing the role of customer with respect to BUPA.

When I get around to redesigning UML (perhaps after I've finished breakfast), I'll try to remember Brian's problem.
Posted 14 years, 11 months ago on February 9, 2006