Transcript Document

3146
Modeling BPEL4WS
Richard C. Gronback
Sr. Product Manager, Together Products
Borland Software Corporation
Agenda
Introduction to BPM
BPEL4WS
Modeling BPEL4WS
– BPMN
– UML
– BPMD
Deployment
Conclusion
What is BPM?
Business Process [Management | Modeling]
• In general, the design, execution, maintenance,
and optimization of business processes.
• Why model a business process?
– The same reasons we model software, or
anything, really.
Remember, software development is a business process!
Available Notations & Methodologies
•
•
•
•
•
•
•
•
•
UML Activity Diagram
UML EDOC Business Processes
IDEF
ebXML BPSS
Activity-Decision Flow (ADF) Diagram
RosettaNet
LOVeM
Event-Process Chains (EPCs)
Many more…
•
There are literally hundreds of tools with varying capabilities,
utilizing many disparate processes and notations.
BPMI.org
Business Process Management Initiative
• Non-profit organization that aims to
establish standards for BPM
• Working on specifications for:
– Business Process Modeling Language (BPML)
– Business Process Modeling Notation (BPMN)
– Business Process Query Language (BPQL)
•
Focuses on private, internal implementation while ebXML, RosettaNet,
etc. focus on external interfaces.
Orchestration vs. Choreography
Message A
Orchestration
BPEL4WS
Message B
1.
Business
Choreography
Business Process
Process A
Message A
2.
Message B
3.
Message C
Business
Process B
ebXML
WS Choreography
BPEL4WS
• Business Process Execution Language
for Web Services
– Combination of IBM’s WSFL and
Microsoft’s XLANG
– Specification authored by:
•
•
•
•
•
IBM
Microsoft
BEA
SAP
Siebel Systems
BPEL4WS
• Defines a model and grammar for
describing the behavior of a business
process based on interactions between
the process and its partners.
– Exclusively using Web Services
– Models executable and abstract processes
– Layered on top of:
• WSDL 1.1
• XML Schema 1.0
• XPath 1.0
BPEL4WS Core Concepts
There are several core concepts of BPEL:
• Partner Links
• Variables
• Correlation Sets
• Fault Handlers
• Activities
Structure of a BPEL “Program”
State
Interaction
Points
Behavior
<variables>
<variable name="PO" messageType="lns:POMessage"/>
…
</variables>
<partnerLinks>
<partnerLink name="purchasing“
partnerLinkType="lns:purchasingLT"
myRole="purchaseService"/>
…
</partnerLinks>
<sequence>
<assign>
<copy>
<from variable="PO" part="customerInfo"/>
<to variable="shippingRequest“ part="customerInfo"/>
</copy>
</assign>
…
</sequence>
BPEL4WS Usage Patterns
• Two major usage patterns, each specified
by extensions to the core concepts:
– Business Protocols
• Roles defined using notion of abstract
process
• Handle only protocol-relevant data
Identified as message properties
– Executable Processes
• Logic and state determine nature and
sequence of Web Service interactions
How to Model BPEL4WS?
• BPEL4WS specification provides no
visual notation well, except for what’s here
– Several possibilities:
• Business Process Modeling Notation
(BPMN)
• Unified Modeling Language (UML)
• Proprietary visual notation based directly
on BPEL4WS
Why Model BPEL4WS?
• Consider this pseudo code for a simple Shipping
Service:
receive shipOrder
switch
case shipComplete
send shipNotice
otherwise
itemsShipped := 0
while itemsShipped < itemsTotal
itemsCount := opaque // non-deterministic assignment
// corresponding e.g. to
// internal interaction with
// back-end system
send shipNotice
itemsShipped = itemsShipped + itemsCount
Why Model BPEL4WS?
• Now, consider the following BPEL4WS
process…
Why Model BPEL4WS?
Why Model BPEL4WS?
Why Model BPEL4WS?
Why Model BPEL4WS?
BPMN
Business Process Modeling Notation
• Aims to appeal to wide range of users:
– Business Analysts
– Developers
– Business People
• 1.0 specification released May 2004
• Defines elements of BPD (Business
Process Diagram)
Business Process Diagrams
Diagrams consist of four categories of
diagramming elements:
– Flow Objects
– Connecting Objects
– Swimlanes
– Artifacts
BPD Flow Objects
Diagrams consist of three core elements:
– Event
• Hollow to allow for markers
Start
Intermediate
End
– Activity
• Generic “work” element
Task
– Gateway
• Decision, forking, joining, merging
Sub-Process
BPD Connecting Objects
Three ways to connect flow objects:
• Sequence Flow
– Indicates order of activities
• Message Flow
– Indicates flow of messages between Process
Participants
• Association
– Associates data, text, or other Artifacts with flow
objects
Simple Business Process
BPD Swimlanes
Used to organize activities by responsibility
or functional capability
• Pool
– Represents a Participant
in a Process
• Lane
– A sub-partition within a
Pool used to organize and
categorize activities
BPD Artifacts
Any number of Artifacts can be added to a
diagram, with three types predefined:
• Data Object
– Show how data is required or produced by
activities
• Group
– Used for documentation or analysis, but does
not affect the sequence flow
• Annotation
– Allow for textual notes to be added
Another BPD Sample
Mapping BPMNBPEL4WS
• BPMN specification provides a mapping
to BPEL4WS
– Creates a bridge between businessoriented process model to deployable
execution language
– BPEL4WS XSD becomes a partial
BPMN metamodel
Mapping BPMNBPEL4WS
• There are 3 basic types of BPMN sub-models:
– Private (internal) business processes
• Maps to BPEL4WS process
– Abstract (public) processes
• Maps to BPEL4WS abstract process
– Collaboration (global) processes
• Someday, may map to ebXML BPSS, RosettaNet,
or future W3C Choreography Working Group
BPMN Private Process
Example:
BPMN Abstract Process
Example:
BPMN Collaboration Process
Example:
Unified Modeling Language™
• The UML 2.0 metamodel is adequate for
modeling business processes
• A Profile applied to existing specification
can allow for modeling BPEL4WS
• Optionally, a constrained subset of the
UML 2.0 metamodel can also be used
– Business Process Metamodel
Definition (BPDM)
BPDM
Business Process Definition Metamodel
• Subset of UML 2 metamodel focused on
modeling business processes
• Revised 08/02/2004 submission by:
–
–
–
–
–
–
IBM
Adaptive
Borland
Data Access Technologies
EDS
88 Solutions
BPDM
Contains the following:
–
–
–
–
–
UML 2.0 Profile for BPD
UML 1.5 Profile for BPEL4WS
Mapping from BPD Metamodel to BPEL4WS
Mapping from EDOC to BPD Metamodel
Mapping from BPMN to BPD Metamodel
BPDM
BPDM Notation
Services and Processes
BPDM Notation
Tasks
BPDM Notation
Tasks
BPDM Notation
Pins and Flows
BPDM Notation
Pins and Flows
BPDM Notation
Miscellaneous
BPDM Example
BPDM Example
BPDM Example
Mapping to BPEL4WS
From BPMN
BPMNBPEL4WS Example
BPMNBPEL4WS Loop
BPMNBPEL4WS Loop
Mapping Example
• Let’s explore the diagram elements and
mappings of BPMN to BPEL4WS
– Domain is E-mail Voting Process
• From BPMN Specification
• Focus here is on Discussion Cycle subprocess for simplicity
E-mail Voting Process
Mapping Discussion Cycle
• Discussion Cycle sub-process in BPD (of
BPMN) maps to BPEL4WS process
– Invocation from higher-level process means it
will start with receive and end with reply
<process name="Discussion_Cycle">
<sequence>
<receive partnerLink="Internal" portType="tns:processPort"
operation="call_Discussion_Cycle"
variable="processData" createInstance="Yes"/>
...
<reply partnerLink="Internal" portType="tns:processPort"
operation="call_Discussion_Cycle" variable="processData"/>
</sequence>
</process>
Discussion Cycle
Announce Issues
• The “Announce Issues for Discussion”
task maps to a BPEL4WS invoke
<invoke name="AnnounceIssuesforDiscussion"
partnerLink="WGVoter"
portType="tns:emailPort"
operation="sendDiscussionAnnouncement"
inputVariable="processData"/>
Discussion Cycle
Parallel Paths
• The output of the “Announce Issues for
Discussion” task follows 3 paths that map
to a BPEL4WS flow element
<flow>
<invoke name="ModerateEmailDiscussion" …
…
<invoke name="EMailDiscussionDeadlineWarning" …
…
<invoke name="CheckCalendarforConferenceCall" …
…
</flow>
Discussion Cycle
Upper Parallel Path
• The Moderate E-mail Discussion task
maps to a synchronous BPEL4WS
invoke element
<invoke name="ModerateEmailDiscussion"
partnerLink="internal"
portType="tns:internalPort“
operation="sendDiscussion“
inputVariable="processData“
outputVariable="processData"/>
Upper Parallel Path
• The Timer Intermediate Event on task
boundary maps to scope element
wrapping the invoke element with
faultHandlers
<scope>
<invoke name="ModerateEmailDiscussion" …
<faultHandlers>
<catch faultName="7Days_Exit">
<empty/>
</catch>
</faultHandlers>
…
Upper Parallel Path
• To create event at proper time, BPEL4WS
eventHandlers added to the scope
– Why the onAlarm to throw to empty
catch?
…
<eventHandlers>
<onAlarm for="tns:OneWeek">
<throw faultName="7Days_Exit"/>
</onAlarm>
</eventHandlers>
</scope>
Discussion Cycle
Middle Parallel Path
• The delay and E-Mail Discussion Deadline
Warning task map to BPEL4WS wait and
invoke elements within a sequence
element.
<sequence>
<wait name="Delay6daysfromDiscussionAnnouncement" for="P6D"/>
<invoke name="EMailDiscussionDeadlineWarning"
partnerLink="WGVoter" portType="tns:emailPort"
operation="sendDiscussionWarning"
inputVariable="processData">
</invoke>
</sequence>
Discussion Cycle
Lower Parallel Path
• The Check Calendar for Conference Call
task maps to BPEL4WS invoke element.
– A decision on output can be handled with a
BPEL4WS switch or reference links elements
<invoke name="CheckCalendarforConferenceCall"
partnerLink="internal" portType="tns:internalPort"
operation="receiveCallSchedule" inputVariable="processData"
outputVariable="processData">
…
</invoke>
Lower Parallel Path
• In this case, decision maps to BPEL4WS links in
source elements with corresponding
transitionCondition attribute.
<flow>
<links>
<link name="CheckCalendarforConferenceCalltoWaituntilThursday,9am"/>
<link name="CheckCalendarforConferenceCalltoEmpty"/>
…
<invoke name="CheckCalendarforConferenceCall"
…
<source linkName="CheckCalendarforConferenceCalltoWaituntilThursday9am"
transitionCondition="bpws:getVariableProperty(processData,conCall)=true"/>
<source linkName="CheckCalendarforConferenceCalltoEmpty"
transitionCondition="not(bpws:getVariableProperty(processData,conCall)=true)"/>
</invoke>
Lower Parallel Path
• From the “Yes” output from the decision, a
BPEL4WS wait element is mapped.
– The wait element contains nested target and
source elements with linkName attributes
<flow>
<links>
…
<link name="WaituntilThursday9amtoModerateConferenceCallDiscussion"/>
<link name="CheckCalendarforConferenceCalltoWaituntilThursday,9am"/>
…
<wait name="WaituntilThursday9am" for="P6DT9H">
<target linkName="CheckCalendarforConferenceCalltoWaituntilThursday9am">
<source linkName="WaituntilThursday9amtoModerateConferenceCallDiscussion"/>
</wait>
Lower Parallel Path
• Following the wait, the Moderate Conference Call
Discussion task maps to a BPEL4WS invoke
element.
<invoke name="ModerateConferenceCallDiscussion"
partnerLink="internal"
portType="tns:internalPort"
operation="sendConCall"
inputVariable="processData"
outputVariable="processData">
<target linkName="WaituntilThursday9amtoModerateConferenceCallDiscussion"/>
</invoke>
Lower Parallel Path
• The default “No” output from the decision maps to
a BPEL4WS empty element.
– A merging Exclusive Gateway used to form
the end of lower parallel path before Parallel
Gateway marks end of the flow
<empty>
<target linkName="CheckCalendarforConferenceCalltoEmpty"/>
</empty>
Discussion Cycle
End of Parallel Paths
• Parallel Gateway marks end of flow and is
followed by a task Evaluate Discussion Progress,
which maps to BPEL4WS invoke element.
– This marks end of outer sequence and the
process itself.
…
</flow>
<invoke name="EvaluateDiscussionProgress" partnerLink="internal"
portType="tns:internalPort" operation="receiveDiscussionStatus"
inputVariable="processData" outputVariable="processData"/>
<reply partnerLink="Internal" portType="tns:processPort"
operation="call_Discussion_Cycle" variable="processData"/>
</sequence>
</process>
Trouble Ticket Example
• Another example of notational differences
– Comes from BPDM Examples to
compare:
• BPDM
• BPMN
• UML2
BPDM Example
BPMN Example
UML2.0 Example
Model-Driven Architecture®
How does modeling BPEL4WS relate
to MDA®?
What is MDA?
• According to the Object Management
Group (OMG):
– MDA provides an open, vendor-neutral approach to
the challenge of business and technology change.
– MDA aims to separate business or application logic
from underlying platform technology.
– Platform-independent models can enable intellectual
property to move away from technology-specific code,
helping to insulate business applications from
technology evolution, and further enable
interoperability.
The Benefits of MDA
Portability
– Insulation from underlying technology change
– Future-proof applications with domain model
Productivity
– Code generation
– Communicate visually, thereby reducing complexity
Cross-Platform Interoperability
– Generated bridges
Easier Maintenance and Documentation
– Design artifacts become development artifacts
What Comprises MDA?
• MDA is not a single specification, but a
collection of related OMG specifications:
– Unified Modeling Language (UML™) 2.0
•
•
•
•
•
–
–
–
–
Infrastructure
Superstructure
Object Constraint Language (OCL)
Diagram Interchange
Profiles
Meta-Object Facility (MOF)
XML Meta-Data Interchange (XMI)
Common Warehouse Meta-model (CWM)
Query View Transformation (QVT)
The MDA Logo
• Note the industry verticals… MDA is not
intended to be a general purpose model-to-code
solution.
– Anticipate Domain-Specific Languages & Frameworks
Transformations
This is the challenge for MDA!
• Inspired by existing CWM transformation technology
– MOF2 Core will align basis of UML and CWM
• Query, View, Transformation specification is needed
– At present, QVT is MIA
A record of transformation is
required to maintain traceability
and synchronization.
Model Marking Transformation
Marks are specific to a transformation
– Can be a stereotype in a profile, for example
The Abstraction Gap
Person
House
0..*
1
-value:Money
houses
1
owner
-ssn:Integer
-salary:Money
+getMortg age(sum:Money,security:House):Mortgag e
security
1
borrower
Mortgage
0..*
mortgag es
-principal:Money
-monthlyPayment:Money
-start:Date
-end:Date
0..*
mortgag es
Level of
Abstraction
Abstraction Gap
Today!
Middleware
with
Practical(ly)
Framework
Unlikely?
3GL with Middleware
Impractical?
3GL with Operating System
Impossible?
Machine Code with Operating System
Machine Code
Generators
What About SOA and BPM?
Business Process Execution Language for Web Services
(BPEL4WS)
– An XML standard for defining business processes with
Web Services
– Provides high level of abstraction  lends itself to
generation from models
• Negligible abstraction gap
– UML Profile for Automated Business Processes
• Allows UML Class and Activity diagrams to model BPEL
• Generate WSDL, BPEL and XSD Schema
Business Process Definition Metamodel being developed
– UML2-based metamodel with profile for BPD with
mapping to BPEL4WS
Deploying BPEL4WS
What’s Next?
Deployment
• Once you generate a .bpel file from a model (or
otherwise), what to do with it?
– Microsoft BizTalk Server 2004
– BEA WebLogic Integration (imports BPEL4WS)
– AlphaWorks has BPWS4J engine
• Plus, toolkit for transforming UMLBPEL
– Oracle BPEL Process Manager
• Engine with Eclipse-based designer
– Open source
• e.g. ActiveBPEL, Twister
AlphaWorks BPWS4J
Process execution engine, plus UML Profile
 WSDL + BPEL toolkit
