Author Topic: What is an "Instance"?  (Read 2249 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 5882
  • Karma: +71/-79
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
What is an "Instance"?
« on: August 17, 2017, 10:15:10 am »
As promised in another post, here it is...

When modelling systems and application programs, this is fairly clear.
"Car" is a Classifier, "BMW 318i" is a (specialised) Classifier, "BMW 318i with plate # XXX 888" is an instance of the Classifier BMW 318i".  We implement Classifiers with Classes and Instances with Objects.  Everyone agree?

A classifier can be defined as anything that aggregates a set of instances according to some property set.  Agreed?

Now let's look at modelling some other things.
ArcfhiMate 3.0 when talking about (Business) Actors observes:
"Business actors may be specific individuals or organizations; e.g., “John Smith” or “ABC Corporation”, or they may be generic;e.g., “Customer” or “Supplier”."

This introduces the notions of "specific" vs "generic".

It seems to me that generic Actors fall under the definition of Classifier whereas specific actors don't (seem to).  Colloquially, we say "John Smith is an instance of an actor".  Can we also say "Customer is an instance of an actor"?

So what's going on?  Should we have Actors (for Generic) and Actor instances (for specific)?

TIA,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1157
  • Karma: +8/-3
  • Read The Help!
    • View Profile
Re: What is an "Instance"?
« Reply #1 on: August 17, 2017, 11:52:37 am »
We don't tend to put an 's' on the end of the classifier name, but perhaps it would be clearer if we did. I would interpret the classifier 'Customers' to define the general characteristics of customers, and a specific instance 'John Smith' to define the customer called John Smith. The GENERIC instance 'Customer' would be just one step back, where you represent an individual Customer without it being a specific person.

So, in the joke 'A man walked into a pub...' the man is neither ANY man nor, specifically, Arthur Dent III. He is A man.

Of, if the worker (instance) 'Fred Bloggs' has a transaction with 'A Customer', you want 'A Customer' to have a number of unique properties but not to the extent of that customer being 'John Smith' specifically.
Best Regards, Roy

Glassboy

  • EA User
  • **
  • Posts: 898
  • Karma: +52/-54
    • View Profile
Re: What is an "Instance"?
« Reply #2 on: August 17, 2017, 01:49:13 pm »
Is it useful using an example that possesses agency when talking about what constitutes an instance?  I think it might be counter product.

Simon M

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6200
  • Karma: +47/-5
    • View Profile
Re: What is an "Instance"?
« Reply #3 on: August 17, 2017, 01:56:18 pm »
I'm not sure about your distinction between classifiers and classes. It may just be that you're using the terms in a different way than the UML specification. (Which says that "Classifier" is to "Class" as "Car" is to "BMW 318i" in your example.) The terminology it uses for the the definition of a class is "metaclass".

ArchiMate 3.0 is explicitly stating that it considers both generic and specific things to be valid instances of their metaclass "business actor". At this stage, I'd borrow from BPMN, which allows you to define explicitly which of these you are using. You can specify a partnerEntity or a partnerRole. Bringing that back to UML, the definition for Actor explicitly states that it "specifies a role".  That's consistent with your view that actors are the generic form. Since actor is a classifier you can create instances of one and by definition that should be specific.

In the end, I agree with your final suggestion. Although I'd prefer to use the terms entity and role that BPMN uses, and I would consider being explicit by applying role and entity stereotypes.
Simon

support@sparxsystems.com

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 5882
  • Karma: +71/-79
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: What is an "Instance"?
« Reply #4 on: August 17, 2017, 04:45:47 pm »
Is it useful using an example that possesses agency when talking about what constitutes an instance?  I think it might be counter product.
I don't understand you.  (Nor does my Grammar Checker!   ;)  - but that's a different story)

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 5882
  • Karma: +71/-79
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: What is an "Instance"?
« Reply #5 on: August 17, 2017, 05:13:13 pm »
Thanks, Simon and Roy,

