Business Process Modeling Ang Chen 2007
Dec 07, 2014
Business Process Modeling
Ang Chen2007
Outline• Introduction & Motivation
• Process (Control-Flow) Modeling
• Petri Nets (workflow net), Workflow patterns, BPEL
• Process model properties
• Data Modeling
• UML, Entity-Relationship model
• Data model properties
• Assignment (TP)
2
What is business process?
Definition in the real-world
Definition in IT domain
• using business terms in natural languages
• conventional business rules• respect law• not very precis, sometimes
ambiguous, need interpretations
• most time using IT terms, e.g. system, user ...
• precise in the context• exchange ideas between end-
user and developers• executable somewhere• implement real-world BP
3
Real-world BP
Traditionally, BP has nothing to do with information technology
“A business process is a sequence of activities followed by individuals in a business to achieve some business goal. Often these are manual activities executed by employees who play certain roles in the business in addition to others who are external to the business: customers, business partners, etc.”
From “what is a business process”.
4
Real-world BPA business process description
1. A customer fills the purchase order form and send it to the company.2. (Employee of) The company confirm the reception of order.3. (Employee of) The company check the stock and prepare the products.4. (Employee of) The company deliver the products with the invoice.5. The customer makes the payment.6. (Employee of) The company collects the payment.
Depending on the underlying business protocol, the payment may be effected before (deliver against payment) or after (by credit) the delivery of product.
Example of a “delivery and payment terms” which describe a business protocol (rule)
5
Real-world BP
• Healthcare, patient treatments
• Biological experiment data processing
• Product manufacture process (ERP)
• E-Trading, E-Government
• Financial supply chain (buyer - seller - bank vs. product - cash - bill - credit)
BP in IT domainDo you remember how to write Use Cases?
• Real-world process vs. BP definition• The business process should implement the real-world needs• BP definition describes only a part of real-world process
(where users interact with the computer system)
Objective of IT in BP ManagementTo make sure (how) the right persons (who) do the right things (what) at the right moments (when)
7
Objective of IT in BPM
Image from openflow
8
BP Management UCs
9
Workflow Reference Model
Image from WfMC
10
BP Modeling Approaches
• Metamodel-based. Only metamodel is specified.
• Metamodel + state-based semantics. Using Petri Net variances, e.g. Workflow Net.
• Metamodel + service-based semantics. e.g. Web service composition languages, BPEL.
• Hybrid approach. Metamodel with both state-based and service semantics.
• Rules-Driven (less popular)
Business process has similar principle with parallel, distributed programming, and the computation tasks are realized by the collaboration of human and machines.
11
Process Metamodel (1)openflow
• Process, activity, transition, instance, workitem etc.
• no formal semantics• Integrated in Zope
application server• Python based• Good interoperability
with Zope products
12
Process Metamodel (2)
XPDL’s Process metamodel:
Process, ActivitySet, Activity, Application,Transition,Participant,Gateway,Type,Property,etc.
13
State-based semantics
• Advantages of using Petri Nets for workflow modeling:
• Formal semantics
• Inductive graphical notation
• Explicit state representation
• Well developed verification techniques and tools
14
Case Study
receive order
compute price
organize shipping
production scheduling
send invoice
• To compute the price, the shipping price is needed
• To schedule the production, the shipping date is needed
• To send the invoice to client, the three tasks should be finished
• Tasks are accomplished by different companies or departments
• Used data:• Order• Shipping Info• Schedule• Price• Invoice
15
Petri Nets Model
16
Remarks of modeling with PN
• The PN elements can be interpreted differently while modeling business process
• Transitions: Event, Action, Service interaction
• Places: Information holder, List, Database, etc.
• Tokens: Object, information, physical entity, reference, etc.
• However, similar to logical formula, the properties of PN model are valid for all the interpretations (independent of domain)
17
Workflow NetWF-net (workflow net) defined by W.M.P. van der Aalst
A Petri net PN=<P,T,F> is a WF-net if and only if:
• there is one source place i∈P that the pre-set(i) = ϕ
• there is one sink place o∈P that the post-set(i) = ϕ
• every node x∈P∪T is on a path from i to o
• A WF-net has one input place (i) and one output place (o) because any case handled by the procedure represented by the WF-net is created when it enters the WFMS and is deleted once it is completely handled by the system, i.e., the WF-net specifies the life-cycle of a case.
• The third requirement is to avoid dangling tasks and/or conditions which do not contribute to the processing of cases.
18
Workflow Patterns
• Proposed by Van Der Aalst. Categorized into several perspectives
• Control: flow of cases (instances)
• Data: data and information processing
• Operation: interactions with human and external systems
• Resources: modeling human and machine workforce
• About 20 patterns for the control-flow perspective.
19
Control Flow Patterns
• Basic constructs• AND, OR, JOIN, SPLIT
• Synchronization and Merge• Cycle and termination• Multi-Instances• Cancellation
20
for a complete explanation with flash animations, see:
www.workflowpatterns.com
invalid!
21
BPEL brief introduction
• Business Process Execution Language: combined XLANG from MS and BPFL from IBM. Actual called “WS-BPEL”
• A web service composition language. Variables are used to pass values between web services
• The states of instances are distributed in differences machines
• The engine of BPEL invokes web service and receives service calls according to the BPEL definition
BPEL specifications from IBM: link
22
BPEL (2)• Totally based on Web service specifications
• BPEL -> Web service -> XML schema -> XML
• Control flow: <flow>, <sequence>, <pick>, <while> …
• Activity: <invoke>, <receive>, <wait> …
• Links: <link>, <source>, <target>
• Participant: <partnerLink>, <role>
• Data: <variable>, <assign>, <messages>
23
BPEL (3)• <flow>: AND split; <sequence>: sequence; <pick>: OR split;
• <invoke>: call web service; <receive>: blocking & waiting callback;
• <wait>: wait a condition;
• <link>: dependence link;
• <partnerLink>: web service of partner;
• <messages>: schema definition of exchanged message.
For more information for the relationship between workflow patterns and BPEL, see: “Pattern Based Analysis of BPEL4WS”, by Petia Wohed et al.
24
Case Study•<partnerLinks>
•<partnerLink name="purchasing" … />• <partnerLink name="invoicing" …/>•<partnerLink name="shipping" …/>•<partnerLink name="scheduling" …/>
•</partnerLinks>•<sequence>
•<receive…”Order”/>•<flow>
•<sequence> …”computPrice”</sequence>•<sequence> …”shippping” </sequence>•<sequence>…”schedule” </sequence>
•</flow>•<reply…”Invoice”/>•</sequence>
receive order
compute price
organize shipping
production scheduling
send invoice
25
This process has 3 parallel activities.It receives an Order and reply an Invoice to the caller (a client)
BP Properties
• Deadlock free, Soundness
• No cyclic-dependencies
• Each input case should have a final output somewhere
• No hanging tasks. E.g. when a case is finished, all related tokens should be removed
• Efficiency & Performance (related to BP design): no unnecessary, repetitive work for users, e.g. fill the same information (form) for several times.
26
Data Modeling
• Entity-Relationship Model
• Relational Model
• Service Data Object
Data modeling includes data definition and manipulation. Data model is the basis of business process.
27
Entity-Relationship Model
• Originally proposed by Peter Chen in 1976. Paper “The Entity-Relationship Model--Toward a Unified View of Data”.
• The most-used conceptional modeling tool. Many variances exist.
• Conference site: http://www.conceptualmodeling.org/
• Based on a very simple graphical notation (ER Diagram)
artist performs song name
Entity Relation Entity Attribute
28
Entity & Attribute• Entity: a concept about which information is collected
• Attribute: descriptive properties of an entity
• Attribute Type: the domain of an attribute
• Entity Type: collection of entities that all have the same attributes
• Entity Set: collection of entities of a particular entity type
• Key attributes of an Entity Type: the attributes used to uniquely determine each entity in an entity set. The attributes set is called a superkey
• Candidate key: the minimum superkey of an entity type. The primary key of the entity type is selected among all possible candidate keys.
29
Relationship
• (An instance of) Relationship: association among two or more entities.
• Relationship Type: the collection of similar relationships
• Degree of a relationship: the number of entity types that participate in the relationship type.
• Role of an entity in a relationship
• Relationship attributes: properties of a relationship
• Relationship does not have key attributes, it’s identified by its participants’ identities
30
ER Model
• ER variances often differ from the following points:
• The degree of the relationship: unary, binary, or more
• The type cardinality constraints and participation constraints
• The direction of relationship
• Whether a relation can have attributes or not
31
Degree of relationship
Unary
Binary
Employee mananges
1
M
Manager mananges Employee
1 M
Book Store
Person
ownership
M 1
1
Ternary
A relationship with degree >2 can be decomposed into several binary relationships
32
Cardinality & Participation Constraints• Cardinality constraints: Minimum, Maximum
cardinality e.g. (M..N - 1..N)
• Participation constraints: Optional, Mandatory e.g. (0..N - 0..N), (1..N - 1..N)
• The two constraints sets may have conflicts or overlaps
• In case of conflicts, the ER model is not structurally valid.
33
Participation Constraints
Graphical notations optional
mandatory
There is maximum one manager to manage the employees. It is possible that there are no employees.
There must have a manager to manage the employees. It is possible that there are no employees.
Manager mananges Employee
1 M
Manager mananges Employee
1 M
34
Unary relationship
Employee
self
mananges
mananges
1 11
M
• Everybody is an employee, but there is an employee who manages others.
• The same time, he manages himself.• on the right, 1-1 with optional-mandatory constraints is not
valid
1
Employee
self
mananges
mananges
11
1
M
35
Binary relationship
• An acyclic path containing all binary relationships is always structurally valid
• In an cyclic path, there are risks that it is not structurally valid
??what is the possible relationship between the manager and the department?
Manager mananges Employee
1 M
member ofDepartment
1M
36
Enhanced ER model & UML
• They can be considered as ER models with extended semantics and constraints
• EER: Specialization/Generalization, Aggregation
• UML: Inheritance(Generalization), Composition, Aggregation. For OO design.
37
Specialization/Generalization
• subtypes and supertypes of entities
• cardinality constraints between supertype:subtype is 1:0
• Supertype: Employee• Subtype: Hourly, Salaried• Subtypes inherit all the attributes of
the supertype• The primary key of the supertype and
subtypes are identical• An occurrence of the Employee needs
not have an occurrence of Salaried nor Hourly.
• An occurrence of the Salaried or Hourly MUST HAVE an occurrence of the supertype entity Employee.
Employee
Hourly Salaried
Date
Hired
ID
Name
Wage Salary
IS-A
1
38
Specialization Constraints
Employee
Hourly Salaried
Date
Hired
ID
Name
Wage Salary
IS-A
1
We see that:• An occurrence of “Hourly” or “Salaried”
entity must have an occurrence of “Employee” entity
• “Hourly” and “Salaried” entity types inherit the attributes from entity type “Employee”
But:• Does an occurrence of “Employee” entity
must have an occurrence of “Hourly” or “Salaried” entity?
• Does an occurrence of “Employee” entity can have both occurrences of “Hourly” and “Salaried”?
39
Specialization Constraints
• Completeness Constraints
• Total/Partial Specialization. An occurrence of a supertype entity must/may have a corresponding subtype occurrence (double line)
• Disjointness Constraints
• Overlap rule(total/partial). An occurrence of a supertype must/may have more than one subtype occurrence (mark “O”)
• Disjoint rule(total/partial). An occurrence of a supertype must/may have exactly one subtype occurrence (mark “D”)
• Multiple Inheritance
40
Examples
Employee
Hourly Salaried
Date
Hired
ID
Name
Wage Salary
1
O1 1
Employee
Hourly Salaried
Date
Hired
ID
Name
Wage Salary
1
D1 1
41
Integrity Constraints
• These constraints are used to valid business (or domain) rules
• Entity Integrity (Uniqueness Integrity): each instance of an entity type must have a unique identifier that is not null
• Referential Integrity: relationship has references to the participant entities, e.g. existence dependency
• Domain Constraint: e.g. range, format, null or not null of values etc.
• Operational Constraint: constraints (e.g. business rules ) should be respected during the data manipulation
42
UML Class Diagram• Aggregation: has-a relationship, between object and
component parts. Filled diamond side means the whole side.
• Subclasses (specialization/generalization)
• blank triangle for disjoint, filled triangle for overlap
• Weak entity: qualified association
• Relationship types are associations
• Relationship instances are links, using (min..max) for cardinality constraints
• Attributes and domains are merged in the box
43
ER vs. UML
Which UML model the ER model corresponds?
Employee
Hourly Salaried
Date
Hired
ID
Name
Wage Salary
1
O
member
of
DepartmentName
1
M
Abstract class has name in italicsNameDepartment
IDNameDataHired
Employee
WageHourly
SalarySalaried
0..*
1
NameDepartment
IDNameDataHired
Employee
WageHourly
SalarySalaried
0..*
1
44
Data Model Properties
• Structurally valid: there are no contradictions and conflicts in the model itself
• Semantically valid: the designed model corresponds the domain problem, e.g. a student must finish at least 20 credits per year
• Integrity constraints: rules & constraints should be respected during the evolution of data instances
• Functional dependency (in relational model): why a relational schema is better than another? Optimization
45
Reference: ER & Relational Model
• http://portal.acm.org/citation.cfm?id=320440
• http://www.siue.edu/~dbock/cmis450/4-eermodel.htm
• http://dbis.ucdavis.edu/courses/165A-SQ07/Handouts/ermodel.pdf
• http://dbis.ucdavis.edu/courses/165A-SQ07/Handouts/relmodel.pdf
• http://dbis.ucdavis.edu/courses/165A-SQ07/Handouts/integrity.pdf
46
Assignment
• Modeling the business processes of fundable.com and zopa.com (social fundraising)
• http://fundable.com/ and http://zopa.com
• Data model
• Control-flow model
• Connection between Data and Control models
• An individual report in 2 weeks