1. Software Architecture and
Project Management
Archetype and Archetype Patterns
Prepared by
SREEJA RAJESH
2. Module II
• Archetypes and Archetype Patterns
• Model Driven Architecture with Archetype Patterns.
• Literate Modeling, Archetype Pattern.
• Customer Relationship Management (CRM) Archetype
Pattern,
• Product Archetype Pattern,
• Quantity Archetype Pattern,
• Rule Archetype Pattern.
3. Party Archetype and Archetype Patterns
Party Archetype
The Party archetype pattern describes how to
represent essential information about people and
organizations. We use Party as a general term for a
person or an organization such as a business .
The Party archetype represents an identifiable,
addressable unit that may have a legal status and
that normally has autonomous control over (at least
some of) its actions.
Usually, the Party archetype captures essential
information about a person or an organization, but
it is merely a representation of that person or
organization within a software system.
5. Party Archetype and Archetype Patterns
Party Archetype
The information maintained by the Party Archetype
include:
Unique Identifier
Name
Address
Registered identifiers(passports,identity cards)
Preferences
Any other information that your company needs
6. Party Archetype and Archetype Patterns
PartyIdentifier
PartyIdentifier archetype represents a unique
identifier for a Party.
UniqueIdentifier
UniqueIdentifier archetype represents an
identifier that is unique within a given context.
7. Party Archetype and Archetype Patterns
PartyIdentifier
The characteristics of PartyIdentifier include:
It must be unique across your whole business.
It should usually be an alphanumeric string
It must not be null.
It must be created when a new Party object is
saved to persistent storage (such as a database).
It must not be changed.
It must have no significance.
8. Party Archetype and Archetype Patterns
PartyRole & PartyRelationship
how to represent relationships between Parties
and the roles the Parties play in those
relationships
PartyRoleIdentifier:
how to uniquely identify a PartyRole.
N-ary Relationships:
how to represent a relationship between three or
more Parties
9. Party Archetype and Archetype Patterns
PartyRoleType & PartyRelationshipType
how to represent different types of PartyRoles
and PartyRelationships
Managing PartyRoles and PartyRelationships
how to manage complex networks of
PartyRelationships
10. Party Archetype and Archetype Patterns
PartyRoleConstraint
how to constrain the types of PartyRoles that a
particular type of Party can play.
PartyRelationshipConstraint
how to constrain the types of PartyRoles that can
act as the client and supplier sides of a specific
PartyRelationshipType
11. Party Archetype and Archetype Patterns
Responsibility
how to describe a particular activity that a
PartyRoleType may be expected to perform
AssignedResponsibility
how to capture the fact that a particular
Responsibility has been assigned to a particular
PartyRole
12. Party Archetype and Archetype Patterns
Capabilities
how to describe model the facts about what a
Party is capable of doing.
PartyRelationship archetype pattern
how to use this pattern effectively.
13. Customer Relationship Management (CRM) Archetype Pattern
Customer relationship management
archetype pattern (CRM)
CRM is about actively managing the relationships
between your business and your customers, in
order to understand and increase customer value,
motivation, and loyalty.
CRM is about recognizing and treating the
customer as an individual.
known as relationship marketing because the
marketing activity is based on an established
relationship to a known customer.
14. Customer Relationship Management (CRM) Archetype Pattern
Goals of CRM
Assess the business value of the customer
Increase the business value of the customer
Increase customer satisfaction
Gain and maintain customer loyalty
Motivate customers to repeat business
Attract new customers
Understand which customers to keep and which
to lose
Save money by streamlining customer
interactions
15. Customer Relationship Management (CRM) Archetype Pattern
Unified View of customer
All CRM is predicated on having a unified view of
the customer that includes:
Customer information (name, address etc).
Customer needs (preferably anticipating these
needs!)
Customer preferences.
Customer value to the business
Customer buying patterns (behaviors)
Customer communications with the business
16. Customer Relationship Management (CRM) Archetype Pattern
Customer
What is a Customer?
Should you represent it as a type of Party?
Should you represent it as a role that a Party
plays?
Customer Archetype
how to represent the PartyRole that a Party may
play on the purchasing side of a sales process
18. Customer Relationship Management (CRM) Archetype Pattern
CommunicationRouting
how to represent the handover of a Communication
between CustomerServiceRepresentatives
19. Customer Relationship Management (CRM) Archetype Pattern
CustomerServiceCase
how to capture all of the communications about a
specific topic related to a specific Customer
CustomerServiceCaseIdentifier
how to uniquely identify a CustomerServiceCase
20. Customer Relationship Management (CRM) Archetype Pattern
CustomerCommunicationManager
how to represent the business function of
managing Customer Communications as a set of
CustomerServiceCases
Communication
how to capture details of a communication between
two PartyRoles as a type of PartyRelationship
22. Customer Relationship Management (CRM) Archetype Pattern
Managing Customer Communication
Knowing who you are communicating with, even if
the Customer is represented indirectly by an agent
Maintaining a record of all Communications
Making the Communication history available to
Parties authorized to interact with the Customer
Generating Actions based on Customer
Communications
Tracking Actions generated from Customer
Communications
Monitoring the Outcomes of Actions generated by
Customer Communications
23. Customer Relationship Management (CRM) Archetype Pattern
CommunicationThread
how to capture a sequence of Communications
about a particular topic
CustomerAgent
how to represent the role of someone who acts on
behalf of a CustomerServiceCase
24. Customer Relationship Management (CRM) Archetype Pattern
CustomerServiceRepresentative
How to represent the role played by someone
who acts on behalf of the customer services
department
26. Customer Relationship Management (CRM) Archetype Pattern
Action
how to represent an action that is taken as the
result of a Communication
Outcome
how to represent the actual or possible result of
an Action
28. Product Archetype Pattern
Product Archetype Pattern
All businesses make money by selling some
product, either goods or services.
The Product archetype pattern provides a way to
model goods and services effectively.
Products can take a number of different basic
forms, and the Product archetype pattern has to
accommodate all of them.
29. Product Archetype Pattern
Three Broad Categories of Product
Unique things
Artisan-produced products tend to be unique, with a one-to-one
correspondence between a catalog entry and the artifact itself.
Identical things
Mass-produced products are a one-to-many correspondence
between a catalog entry and a set of identical artifacts.
Identifiable things.
things that are similar but individually identifiable (e.g., a car of a
particular make)
30. Product Archetype Pattern
Product Archetype Pattern Pleomorphs
If your business system needs to deal with only
unique things, you may find it more appropriate to use
a specifically optimized Product archetype pattern
pleomorph called UniqueProduct.
If your business system needs to handle only the
special case of identical things, it may be more
appropriate to use a specifically optimized Product
archetype pattern pleomorph called IdenticalProduct.
33. Product Archetype Pattern
Product Archetype Pattern
ProductCatalog : contains descriptions for one or
more ProductTypes. A description is shared by many
ProductInstances, each of which has its own unique
identifier and may have optional features.
When you go into a shop to buy one of these
products, the ProductType represents the information
the salesperson gives you verbally or in a catalog or
leaflet, and the ProductInstance represents the actual
thing you walk out the door with.
34. Product Archetype Pattern
ProductType & ProductInstance
ProductType archetype describes the common
properties of a set of goods or services.
• For example, the name "Epson Stylus C80" and its
associated specification describe a type of printer.
This is a ProductType.
ProductInstance archetype represents a specific
instance of a ProductType
• There are many specific instances of this printer,
these are represented by ProductInstances.
36. Product Archetype Pattern
ProductType & ProductInstance
For each ProductInstance, there is exactly one
ProductType that describes the common properties of
the set of similar instances.
37. Product Archetype Pattern
ProductType & ProductInstance Roles
Manufacturer Seller Customer
perspective perspective perspective
ProductType What you What you advertise in What you browse
specify a catalog for sale in a catalog
What you sell What you order
ProductInstance What you What you hold in What you receive
manufacture Inventory
What you deliver
40. Product Archetype Pattern
GTIN
Global Trade Item Number (GTIN) is an identifier for trade items
developed by GS1 comprising among others of the former
European Article Number (EAN) International and Uniform Code
Council.
Such identifiers are used to look up product information in a
database (often by inputting the number through a bar code
scanner pointed at an actual product) which may belong to a
retailer, manufacturer, collector, researcher, or other entity.
The uniqueness and universality of the identifier is useful in
establishing which product in one database corresponds to
which product in another database, especially across
organizational boundaries.
41. Product Archetype Pattern
GTIN
Currently, GTIN is used exclusively within bar codes,
but it could also be used in other data carriers such as
radio frequency identification (RFID).
The GTIN is only a term and does not impact any
existing standards, nor does it place any additional
requirements on scanning hardware.
42. Product Archetype Pattern
GTIN
The family of data structures comprising GTIN
include:
• GTIN-12 (UPC-A): this is a 12-digit number used
primarily in North America
• GTIN-8 (EAN/UCC-8): this is an 8-digit number used
predominately outside of North America
• GTIN-13 (EAN/UCC-13): this is a 13-digit number used
predominately outside of North America
• GTIN-14 (EAN/UCC-14 or ITF-14): this is a 14-digit
number used to identify trade items at
variouspackaging levels
43. Product Archetype Pattern
Advantages offered by GTIN approach
GTINs are internationally recognized standard
identifiers.
This system creates globally unique identifiers.
The identifiers may be used in all business and public
sectors.
The identifiers include a check digit. This gives them
a degree of robustness.
44. Product Archetype Pattern
Advantages offered by GTIN approach
The identifiers may be easily encoded in a standard
way into a bar code symbol and should be compatible
with emerging tagging technologies such as radio
frequency identification (RFID).
There are now services that allow you to look up a bar
code symbol to find out information about the owning
company and its products.
45. Product Archetype Pattern
ISBN
For books, you may obtain a unique International
Standard Book Number (ISBN) as defined in ISO 2108.
The identifier is preceded by the letters ISBN and is a
ten-digit number that is divided into four parts of
variable length.
These parts must be separated clearly by hyphens or
spaces.
47. Product Archetype Pattern
ISBN
ISBN Part Semantics
Group identifier Identifies a grouping of publishers by geographic or
language area, e.g., the English language grouping
(groups 0 and 1) includes the United States, the United
Kingdom, Canada, Australia, and so on; Switzerland is
covered by French language group 2, German language
group 3
Publisher identifier Refers to a particular publisher within a group
Title identifier Refers to a specific edition of a title published by the
Publisher
Check Digit Used to ensure data integrity.
Value is from 0 to X (representing 10)
48. Product Archetype Pattern
Serial number
The SerialNumber archetype represents a unique
identifier for a specific instance of a product (a
ProductInstance).
For services, the SerialNumber identifies a specific
delivery of a service and usually relates to some
record of that delivery an ISBN
50. Product Archetype Pattern
Batch
The Batch archetype describes a set of
ProductInstances of a specific ProductType that are all
to be tracked together, usually for quality control
purposes.
A Batch is important when manufacturing products.
On the selling side, batchIdentifiers provide a means
of communicating information from manufacturer to
retailer to consumer, typically about safety or quality
control issues.
52. Product Archetype Pattern
Packages
A common business practice is to sell selections of
products grouped together as a unit. These selections
are often known as packages.
An example is a vacation package, where a number of
different travel-related products are sold as a unit.
53. Product Archetype Pattern
PackageType and PackageInstance
The PackageType archetype specifies a set of component
ProductTypes and rules about how these may be
combined to create PackageInstances. A PackageType is
a kind of ProductType.
The PackageInstance archetype represents a collection of
one or more ProductInstances sold together to increase
the business benefit generated by the sale. A
PackageInstance is a kind of ProductInstance.
54. Product Archetype Pattern
PackageType and PackageInstance
Each PackageInstance has an associated PackageType
that contains rules about what combinations of
ProductTypes the PackageInstance can contain.
56. Product Archetype Pattern
PackageType
References a set of component ProductTypes that
comprise all the possible starter, main course, and
dessert ProductTypes.
Contains a rule that states that a PackageInstance
can contain exactly one starter, one main course, and
one dessert.
In other words, the PackageInstance can contain a
ProductInstance of one of the ProductTypes in each of
the starter, main course, and dessert ProductSets.
58. Product Archetype Pattern
Package Specification Process
Is a highly iterative and creative business process that
requires detailed negotiations between the marketing,
business strategy, stock control, and legal forces within the
business.
Depending on the nature of the ProductTypes involved,
there may also be an operational factor or product
combination constraints to consider.
60. Product Archetype Pattern
Package Specification Process
Once a PackageType has been defined by the package
specification process, specific PackageInstances are
created by a package configuration process. This can take
one of two forms.
1. The business assembles one or more PackageInstances
based on the PackageType and offers these for sale. The
customer is offered a PackageInstance with a
predetermined configuration.
61. Product Archetype Pattern
Package Specification Process
2. The customer is allowed to construct a PackageInstance
at the point of sale based on the rules defined in the
PackageType and possibly constrained by the availability
of package components.
62. Product Archetype Pattern
Product Relationship
The ProductRelationship archetype represents a fixed
relationship between ProductTypes that is not a packaging
or containment relationship.
64. Product Archetype Pattern
Up-Selling
When you want to purchase a product, you are sometimes
offered an upgrade to a higher specification product, possibly
at a reduced price. This activity, known as up-selling.
is an important way for businesses to maximize both the
business benefit and the customer satisfaction generated
from each sale.
ProductRelationship UpgradableTo captures the possibility of
an upgrade to a higher specification ProductType.
65. Product Archetype Pattern
Cross-Selling
Occurs when you choose a product and are then
offered a compatible product, possibly at a reduced
price.
We capture the possibility of cross-selling with the
ProductRelationship ComplementedBy.
When up-selling and cross-selling are practiced with
integrity, they can generate advantages for both the
buyer and the seller.
66. Product Archetype Pattern
Price
The Price archetype represents the amount of money
that must be paid in order to purchase a good or
service.
The essence of our model of pricing is that each
ProductType may have one or more Prices, and each
Price has an associated RuleSet that defines the
preconditions for the availability of that Price.
For example, you want to get Price X, you must first
satisfy RuleSet Y.
67. Product Archetype Pattern
PackageType
Pricing case Example
A single, fixed price A can of soup in a supermarket
A reserve (minimum) price and a An item for sale on an auction site
higher price determined at the point such as eBay
of sale
A price that shows some periodicity Seasonal rates for hotel
accommodation
Multiple prices that depend on the CD prices that may be reduced if
application of business rules you are a club member (our local
CD shop does this)
Multiple prices that depend on the An airline ticket
application of business rules and
that show some time dependence
68. Product Archetype Pattern
Price Reductions
A price reduction that applies to any instance of a
ProductType is modeled as one of the ProductType's
Prices and may have preconditions.
Individual ProductInstances may also have an ad hoc
Price applied that overrides all the other possible
Prices.
for example, a price reduction for a shop-soiled item.
An ad hoc Price is modeled as an ArbitraryPrice.
69. Product Archetype Pattern
Price Reductions
The ArbitraryPrice archetype represents an ad hoc
Price applied to a specific ProductInstance that
overrides all other possible Prices.
Finally, price reductions may be applied as Discounts
to a whole Order rather than to individual
ProductTypes or ProductInstances.
70. Product Archetype Pattern
Package Pricing
The PricingStrategy archetype that determines how a
Price is calculated for a PackageType PricingStrategy.
ASSIGNED P=x
AGGREGATED P = ( i=1 to n ) pi
71. Product Archetype Pattern
Services
A service represents a process or activity that is
offered for sale.
In fact, only in inventory management is there any
difference between goods and services that makes a
difference from the modeling perspective.
Example: haircut from barbershop
72. Product Archetype Pattern
ServiceType
A ServiceType archetype is a kind of ProductType that
represents a type of service.
Each ServiceType may optionally have two attributes
startOfPeriodOfOperation
endOfPeriodOfOperation
73. Product Archetype Pattern
ServiceInstance
A ServiceInstance archetype represents an instance or
execution of a ServiceType delivered to one or more
Parties.
ServiceInstances have an actual start and end as well
as an optional scheduledStart and sceduledEnd for
performance monitoring purposes.
74. Product Archetype Pattern
ServiceDeliveryStatus
A ServiceDeliveryStatus archetype records the status of
the delivery of a particular ServiceInstance
This can take one of the values shown
SCHEDULED The ServiceInstance has been scheduled for
delivery
EXECUTING The ServiceInstance is in the process of delivery
CANCELLED The ServiceInstance has been cancelled
COMPLETED The delivery of the ServiceInstance has been
completed
76. Quantity Archetype Pattern
Quantity Archetype Pattern
A quantity is an amount of something measured
according to some standard of measurement.
Another way to say this is that a quantity of something
is a number expressed in a particular metric.
A metric is a standard of measurement.
The metric always has a name (e.g., kilogram) and
often has a standard symbol (e.g., kg).
77. Quantity Archetype Pattern
Money and Currency
In the business environment, Money is one of the
most important types of Quantities.
Currency is one of the most important types of
Metrics.
The Money archetype represents an amount of a
specific Currency.
This Currency is accepted in one or more Locales.
The Locale archetype represents a general notion of
place, location, or context.
78. Quantity Archetype Pattern
Currency
There are two subclasses of Currency
ISOCurrency
NonISOCurrency
The ISOCurrency archetype represents a type of
Currency whose name, alphabeticCode, and
numericCode are defined in ISO 4217.
The NonISOCurrency archetype represents a type of
Currency that is not defined in ISO 4217.
79. Quantity Archetype Pattern
ISO 4217
ISO 4217 is the international standard describing three
letter codes (also known as the currency code) to
define the names of currencies established by the
International Organization for Standardization (ISO).
81. Quantity Archetype Pattern
ExchangeRate and CurrencyConverter
ExchangeRate: how to represent the price of one type
of money relative to another
ExchangeRateType: how to represent a category of
ExchangeRates
CurrencyConverter: how to represent the function of
converting Money in one Currency into an equivalent
amount of another Currency
82. Quantity Archetype Pattern
Payment
Payment: how to represent Money paid by one Party to
another
PaymentMethod: how to represent the medium by
which a Payment may be made
Cash: how to represent a Payment made in a physical
amount of a Currency
Check: how to represent a bill of exchange drawn on a
bank and payable on demand
83. Quantity Archetype Pattern
Payment
PaymentCard: how to represent a physical token such
as a plastic card that authorizes the Party identified on
it to charge the cost of goods or services to an
account
CreditCard: how to represent a PaymentCard that comes
with a line of credit
DebitCard: how to represent a PaymentCard where
Payments are immediately debited from a source account
84. Rule Archetype Pattern
Rule Archetype Pattern
Rule pattern is to give you a concrete basis for
understanding and working with the various kinds of
rules you will encounter in business analysis and
system development.
Use to implement simple rules-based systems.
85. Rule Archetype Pattern
Rules
Rules are constraints.
The typical dictionary definition of a rule is:
A code or principle that governs or constrains action
or behavior (i.e., a constraint on an action)
An established or normal quality or condition of things
(i.e., a constraint on the state of something)
So some rules are simple statements of fact about the
state of something, while others may be used
explicitly to trigger actions.
These two aspects of rules are of equal importance.
86. Rule Archetype Pattern
Business Rule
A business rule is a constraint on the operation of the
business.
A business system rule is a constraint on the
operation of the software systems of the business.
87. Rule Archetype Pattern
Business Rule
A business rule is a constraint on the operation of the
business.
A business system rule is a constraint on the
operation of the software systems of the business.
88. Rule Archetype Pattern
Business Rule
A business rule may constraint the business in two
fundamentally different ways.
1. It may constrain the structure of the business. For
example, relationship between various subunits of the
organization, such as marketing and manufacturing.
2. It may constrain the operation of the business. For
example, sequence of actions in business workflows
such as order processing.
89. Rule Archetype Pattern
Business Rule
Business rules are pervasive and exist at all levels of
the organization.
Business rules form a hierarchy from the very general
to the very specific.
This hierarchy is itself subject to the constraint that
all of its rules must be consistent with each other.
90. Rule Archetype Pattern
Business System Rules
Business system rules are specific constraints on the
operation of the software systems of the business.
They are derived from business rules via a software
engineering process.
91. Rule Archetype Pattern
Business System Rules
Organizations that have many legacy software
systems can be particularly prone to the problem
where the systems themselves constrain the activities
of the whole business.
93. Rule Archetype Pattern
Rules and Business Processes
A business process is a sequence of business
activities that, when executed, is designed to lead to
some business benefit
Rules can affect business processes in two ways.
1. They can embody information about the state of the
business.
2. They can conditionally trigger business activities
based on that information.
94. Rule Archetype Pattern
Business Process
The business process of selling an insurance policy to
a customer. This process can be summarized as:
if customerAge >= minimumAge then
sellPolicy()
The process requires three rules for its operation. Two of
these rules just embody information, while the third rule
triggers a business activity.
95. Rule Archetype Pattern
Business Process
The three rules are listed in the table:
ID Rule Type Semantics
1 customerAge = 17 Information A fact about the customer
2 minimumAge = 18 Information A fact about the business
(here, the circumstances
under which it is prepared
to do business)
3 if customerAge >= minimumAge then Activity A rule that triggers a
sellPolicy() business activity
96. Rule Archetype Pattern
Physical Location of Rules
Business system rules can exist in three places:
1. In the source code
2. As database triggers
3. As explicit rules managed and manipulated by a rules
engine
97. Rule Archetype Pattern
Advantages & Disadvantages of Physical Location of Rules
Location Advantages Disadvantages
Source Applications have good Rules are very hard to change, and it is
code performance expensive to make the change
Rules are generally not reusable across
applications
Applications are inflexible
Database Rules are more accessible Rules are coupled to data
triggers to change Rules are not reusable across data sets
Applications are more Not all rules can be encoded in this way
flexible
98. Rule Archetype Pattern
Advantages & Disadvantages of Physical Location of Rules
Location Advantages Disadvantages
Explicit Rules are completely Applications may not perform as well as
rules accessible to change, and they would with hard-coded rules. This
managed it is easy and inexpensive depends on the rules engine
by a rules to make the change
engine
Rules are made explicit
and so are open to
inspection and review
Rules are separate from
applications and data
Applications are very
flexible