This is quite helpful.  Some questions...
I'm not sure about your distinction between classifiers and classes. It may just be that you're using the terms in a different way than the UML specification. (Which says that "Classifier" is to "Class" as "Car" is to "BMW 318i" in your example.) The terminology it uses for the definition of a class is "metaclass".
So does that make "Car" a Classifier and "BMW 318i" a Class?  If so, what does the diagram look like?
Quote
ArchiMate 3.0 is explicitly stating that it considers both generic and specific things to be valid instances of their metaclass "business actor".
So, we should, as suggested by Roy, NOT name the generic actor "Customer" (as shorthand for customers -plural-) but as "a Customer" so it is clearer that it is STILL an instance.  "Arthur Dent III" is obviously a specific instance.
Quote
At this stage, I'd borrow from BPMN, which allows you to define explicitly which of these you are using. You can specify a partnerEntity or a partnerRole. Bringing that back to UML, the definition for Actor explicitly states that it "specifies a role".  That's consistent with your view that actors are the generic form. Since actor is a classifier you can create instances of one and by definition that should be specific.
As you may recall, I've previously put forward the idea of a "Player" - an Actor playing a Role.  It is the "player that has the actual agency (in fact, we're thinking of renaming Player as Agent), the actor object just identifies the actor. 
A UML Actor (as opposed to an ArchiMate Business Actor) is just a misidentification of a Role.  They plain got it wrong (the naming, not the concept).
In the case of the generic actor, I now (as a result of this thread) believe that one should be able to define a "query" to determine if a specific actor can be substituted for this generic actor at runtime.  In the example of the generic business actor "a Customer", it means that the specific actor at runtime has been involved with "Us" (as a player or agent) in the role of "Customer"
Quote
In the end, I agree with your final suggestion. Although I'd prefer to use the terms entity and role that BPMN uses, and I would consider being explicit by applying role and entity stereotypes.
So have I come full circle?
Both generic and specific actors are instances of the metaclass "Actor" - they just need to be tagged appropriately.

Thoughts welcome!
Paolo
« Last Edit: August 17, 2017, 05:16:59 pm by Paolo F Cantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Uffe

  • EA Practitioner
  • ***
  • Posts: 1073
  • Karma: +81/-5
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: What is an "Instance"?
« Reply #6 on: August 17, 2017, 09:26:43 pm »
Thoughts welcome!

Here are some! :)

I think ArchiMate's discussion of "generic/specific" is unfortunate. Or just plain wrong. Classifiers should never be used to represent a specific individual.

In UML terms, "generic" and "specific" should be used to denote what generalization/specialization relationships show, and Customer cannot be specialized to "John Smith" -- that's an instantiation if ever I saw one. Customer could be specialized to Private Customer and Corporate Customer, but not to an individual member of the set of all customers. That's instantiation.

Instances are set members, and classes are sets. Specialization creates progressively smaller subsets (and multiple inheritance creates intersections), but even a subset containing only one member is still a set -- it isn't the member. You could specialize Customer all the way down to "Customer Whose Name Is John Smith", but there is still a world of difference between that and the instance "John Smith".


As to Classifier, I think that's a bit of a red herring here. Classifier is a concept in the UML metamodel, not in any actual model created using UML. Throwing metamodel concepts into a regular model doesn't really make sense. It's like if you're reading a novel, and suddenly the author breaks into a definition of the term "adverb."

Classifier is the generalization of most element types that are not instances or structural features -- in other words Class, Component, Interface, Use Case, Actor, Node, Activity, etc. One of the characteristics of a Classifier is that it is instantiable, another is that it can be the source and target of generalizations. Those characteristic are inherited by all specializations of Classifier.

So I would say no, there are no classifiers in your examples. Car is a class, and BMW 318i is another class which is a specialization of Car. The only classifier here is Class itself. If you want to look at the metamodel side, Car and BMW 318i are both instances of Class. You can look at Car and say "this is a Class", but you can't look at it and say "this is a specialization of the concept Class".

It may help to add (silently in your head) the word "characteristics" after the name of any classifier. The Car class defines a car's characteristics, the Customer actor defines a customer's characteristics.

An instance can represent either one (specific) or any (unspecified) member of the set defined by the classifier. Which it is, is up to you the modeller: UML has no concept of definite and indefinite articles. I usually use named instances in the former case, unnamed ones in the latter. Or you can name your instances "a", "some" or "any" if you prefer.


Regarding actors and roles, you raise some interesting points. I disagree with your contention that UML Actors are incorrectly named, because Actors belong to Use Cases where they are loosely defined as those who act, or more specifically those who interact with the system.

Roles are often useful, but you can't replace Actor with Role because in contrast with actor, a role can't be defined simply as "that which (inter)acts." Role must be defined by two characteristics: that which takes on the role and the situation in which the role is taken on. In other words, Role is a relational concept and as such is best represented by a connector.

So in a use case model you could use a set of reusable actors, and stereotype the use case associations with "approves", "supervises", etc to represent the role each actor takes on within the context of each use case.


