modeling service choreographies with rule-enhanced business processes
DESCRIPTION
The research community has so far mainly focused on the problem of modeling of service orchestrations in the domain of service composition, while modeling of service choreographies has attracted less attention. The following challenges in choreography modeling are tackled in this paper: i) choreography models are not well-connected with the underly-ing business vocabulary models. ii) there is limited support for decoupling parts of business logic from complete choreography models. This reduces dynamic changes of choreographies; iii) choreography models contain redundant elements of shared business logic, which might lead to an inconsistent implementa-tion and incompatible behavior. Our proposal – rBPMN – is an extension of a business process modeling language with rule and choreography modeling support. rBPMN is defined by weaving the metamodels of the Business Process Modeling No-tation and REWERSE Rule Markup Language. To evaluate our proposal, we use service-interaction patterns and compare our approach with related solutions.TRANSCRIPT
Modeling Service Choreographies with
Rule-enhanced Business Processes
Milan Milanović1 and Dragan Gašević2
1University of Belgrade, Serbia2Athabasca University, AB, Canada
Problem Domain
Process modeling and service composition Orchestrations – CASCON 2009
Business processes from one participant’s side Choreographies
Business processes from a global perspective
Available languages (e.g., BPMN) Challenges
How to support business vocabularies/rules? How to manage redundant elements?
MODELS 2009
Choreography Modeling
Extension of the BPMN2 language Software language engineering Adding support for vocabularies and rules Building on the previous related work
iBPMN [Decker & Puhlmann, 2007]
MODELS 2009
Approach
Greetings for the EDOC friends from the International Conference on Software Language Engineering
http://planet-sl.org
Rule-enhanced BPMN - rBPMN Interconnection and interaction models Evaluation mechanism – expressiveness
Service Interaction Patterns
MODELS 2009
Result
Processes & Rules – Option 1
Complete processes modeled by rules With reaction and production rules
Some issues What’s the identity of a business process? Which languages to use? Are the languages at the same level?
Processes & Rules – Option 2
Hybrid approaches BP stays, but rules are added for
control flow decisions, data constraints, and process composition [Graml et al., 2007]
MODELS 2009
The BPMN Language
Rules and Business Processes
Challenges to have rules as first class concepts in BPs to support vocabularies/ontologies to define message and event typing to formalize defining conditions to enable declarative (parts of) processes
MODELS 2009
Representational Analysis
Based on the BWW model
PΔR - Symmetric Difference; P∩R – Intersection; P/R & R/P -Relative Complement
Vid Prezel
Representational Analysis
Based on the BWW modelVid Prezel
Rule Modeling
REWERSE I1 Rule Markup Language (R2ML) with a UML-based graphical concrete syntax
MODELS 2009
REWERSE I1 Rule Markup Language
MODELS 2009
Extension for Rule Models-name : String
FlowElement
-isForCompensation : Boolean
Activity Event
-gatewayDirection : GatewayDirection
Gateway
SequenceFlow-targetRef
1
-incoming
*
-sourceRef
1
-outgoing
*
-id : String-documentation : String
BaseElement
*
+rule
*
FlowElementContainer-container
1
-flowElements
*
Process
R2ML
Task
Rule
ReactionRule
AndOrNafNegFormula
1
-conditions*
1
-postCondition
1
DerivationRule
LogicalFormula
1
-conditions*
1
-conclusion
1..*
ProductionRule
1
-postCondition
1
1
-conditions
1..*
*
+condition 1
RuleGateway
rBPMN
FlowNode
-processType : ProcessType
Process
1
+condition*
-isNegative : Boolean
RuleCondition
*
+default 0..1
RuleSet
*
+rule
*
*
+ruleSet*rBPMN metamodel weaving
rBPMN in Action
rBPMN in Action
rBPMN in ActionOWL-based reasoning
rBPMN in Action
Rete-based
Multiplicity of participants – |||
References – to distinguish participants
Correlation information – who sent a message
MODELS 2009
Interaction Models
MODELS 2009
Service Interaction Patterns
Contingent requests pattern
MODELS 2009
Service Interaction Patterns
Contingent requests pattern
Case Study
Request price
Request flightPrice
-price : Decimal
AvailableFlight
-flightNumber : Integer-departureDate : Date-arrivingAirport : String-seatsLeft : Integer
Flight
Trip Request
Tra
vele
r ag
ent
Tra
vel a
genc
yA
irlin
er af
-departureDate : Date-arrivingAirport : String-seats : Integer
«message event type»FlightRequestfReq
af.seatsLeft > fR
eq.seats and af.departureD
ate =
fReq.departureD
ate
Send Flight Price
Send Flight Not Available
-fault : String
«fault message event type»FaultFlightResponse
-flightNumber : Integer-price : Decimal
«message event type»FlightResponse
R1Calculate
price
found<par>
fAfA.size > 0
Send e-ticket
R3Make
reservation
U
Select airline
Send airline not found
R2
Airlines<par>
-flightNumber : Integer-seats : Integer-departureDate : Date-name : String
«message event type»FlightAccept
Case Study
Request price
Request flightPrice
-price : Decimal
AvailableFlight
-flightNumber : Integer-departureDate : Date-arrivingAirport : String-seatsLeft : Integer
Flight
Trip Request
Tra
vele
r ag
ent
Tra
vel a
genc
yA
irlin
er af
-departureDate : Date-arrivingAirport : String-seats : Integer
«message event type»FlightRequestfReq
af.seatsLeft > fR
eq.seats and af.departureD
ate =
fReq.departureD
ate
Send Flight Price
Send Flight Not Available
-fault : String
«fault message event type»FaultFlightResponse
-flightNumber : Integer-price : Decimal
«message event type»FlightResponse
R1Calculate
price
found<par>
fAfA.size > 0
Send e-ticket
R3Make
reservation
U
Select airline
Send airline not found
R2
Airlines<par>
-flightNumber : Integer-seats : Integer-departureDate : Date-name : String
«message event type»FlightAccept
Rules in Choreography
EDOC 2009
Case Study
Request price
Request flightPrice
-price : Decimal
AvailableFlight
-flightNumber : Integer-departureDate : Date-arrivingAirport : String-seatsLeft : Integer
Flight
Trip Request
Tra
vele
r ag
ent
Tra
vel a
genc
yA
irlin
er af
-departureDate : Date-arrivingAirport : String-seats : Integer
«message event type»FlightRequestfReq
af.seatsLeft > fR
eq.seats and af.departureD
ate =
fReq.departureD
ate
Send Flight Price
Send Flight Not Available
-fault : String
«fault message event type»FaultFlightResponse
-flightNumber : Integer-price : Decimal
«message event type»FlightResponse
R1Calculate
price
found<par>
fAfA.size > 0
Send e-ticket
R3Make
reservation
U
Select airline
Send airline not found
R2
Airlines<par>
-flightNumber : Integer-seats : Integer-departureDate : Date-name : String
«message event type»FlightAccept
Rules in Choreography
EDOC 2009
Case Study
Request price
Request flightPrice
-price : Decimal
AvailableFlight
-flightNumber : Integer-departureDate : Date-arrivingAirport : String-seatsLeft : Integer
Flight
Trip Request
Tra
vele
r ag
ent
Tra
vel a
genc
yA
irlin
er af
-departureDate : Date-arrivingAirport : String-seats : Integer
«message event type»FlightRequestfReq
af.seatsLeft > fR
eq.seats and af.departureD
ate =
fReq.departureD
ate
Send Flight Price
Send Flight Not Available
-fault : String
«fault message event type»FaultFlightResponse
-flightNumber : Integer-price : Decimal
«message event type»FlightResponse
R1Calculate
price
found<par>
fAfA.size > 0
Send e-ticket
One-To-Many Send/Receive
R3Make
reservation
U
Select airline
Send airline not found
R2
Airlines<par>
-flightNumber : Integer-seats : Integer-departureDate : Date-name : String
«message event type»FlightAccept
Case Study
Request price
Request flightPrice
-price : Decimal
AvailableFlight
-flightNumber : Integer-departureDate : Date-arrivingAirport : String-seatsLeft : Integer
Flight
Trip Request
Tra
vele
r ag
ent
Tra
vel a
genc
yA
irlin
er af
-departureDate : Date-arrivingAirport : String-seats : Integer
«message event type»FlightRequestfReq
af.seatsLeft > fR
eq.seats and af.departureD
ate =
fReq.departureD
ate
Send Flight Price
Send Flight Not Available
-fault : String
«fault message event type»FaultFlightResponse
-flightNumber : Integer-price : Decimal
«message event type»FlightResponse
R1Calculate
price
found<par>
fAfA.size > 0
Send e-ticket
R3Make
reservation
U
Select airline
Send airline not found
R2
Racing incoming messagesAirlines
<par>
-flightNumber : Integer-seats : Integer-departureDate : Date-name : String
«message event type»FlightAccept
Case Study
Request price
Request flightPrice
-price : Decimal
AvailableFlight
-flightNumber : Integer-departureDate : Date-arrivingAirport : String-seatsLeft : Integer
Flight
Trip Request
Tra
vele
r ag
ent
Tra
vel a
genc
yA
irlin
er af
-departureDate : Date-arrivingAirport : String-seats : Integer
«message event type»FlightRequestfReq
af.seatsLeft > fR
eq.seats and af.departureD
ate =
fReq.departureD
ate
Send Flight Price
Send Flight Not Available
-fault : String
«fault message event type»FaultFlightResponse
-flightNumber : Integer-price : Decimal
«message event type»FlightResponse
R1Calculate
price
found<par>
fAfA.size > 0
Send e-ticket
R3Make
reservation
Receive
U
Select airline
Send airline not found
R2
Airlines<par>
-flightNumber : Integer-seats : Integer-departureDate : Date-name : String
«message event type»FlightAccept
Rule in Choreography
EDOC 2009
Expressiveness comparison
Service Interaction PatternsLanguage Pattern
group Pattern Let’s
Dance BPMN
WS-CDL
iBPMN rBPMN
Send + + + + + Receive + + + + + 1) Send/Receive + + + + + Racing incoming messages + + + + + One-to-many send + - +/- + + One-from-many receive + - + + +
2)
One-to-many send/receive + - +/- + + Multi-responses + + + + + Contingent requests +/- - +/- +/- + 3) Atomic multicast notification - - - - - Request with referral + - + + + Relayed request + - + + + 4) Dynamic routing - - +/- - +/-
rBPMN Editor
Implementation of BPMN2 + R2ML Eclipse plug-in based on GMF and EMF
Binaries available for download Going out as open source shortly Looking fwd to your feedback http://rbpmneditor.googlecode.com/ http://www.youtube.com/user/rbpmn
rBPMN Editor
rBPMN Heroes
Language design and implementation
Milan Milanovic Luis Rocha
MODELS 2009
Conclusion REWERSE I1 Rule Markup Language
MODELS 2009
Extension for Rule Models-name : String
FlowElement
-isForCompensation : Boolean
Activity Event
-gatewayDirection : GatewayDirection
Gateway
SequenceFlow-targetRef
1
-incoming
*
-sourceRef
1
-outgoing
*
-id : String-documentation : String
BaseElement
*
+rule
*
FlowElementContainer-container
1
-flowElements
*
Process
R2ML
Task
Rule
ReactionRule
AndOrNafNegFormula
1
-conditions*
1
-postCondition
1
DerivationRule
LogicalFormula
1
-conditions*
1
-conclusion
1..*
ProductionRule
1
-postCondition
1
1
-conditions
1..*
*
+condition 1
RuleGateway
rBPMN
FlowNode
-processType : ProcessType
Process
1
+condition*
-isNegative : Boolean
RuleCondition
*
+default 0..1
RuleSet
*
+rule
*
*
+ruleSet*rBPMN metamodel weaving
REWERSE I1 Rule Markup Language
MODELS 2009
Extension for Rule Models-name : String
FlowElement
-isForCompensation : Boolean
Activity Event
-gatewayDirection : GatewayDirection
Gateway
SequenceFlow-targetRef
1
-incoming
*
-sourceRef
1
-outgoing
*
-id : String-documentation : String
BaseElement
*
+rule
*
FlowElementContainer-container
1
-flowElements
*
Process
R2ML
Task
Rule
ReactionRule
AndOrNafNegFormula
1
-conditions*
1
-postCondition
1
DerivationRule
LogicalFormula
1
-conditions*
1
-conclusion
1..*
ProductionRule
1
-postCondition
1
1
-conditions
1..*
*
+condition 1
RuleGateway
rBPMN
FlowNode
-processType : ProcessType
Process
1
+condition*
-isNegative : Boolean
RuleCondition
*
+default 0..1
RuleSet
*
+rule
*
*
+ruleSet*rBPMN metamodel weaving
MODELS 2009
Conclusion REWERSE I1 Rule Markup Language
MODELS 2009
Extension for Rule Models-name : String
FlowElement
-isForCompensation : Boolean
Activity Event
-gatewayDirection : GatewayDirection
Gateway
SequenceFlow-targetRef
1
-incoming
*
-sourceRef
1
-outgoing
*
-id : String-documentation : String
BaseElement
*
+rule
*
FlowElementContainer-container
1
-flowElements
*
Process
R2ML
Task
Rule
ReactionRule
AndOrNafNegFormula
1
-conditions*
1
-postCondition
1
DerivationRule
LogicalFormula
1
-conditions*
1
-conclusion
1..*
ProductionRule
1
-postCondition
1
1
-conditions
1..*
*
+condition 1
RuleGateway
rBPMN
FlowNode
-processType : ProcessType
Process
1
+condition*
-isNegative : Boolean
RuleCondition
*
+default 0..1
RuleSet
*
+rule
*
*
+ruleSet*rBPMN metamodel weaving
REWERSE I1 Rule Markup Language
MODELS 2009
Extension for Rule Models-name : String
FlowElement
-isForCompensation : Boolean
Activity Event
-gatewayDirection : GatewayDirection
Gateway
SequenceFlow-targetRef
1
-incoming
*
-sourceRef
1
-outgoing
*
-id : String-documentation : String
BaseElement
*
+rule
*
FlowElementContainer-container
1
-flowElements
*
Process
R2ML
Task
Rule
ReactionRule
AndOrNafNegFormula
1
-conditions*
1
-postCondition
1
DerivationRule
LogicalFormula
1
-conditions*
1
-conclusion
1..*
ProductionRule
1
-postCondition
1
1
-conditions
1..*
*
+condition 1
RuleGateway
rBPMN
FlowNode
-processType : ProcessType
Process
1
+condition*
-isNegative : Boolean
RuleCondition
*
+default 0..1
RuleSet
*
+rule
*
*
+ruleSet*rBPMN metamodel weaving
MODELS 2009
Service Interaction Patterns
Contingent requests pattern
MODELS 2009
Service Interaction Patterns
Contingent requests pattern
MODELS 2009
Conclusion REWERSE I1 Rule Markup Language
MODELS 2009
Extension for Rule Models-name : String
FlowElement
-isForCompensation : Boolean
Activity Event
-gatewayDirection : GatewayDirection
Gateway
SequenceFlow-targetRef
1
-incoming
*
-sourceRef
1
-outgoing
*
-id : String-documentation : String
BaseElement
*
+rule
*
FlowElementContainer-container
1
-flowElements
*
Process
R2ML
Task
Rule
ReactionRule
AndOrNafNegFormula
1
-conditions*
1
-postCondition
1
DerivationRule
LogicalFormula
1
-conditions*
1
-conclusion
1..*
ProductionRule
1
-postCondition
1
1
-conditions
1..*
*
+condition 1
RuleGateway
rBPMN
FlowNode
-processType : ProcessType
Process
1
+condition*
-isNegative : Boolean
RuleCondition
*
+default 0..1
RuleSet
*
+rule
*
*
+ruleSet*rBPMN metamodel weaving
REWERSE I1 Rule Markup Language
MODELS 2009
Extension for Rule Models-name : String
FlowElement
-isForCompensation : Boolean
Activity Event
-gatewayDirection : GatewayDirection
Gateway
SequenceFlow-targetRef
1
-incoming
*
-sourceRef
1
-outgoing
*
-id : String-documentation : String
BaseElement
*
+rule
*
FlowElementContainer-container
1
-flowElements
*
Process
R2ML
Task
Rule
ReactionRule
AndOrNafNegFormula
1
-conditions*
1
-postCondition
1
DerivationRule
LogicalFormula
1
-conditions*
1
-conclusion
1..*
ProductionRule
1
-postCondition
1
1
-conditions
1..*
*
+condition 1
RuleGateway
rBPMN
FlowNode
-processType : ProcessType
Process
1
+condition*
-isNegative : Boolean
RuleCondition
*
+default 0..1
RuleSet
*
+rule
*
*
+ruleSet*rBPMN metamodel weaving
MODELS 2009
Service Interaction Patterns
Contingent requests pattern
MODELS 2009
Service Interaction Patterns
Contingent requests pattern
MODELS 2009
Service Interaction Patterns
Contingent requests pattern
MODELS 2009
Service Interaction Patterns
Contingent requests pattern
MODELS 2009
Conclusion REWERSE I1 Rule Markup Language
MODELS 2009
Extension for Rule Models-name : String
FlowElement
-isForCompensation : Boolean
Activity Event
-gatewayDirection : GatewayDirection
Gateway
SequenceFlow-targetRef
1
-incoming
*
-sourceRef
1
-outgoing
*
-id : String-documentation : String
BaseElement
*
+rule
*
FlowElementContainer-container
1
-flowElements
*
Process
R2ML
Task
Rule
ReactionRule
AndOrNafNegFormula
1
-conditions*
1
-postCondition
1
DerivationRule
LogicalFormula
1
-conditions*
1
-conclusion
1..*
ProductionRule
1
-postCondition
1
1
-conditions
1..*
*
+condition 1
RuleGateway
rBPMN
FlowNode
-processType : ProcessType
Process
1
+condition*
-isNegative : Boolean
RuleCondition
*
+default 0..1
RuleSet
*
+rule
*
*
+ruleSet*rBPMN metamodel weaving
REWERSE I1 Rule Markup Language
MODELS 2009
Extension for Rule Models-name : String
FlowElement
-isForCompensation : Boolean
Activity Event
-gatewayDirection : GatewayDirection
Gateway
SequenceFlow-targetRef
1
-incoming
*
-sourceRef
1
-outgoing
*
-id : String-documentation : String
BaseElement
*
+rule
*
FlowElementContainer-container
1
-flowElements
*
Process
R2ML
Task
Rule
ReactionRule
AndOrNafNegFormula
1
-conditions*
1
-postCondition
1
DerivationRule
LogicalFormula
1
-conditions*
1
-conclusion
1..*
ProductionRule
1
-postCondition
1
1
-conditions
1..*
*
+condition 1
RuleGateway
rBPMN
FlowNode
-processType : ProcessType
Process
1
+condition*
-isNegative : Boolean
RuleCondition
*
+default 0..1
RuleSet
*
+rule
*
*
+ruleSet*rBPMN metamodel weaving
MODELS 2009
Service Interaction Patterns
Contingent requests pattern
MODELS 2009
Service Interaction Patterns
Contingent requests pattern
MODELS 2009
Service Interaction Patterns
Contingent requests pattern
MODELS 2009
Service Interaction Patterns
Contingent requests pattern
Expressiveness comparison
Service Interaction PatternsLanguage Pattern
group Pattern Let’s
Dance BPMN
WS-CDL
iBPMN rBPMN
Send + + + + + Receive + + + + + 1) Send/Receive + + + + + Racing incoming messages + + + + + One-to-many send + - +/- + + One-from-many receive + - + + +
2)
One-to-many send/receive + - +/- + + Multi-responses + + + + + Contingent requests +/- - +/- +/- + 3) Atomic multicast notification - - - - - Request with referral + - + + + Relayed request + - + + + 4) Dynamic routing - - +/- - +/-
Expressiveness comparison
Service Interaction PatternsLanguage Pattern
group Pattern Let’s
Dance BPMN
WS-CDL
iBPMN rBPMN
Send + + + + + Receive + + + + + 1) Send/Receive + + + + + Racing incoming messages + + + + + One-to-many send + - +/- + + One-from-many receive + - + + +
2)
One-to-many send/receive + - +/- + + Multi-responses + + + + + Contingent requests +/- - +/- +/- + 3) Atomic multicast notification - - - - - Request with referral + - + + + Relayed request + - + + + 4) Dynamic routing - - +/- - +/-
MODELS 2009
Conclusion REWERSE I1 Rule Markup Language
MODELS 2009
Extension for Rule Models-name : String
FlowElement
-isForCompensation : Boolean
Activity Event
-gatewayDirection : GatewayDirection
Gateway
SequenceFlow-targetRef
1
-incoming
*
-sourceRef
1
-outgoing
*
-id : String-documentation : String
BaseElement
*
+rule
*
FlowElementContainer-container
1
-flowElements
*
Process
R2ML
Task
Rule
ReactionRule
AndOrNafNegFormula
1
-conditions*
1
-postCondition
1
DerivationRule
LogicalFormula
1
-conditions*
1
-conclusion
1..*
ProductionRule
1
-postCondition
1
1
-conditions
1..*
*
+condition 1
RuleGateway
rBPMN
FlowNode
-processType : ProcessType
Process
1
+condition*
-isNegative : Boolean
RuleCondition
*
+default 0..1
RuleSet
*
+rule
*
*
+ruleSet*rBPMN metamodel weaving
REWERSE I1 Rule Markup Language
MODELS 2009
Extension for Rule Models-name : String
FlowElement
-isForCompensation : Boolean
Activity Event
-gatewayDirection : GatewayDirection
Gateway
SequenceFlow-targetRef
1
-incoming
*
-sourceRef
1
-outgoing
*
-id : String-documentation : String
BaseElement
*
+rule
*
FlowElementContainer-container
1
-flowElements
*
Process
R2ML
Task
Rule
ReactionRule
AndOrNafNegFormula
1
-conditions*
1
-postCondition
1
DerivationRule
LogicalFormula
1
-conditions*
1
-conclusion
1..*
ProductionRule
1
-postCondition
1
1
-conditions
1..*
*
+condition 1
RuleGateway
rBPMN
FlowNode
-processType : ProcessType
Process
1
+condition*
-isNegative : Boolean
RuleCondition
*
+default 0..1
RuleSet
*
+rule
*
*
+ruleSet*rBPMN metamodel weaving
MODELS 2009
Service Interaction Patterns
Contingent requests pattern
MODELS 2009
Service Interaction Patterns
Contingent requests pattern
MODELS 2009
Service Interaction Patterns
Contingent requests pattern
MODELS 2009
Service Interaction Patterns
Contingent requests pattern
Expressiveness comparison
Service Interaction PatternsLanguage Pattern
group Pattern Let’s
Dance BPMN
WS-CDL
iBPMN rBPMN
Send + + + + + Receive + + + + + 1) Send/Receive + + + + + Racing incoming messages + + + + + One-to-many send + - +/- + + One-from-many receive + - + + +
2)
One-to-many send/receive + - +/- + + Multi-responses + + + + + Contingent requests +/- - +/- +/- + 3) Atomic multicast notification - - - - - Request with referral + - + + + Relayed request + - + + + 4) Dynamic routing - - +/- - +/-
Expressiveness comparison
Service Interaction PatternsLanguage Pattern
group Pattern Let’s
Dance BPMN
WS-CDL
iBPMN rBPMN
Send + + + + + Receive + + + + + 1) Send/Receive + + + + + Racing incoming messages + + + + + One-to-many send + - +/- + + One-from-many receive + - + + +
2)
One-to-many send/receive + - +/- + + Multi-responses + + + + + Contingent requests +/- - +/- +/- + 3) Atomic multicast notification - - - - - Request with referral + - + + + Relayed request + - + + + 4) Dynamic routing - - +/- - +/-
rBPMN EditorrBPMN Editor
Usability Semi-structured English vs. visual Interaction vs. interconnection model
Quality and empirical issues of rBPMN
MODELS 2009
Future Work
Usability Semi-structured English vs. visual Interaction vs. interconnection model
Quality and empirical issues of rBPMN
MODELS 2009
Future Work
Community call: We need a corpus!
Language formalization affairs Static and operational semantics
e.g., OWL2 and mCRL2 Coupled co-evolution of rules & processes
MODELS 2009
Future Work
Thank you!
Questions?