Author Topic: Modelling roles and actors, where actors can be people or systems  (Read 12863 times)

Modesto Vega

  • EA User
  • **
  • Posts: 370
  • Karma: +7/-4
    • View Profile
Re: Modelling roles and actors, where actors can be people or systems
« Reply #15 on: August 02, 2019, 11:15:43 pm »
Modesto, I think a read of "Use Case modeling" and "Applying Use Cases" (Addison Wesley) will answer all your questions.  It's only a couple or three hours read per book.
When you think about it, keep in mind that you are modelling your use cases, the approach you take should also be able to model misuse cases (such as bad actors).
I was wondering how long it was going to take before somebody brought use cases into the discussion (which I don't mind), and reading books (which doesn't add much to the discussion but remind of my age as "Use Case modeling" is a book I bough in the early 2000s and probably still have somewhere).

If somebody reminds me how to add images to a post I'write a post with my latest thoughts with some visual backing.

qwerty

  • EA Guru
  • *****
  • Posts: 10625
  • Karma: +233/-194
  • I'm no guru at all
    • View Profile
Re: Modelling roles and actors, where actors can be people or systems
« Reply #16 on: August 02, 2019, 11:30:59 pm »
Put the pictures on a public server (not this one) and use the link with the image icon (first in 2nd row above).

q.

P.S. Once again: Bittner/Spence about use cases is a must!

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1323
  • Karma: +104/-75
    • View Profile
Re: Modelling roles and actors, where actors can be people or systems
« Reply #17 on: August 05, 2019, 07:43:06 am »
I was wondering how long it was going to take before somebody brought use cases into the discussion

I wasn't actually meaning in the strict UML sense.  Just you need to model both how your system is being used and potentially misused.  It makes the security architecture and reviews so much easier to deal with solid cases.

Modesto Vega

  • EA User
  • **
  • Posts: 370
  • Karma: +7/-4
    • View Profile
Re: Modelling roles and actors, where actors can be people or systems
« Reply #18 on: August 08, 2019, 05:20:24 am »
Apologies for the delay in posting this, events have taken over.

Below is a use case diagram, not dissimilar to some of those found in Use Case modelling by Kurt Bittner. In this diagram an actor “specifies the a role played by a user or any other system that interfaces with the subject” - i.e., it is an actor as defined by the UML specification.



There is nothing wrong with this diagram but it does not tell me
  • Who plays the role, who is the agent to paraphrase Paolo
  • if the agent is a system or a (human) user
  • if the role is played by somebody/something internal or external to the organisation being modelled
  • that for certain use cases, such as “Apply for a Mortgage/Credit Card/Loan” involving other actors (users performing other roles) who/which can also be internal or external to the organisation

One could argue that Approving a Mortgage Application, Approving a Credit Card Application and Approving a Loan Application are separate use cases, this is of course fine. But the only way to represent this is by extending the diagram above and adding:
  • new actors, representing the role played by the user(s) or system(s) assessing and approving the applications,
  • 3 new use cases one for each type of application (Assess and Approve Mortgage Application, Assess and Approve Credit Card Application, and Assess and Approve Loan Application)

Even with these additions, I still have some problems
  • The problem in the OP remains, I still do not know if these new actors are humans or systems, or internal or external to the organisation
  • The resulting diagram doesn’t tell me the completion of an application use case triggers and assessment use case, I am not even sure how to model this using UML and use cases
  • Even if I name this new actor Employee, which indicates we are dealing with a human internal to organisation, the name is too generic and not really an actor in the UML sense, it is not really a role
  • If I name this new actor Risk Analyst, which is a role, this will lead to a proliferation of actors in a large organisation, like the one we are trying to model, which, as I said in the OP, is one of the problems we are trying to address
  • If I we’re going to make all of these changes the resulting diagram will be anything but brief and simple.

    The alternative is the diagram below where black boxes represent user (or agents to use Paolo’s approach), grey and orange boxes represent the role they perform (they are actors in the UML sense), white boxes are (business) objects consumed or resulting from activities, and the lines sort of represent activities.



    This diagram solves most of the problems described above:
    • It segregates actors/roles from users/agents
    • It allows typing of users/agents as persons, systems, internal persons, external persons, internal systems or external systems
    • It shows that more than user/agent is required to handle such things as an application for a mortgage, credit card or loan
    • It shows the key business objects involved in the process

    The problems I have with this approach are as follows:
    • It does look too much, perhaps intentionally, like a structural diagram,
      I used a class diagram, with a behavioural undertone
    • It requires a custom profile, which is fine, but presents the following challenges:
      • What metaclass should the black boxes (representing user/agents) be an extension of? Actor?
      • What metaclass should the grey boxes (representing roles, actors in the UML sense) be an extension of?
    Finally, what do they orange boxes represent and what metaclass should be use to extended them? Are they needed?

    Overall, I am happier with the 2nd diagram but I am still not sure it is a semantically correct and orthodox model of the problem at hand.

    Thoughts are welcomed.

[/list]

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1323
  • Karma: +104/-75
    • View Profile
Re: Modelling roles and actors, where actors can be people or systems
« Reply #19 on: August 08, 2019, 07:15:59 am »
So to take one part of your problem

Quote
The problem in the OP remains, I still do not know if these new actors are humans or systems, or internal or external to the organisation

In reality how do you know these things?

The reason I ask if you have one API that is used internally and externally, and can be invoked by humans and systems you may not know.  That knowledge may only be in the data passed across the integration, which won't allow you to show the different types of agents in your model.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 6867
  • Karma: +147/-104
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Modelling roles and actors, where actors can be people or systems
« Reply #20 on: August 08, 2019, 08:23:30 am »
Employee is a role, just as Client is.

That's why the Agent => Actor IN Role mechanism works.  An employee IS a person (Actor subtype) acting IN the role of an employee of the business entity.  The role tells you what an employee can do, the actor tells you who they are.

I use the object-actioner mechanism to determine the role:   Invoice (object) Authoriser (actioner); Business Entity (object) Client (actioner); Business Entity (object) Employee (actioner); Mortage (object) Applicant (actioner); Mortage (object) Approver (actioner); Mortage (object) Benficiary (actioner);

Unfortunately for your model, under this regime, one has System (object) User (actioner);   which you can subtype into External vs Internal.  But "it's a Role, ".

Person is NOT a Role, but it IS a placeholder Actor (in the normal sense) for the specific person (say Modesto).


HTH,
Paolo
« Last Edit: August 08, 2019, 08:28:34 am by Paolo F Cantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 9537
  • Karma: +274/-27
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Modelling roles and actors, where actors can be people or systems
« Reply #21 on: August 08, 2019, 04:22:06 pm »
We often use Actors as the basis for the types of accounts (used by humans or systems) we will have to create.
So in your example we would have an actor name "Risk Analyst" to identify which use cases a Risk Analyst is allowed to perform.

We also use Actor inheritance to allow for inheritance of rights.

We indicate the fact that an actor is a human or system as a property of the Actor (ideally that would be a tagged value added to the Actor. Currently we use packages to group the human/system actors.)

I'm not sure if it's the best use of Actors, but it works for us. People understand it easily and it is the basis for our user management setup.

Geert