Oracle BPEL Designer
• Works directly with
.bpel files
• Deploys to Oracle
BPEL engine
Summary
BPEL4WS Modeling Options
BPMN
– Should become standard notation
– No underlying MOF-based metamodel
BPDM
– Yet another notation, multiple mappings
UML Profile
– UML tools unpalatable to business modelers
Proprietary
– Can map directly to BPEL4WS
A Practical Application?
Imagine…
• Model software development process
with BPMN (CIM)
• Extract executable model, based on
available web services (PIM)
• Transform BPMN to BPEL4WS and
WSDL (PSM)
• Deploy custom process automation to
BPEL4WS execution engine
Questions?
Thank you!
Thank You
3146
Modeling BPEL4WS
Please fill out the speaker evaluation
You can contact me further at …
[email protected]
References
[BPEL4WS] Business Process Execution Language for Web
Services, Version 1.1, May 05, 2003. http://www106.ibm.com/developerworks/webservices/library/ws-bpel/
[BPDM] Business Process Definition Metamodel, Version
1.0.2, August 02, 2004. http://www.omg.org/cgibin/apps/doc?bei/04-08-03.pdf
[BPMN] Business Process Modeling Notation, Version 1.0,
May 03, 2004. http://www.bpmi.org/specifications.esp
[UML2BPEL] K. Mantell, “From UML to BPEL: Model Driven
Architecture in a Web Services World” September 09,
2003. http://www106.ibm.com/developerworks/webservices/library/wsuml2bpel/