/Uffe
My theories are always correct, just apply them to the right reality.

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: What is an "Instance"?
« Reply #7 on: August 17, 2017, 11:37:05 pm »
I'm not sure about your distinction between classifiers and classes. It may just be that you're using the terms in a different way than the UML specification. (Which says that "Classifier" is to "Class" as "Car" is to "BMW 318i" in your example.) The terminology it uses for the the definition of a class is "metaclass".

A CLASS is a classifier. A CLASS is also something in a text file in a directory somewhere called something like "source".

A TUNE is a classifier (perhaps, ontology raises it's ugly head again?). A tune could also be some script on a piece of paper, or maybe it's something your beloved daughter wrenches excrusiably {sp: damned if I know} out of a piece of torture equipment called a "recorder", or maybe it's just something in your head  (I have one of those... https://youtu.be/BnxvR70Ikow).

All "tunes" so we can form a mental concept of a thing, context context context. 

Seriously. Classes are classifiers, so are components, interfaces and the other ones I have forgotten.  Classifiers, in the UML sense, are just "things" which have some "stuff" in them.  They are represented in UML as a rectangle (or a blobby balloon or a sausage or maybe even a hamburger shaped thing - who really cares). "This is not a pipe"! 
Other stuff is not stuck on a UML diagram as a rectangle, balloon, sausage, hamburger or even a dalek. These things are NOT classifiers. Usually they are "lines", "sticks", "arrows", etc. Their intent is to convey some sort of relationship between those classifier things.
"This is a picture of something but it is not a pipe".
There is a third group of stuff we stick on diagrams. I can't remember wtf they are called "officially" but for the sake of this argument let's call them "annotations". A couple of them leap to mind. One sort of looks like one of those 3M "sticky note" things. Another is something that looks a bit like a sandwich with the bottom right hand corner folded over that occasionally appears at the top left hand corner of a diagram. I think they are supposed to represent some sort of "title" or something.
(They have meaning AFAIC only in the eye of the diagram making person.)
"This is a picture of something that is not a pipe with a limp sandwich in the upper left hand corner containing the words "La trahison des images" "

This is a picture of a Dalek.

Code: [Select]
              o
              |  ---(
             / \


Am I starting to make any sense yet?
 

 
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

Glassboy

  • EA User
  • **
  • Posts: 898
  • Karma: +52/-54
    • View Profile
Re: What is an "Instance"?
« Reply #8 on: August 18, 2017, 08:41:03 am »
Is it useful using an example that possesses agency when talking about what constitutes an instance?  I think it might be counter product.
I don't understand you.  (Nor does my Grammar Checker!   ;)  - but that's a different story)
Paolo

While you Paolo are one of many instances of Homo sapiens sapiens, as a sentient being with a sense of agency (https://en.wikipedia.org/wiki/Sense_of_agency) there is only one of you.  You are unique within the universe.*  Where as all instances of BMW 318i are the same aside from attributes such as colour.  Even their keys are just an attribute with different values.


*Although, statically speaking, as we're likely to be part of a simulation it is possible that you also exist outside of our frame of reference.

Simon M

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6200
  • Karma: +47/-5
    • View Profile
Re: What is an "Instance"?
« Reply #9 on: August 18, 2017, 08:59:13 am »
So does that make "Car" a Classifier and "BMW 318i" a Class?  If so, what does the diagram look like?
Quote
Actually, I'm saying that they are both classes and that I'm not sure I understand the distinction you're trying to make. See Uffe's response for a more expanded explanation. In both cases, one is the specialization of the other not a new type of thing. Of course, that always depends on what type of model you're trying to create. It "BMW 318i" could be an instance of the class "Car", if the class defined the properties for the model. I'm sure you would never create a model like that. You'd ensure that the class in that case is called CarModel or similar, but there are plenty of people that would either not think of that detail or would opt for brevity.

ArchiMate 3.0 is explicitly stating that it considers both generic and specific things to be valid instances of their metaclass "business actor".
So, we should, as suggested by Roy, NOT name the generic actor "Customer" (as shorthand for customers -plural-) but as "a Customer" so it is clearer that it is STILL an instance.  "Arthur Dent III" is obviously a specific instance.
ArchiMate also offers a Business Role type, that instantly suggests overlap with a generic business actor. Indeed, that overlap is explicitly stated in the specification itself.
Quote
ArchiMate modelers may represent generic organizational entities that perform behavior as either business actors or business roles.
If I was consulting with someone on how to model with ArchiMate (which I don't consider myself qualified to do) I would be advising them to always using business actor for the specific, and the business role for the general, then explicitly map the relationship between the two.

As you may recall, I've previously put forward the idea of a "Player" - an Actor playing a Role.  It is the "player that has the actual agency (in fact, we're thinking of renaming Player as Agent), the actor object just identifies the actor. 
A UML Actor (as opposed to an ArchiMate Business Actor) is just a misidentification of a Role.  They plain got it wrong (the naming, not the concept).
I don't think calling it a player would aid in understanding at all. I'd prefer to think of an Actor along the lines of "acting in the capacity of".

Both generic and specific actors are instances of the metaclass "Actor" - they just need to be tagged appropriately.
I would model "John Smith" as an instance of an actor "Customer". I would probably also tag that instance as an entity in case the reader missed / didn't understand the instance notation on an actor shape.
Simon

support@sparxsystems.com

Glassboy

  • EA User
  • **
  • Posts: 898
  • Karma: +52/-54
    • View Profile
Re: What is an "Instance"?
« Reply #10 on: August 18, 2017, 09:32:02 am »
If I was consulting with someone on how to model with ArchiMate (which I don't consider myself qualified to do) I would be advising them to always using business actor for the specific, and the business role for the general, then explicitly map the relationship between the two.

I'm not sure what you mean by specific and general in this context.  You would have a number of Business Actors that represent your organisation structure from the organisation to the lowest level of team, and then you could have a named person (composition relationship).

A business role represents the part an actor plays in a process, function, or interaction. 

Which actually makes me wonder why role is an active structure element and not a behavioural element.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 5882
  • Karma: +71/-79
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: What is an "Instance"?
« Reply #11 on: August 18, 2017, 10:09:30 am »
If I was consulting with someone on how to model with ArchiMate (which I don't consider myself qualified to do) I would be advising them to always using business actor for the specific, and the business role for the general, then explicitly map the relationship between the two.

I'm not sure what you mean by specific and general in this context.  You would have a number of Business Actors that represent your organisation structure from the organisation to the lowest level of team, and then you could have a named person (composition relationship).

A business role represents the part an actor plays in a process, function, or interaction. 

Which actually makes me wonder why role is an active structure element and not a behavioural element.
+1   on Actor vs Role.  But I think Role can be considered an active structure element because in my/our Actor/Player/Role model Role is the specification of behaviour, not the behaviour itself.  Just as Actor is capable of agency, but until they perform a Role (as a Player) they have no executive agency.  So Actor is just an identifiable entity capable of performing one or more roles.

However, on the subject of generic (not general) and specific.

I think I've sorted it out (for my benefit at least - YMMVWFM).  The correct ontological distinction is restricted vs identifiable.  "Arthur Dent III" is an identifiable instance.  "an Executive" is a restricted instance of the set of identifiable instances with the restriction that the instance must satisfy the condition that they are an executive.  (See how the terminology and semantics are "in sync")  ;)

I really liked Uffe's explanations. They resonated very well with my experiences.  I don't fully agree with everything Uffe said, but the concepts of progressively specialised sets sounds right to me.

Anyhow, I think this is a great conversation.  Thanks to all so far and "Keep 'em cards and letters rollin' in"!  ;D

Paolo
« Last Edit: August 18, 2017, 12:04:31 pm by Paolo F Cantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Glassboy

  • EA User
  • **
  • Posts: 898
  • Karma: +52/-54
    • View Profile
Re: What is an "Instance"?
« Reply #12 on: August 18, 2017, 11:52:03 am »
I think I've sorted it out (for my benefit at least - YMMVWFM).

Good because I had a big night last night and this conversation was getting to be a bit too much for me and I was considering resorting to vaguely related Shakespeare quotes :-)

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1157
  • Karma: +8/-3
  • Read The Help!
    • View Profile
Re: What is an "Instance"?
« Reply #13 on: August 18, 2017, 12:22:32 pm »
Yeah. Shakespeare's works are full of roles, some defining actors. So actors play the roles of actors, and in some instances (ouch!) the actors and roles turn out to be different actors playing different roles. Not to mention the fact that in Shakespeare's day female roles were played by male actors.

And then we get into the quotes. "Is this an instance I see before me?"  or "What's in a name? An Actor by any other name would still be a player".

Go back to bed, Glassboy. Take three Panadol and try hard to forget that today ever happened!
Best Regards, Roy

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 5882
  • Karma: +71/-79
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: What is an "Instance"?
« Reply #14 on: August 18, 2017, 01:19:55 pm »
I take my lead from Will!

"The Player's the thing..."

It IS Friday, after all!

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!