papazoglou webserv 2e cs solution notes part3
TRANSCRIPT
-
8/13/2019 Papazoglou Webserv 2e Cs Solution Notes Part3
1/16
ServiceOrientedArchitectureCaseStudy
Part3SOAImplementationoftheAVERSCaseStudy
Part-3SOAImplementationoftheAVERSCaseStudy
1Introduction
Thisreportaimsatthedescriptionoftheinitialstepsfortheimplementationofatop
down ServiceOrientedArchitecture (SOA) approach to theAVERS SupplyChain case study,
whichwasdescribedindetailintheliteraturereviewofthefirstassignment.
On the secondassignment,ahigh levelmodelof thewholeAVERS supplychainhas
beenbuilt,depictingthebusinessprocessesthatruletheentirechainfromthesupplypartto
the distribution of the final products, passing through the manufacturing activities. The
BusinessProcessModel&Notation(BPMN2.0)hasbeenusedtomodeltheprocessesand,asa
second step, thebusiness servicesneeded toenable the interactionsbetween thepartners
weredescribedintermsoftheirinterfaces,inputsandoutputs.
Finally, when it comes to this third assignment, further details regarding the
implementationof theproposedmodels are given.TheWeb ServicesDescription Language
(WSDL) files are designed for the business services, therefore identifying their constituent
operations and required parameters, as well as the Business Process Execution Language
(BPEL)filesfortheorchestrationofsuchservices.
Thisdocument,thus,describestheresultsachievedoneachstepofthedesignofthe
initial implementationdetails fortheAVERSSOAapproach.First, theaforementionedWSDL
andBPEL
files
are
implemented.
Then,
the
designed
BPEL
processes
are
enhanced
with
transactionorientedfeaturesbytheuseofscopes,faultandcompensationhandlers.Finally,a
discussion of how the designed BPEL processes fit into the previously designed BPMN
processesiscarriedout.
Note:
The processes Product inventory control and Product Shipment Administrationand
Production Controlare identified to be the richest of the processes. They contain most
possibilitiestoshow,howBPMNprocessescanberefinedandimplementedusingBPEL.They
alsocontain interactionwithexternalpartners, thusproviding transactions.Compensation is
modelledexplicitly,
as
well
as
fault
handling.
These
processes
are
modelled
with
all
needed
assignactions, instantiating all variables correctly. All activities that imply any message
exchange like the invoke and receiveactivityare implementedbasedon thecorresponding
WSDLfiles.Thus,correctoperationsareassigned totheseactivities. Itshouldbepossible to
come up with an executable version of these BPEL processes, needing little effort. (The
servicesneedtobeimplemented,ofcourse.)
Theother twoprocesses (OrderProcessingandProductionSchedulingandMaterialControl
andProcurement)areonlymodelledasskeletons.TheycanbemappedproperlytotheBPMN
models but they are not ready to execute. They do not contain valid assigncode and the
operationsare
not
mapped
to
the
corresponding
WSDL
files.
(But
these
files
are
provided
and
describedhere.)
-
8/13/2019 Papazoglou Webserv 2e Cs Solution Notes Part3
2/16
ServiceOrientedArchitectureCaseStudy
Part3SOAImplementationoftheAVERSCaseStudy
This thoughtfuldecisionwas takenbecauseofexternal time constraints.Because it is truly
believedthatthetwoaforementionedBPELprocesses(ProductinventorycontrolandProduct
Shipment Administration and Production Control) show in detail the pitfalls andmappings
fromBPMN
to
BPEL,
this
approachwas
taken
and
to
be
considered
acceptable.
2ImplementationoftheWSDLDescriptionsandBPELProcesses
In thissection, thevariousWebServices required for theAVERSSupplyChainare identified
and designed corresponding to the core processes defined in Assignment 2 as per the
ANSI/ISA95sfunctionalflowdatamodel.Then,fourBPELOrchestrationprocessesaredefined
with respect to the fourbasicprocessesof theSupplyChain.A totalof twelveWebService
DescriptionLanguage(WSDL)filesaredefinedcorrespondingtothefourbasicprocesseslisted
below:
OrderProcessingandProductionScheduling:
OrderManagementServices:OrderManagementService.wsdl CustomerRelationshipManagementServices:CRMService.wsdl
ProductionControl:
ProductionRequestServices:ProductionRequestWS.wsdl ProductionRuleServices:ProductionRuleWS.wsdl ProductionLineServices:ProductionLineWS.wsdl RawMaterialServices:RawMaterialWS.wsdl
MaterialControlandProcurement:
InventoryManagementServices:InventoryMgmtWS.wsdl MaterialRequestServices:MaterialRequestWS.wsdl SupplierRelationshipServices:SupplierRelationshipWS.wsdl NotificationServices:NotificationWS.wsdl ExternalSupplierServices:ExternalSuppliersWS.wsdl
ProductinventorycontrolandProductShipmentAdministration:
CustomerServices:ProductInventoryControlCustomerServices.wsdl CarrierServices:ProductInventoryControlCarrierServices.wsdl ProcessinternalServices:ProductInventoryControlProcessInternalOperations.wsdl
FortheProduct inventorycontrolandProductShipmentAdministrationprocess,aWSDLfor
internal services has been designed. BPMN provides the concept of tasks,whichwas used
whenmodelling.ThisconceptcannotbetransferredtoBPEL,sinceBPELbasicallyknowsonly
theinvokeactivitytodosomeprocessing.Internalexecutionofscriptsordatacollectionisnot
possible. Thus, the internal service provides operations like data collection for the BPEL
process.Furthermore,theoriginallydescribedWSDL(inAssignment2) issplit intwopartsto
clearlyshowtheimpactofexternalcollaborators.Inthiscase,thereisacarrierserviceswhichprovides interaction with external carriers and a customer service for the customer
-
8/13/2019 Papazoglou Webserv 2e Cs Solution Notes Part3
3/16
ServiceOrientedArchitectureCaseStudy
Part3SOAImplementationoftheAVERSCaseStudy
interaction.Note that there isonlyoneWSDL for all carriers. It isassumed thatall carriers
providethesameoperationsanddataschema.
AlltheWSDLsaredesignedusingtheTopDownapproachwiththehelpoftheEclipseWSDL
Editor.Thedetailsregardingtheoperationsinputandoutputstructure,ofeachWebServicehasalreadybeendescribedinAssignment2,andhasnotbeenexplainedhereagain.ModelingProcedure:
This sectiondescribes theprocedure thatwas followed tomodel theWSDLsusing theTop
Down approach using the Eclipse Editor. Only the Order Management Service has been
describedindetailhere,andthesamemethodologywasfollowedtomodelalltheremaining
WSDLs.
Definitionof
Operations:
Figure1:WebServiceOperationsDefinition
-
8/13/2019 Papazoglou Webserv 2e Cs Solution Notes Part3
4/16
ServiceOrientedArchitectureCaseStudy
Part3SOAImplementationoftheAVERSCaseStudy
DefinitionofInputandOutput:
Figure2:InputandOutputDefinitioninWSDL
DefinitionofCustomTypes:
Figure3:MessageTypeDefinitioninWSDL
-
8/13/2019 Papazoglou Webserv 2e Cs Solution Notes Part3
5/16
ServiceOrientedArchitectureCaseStudy
Part3SOAImplementationoftheAVERSCaseStudy
3ImplementationofTransactionsandCompensationsinBPEL
Themain
focus
on
transactions
was
given
to
transactions
with
external
partners.
Scopes
are
definedaroundtheactivitiesthatexecutetransactions.Anexampleisgivenherebasedonthe
ProductinventorycontrolandProductShipmentAdministrationprocess.
Figure4:ScopeandCompensation
Theredframeabovemarksthescopeinapartoftheprocess.Withinthescope,aselected
routeis
booked
with
an
external
carrier.
This
transaction
is
modeled
in
an
asynchronous
style.
Incaseanythinggoeswrongwithinthisscope(ortransaction),thisbookinghastobe
compensated,whichisshownintherightpart.Compensationisdoneinthiscasebenotifying
aninternalprogramaboutthiserror.Then,furthercompensationispropagated,incaseother
activitieshavetobecompensated.Anerroristhrown,becausewithoutcarrier,theprocess
cannotcontinueandterminatesuccessfully.Manualactionisneededinthiscase.
-
8/13/2019 Papazoglou Webserv 2e Cs Solution Notes Part3
6/16
ServiceOrientedArchitectureCaseStudy
Part3SOAImplementationoftheAVERSCaseStudy
Figure5:Faulthandling
Anotherexampleiserrorhandling.Again,theleftsideshowsactivitieswithinascope.
Productsarepreparedforshipmentandwhentheyarehandedovertothecarrier,theprocess
getsanotification.Incasesomethinggoeswrongherewithinthisscope,e.g.theproductsare
nothandedovertothecarrierforanyreason,afaultisthrown. Aninternalnotificationissent
andcompensation
is
triggered.
Thus,
other
activities
or
scopes
that
implement
compensation
andarealreadycompletedarecompensatedthisway.Compensationaswellasfaulthandling
ispropagatedfrombottomtotop.Consequently,thebookingofacarrieriscanceled
automaticallybycompensationpropagation(seeexampleabove,whichisfromthesame
process).
-
8/13/2019 Papazoglou Webserv 2e Cs Solution Notes Part3
7/16
ServiceOrientedArchitectureCaseStudy
Part3SOAImplementationoftheAVERSCaseStudy
4RelatingtheBPELModelstotheBPMNModelsofAssignment2
Thissection
explains
how
the
BPEL
processes
that
are
designed
fit
into
the
BPMN
processes
thatweremodeledinAssignment2.FourcoreprocessesweredefinedinAssignment2asper
theANSI/ISA95s functional flowdatamodel,andoneBPMN2.0diagramwasmodelled for
eachofthesecoreprocesses. Inthisassignment, itwasdecidedtorelateeachofthese four
BPMNdiagramstoacorrespondingBPELprocess.
OrderProcessingandProductionScheduling ProductionControl MaterialControlandProcurement ProductinventorycontrolandProductShipmentAdministration
AllthefourBPELProcessesaremodelledintheAsynchronousmanner,withcorrelationsetsin
ordertomaintaincontextforasinglePurchaseOrderRequest.Thescopeandcompensation
sphereshavealsobeenmodelledineachoftheseBPELprocesses.
BPEL01OrderProcessingandProductionScheduling:
ThemainfunctionsofthisBPELprocessaretheCustomerOrderhandling,OrderAcceptance
and Confirmation. It involves verifying the order, registration of the order, verifying the
customerliquidity,checkingthetypeofcustomerinordertoconsolidatetheorderandfinally
preparingthefinalInvoice(orBill)fortheCustomer.
-
8/13/2019 Papazoglou Webserv 2e Cs Solution Notes Part3
8/16
ServiceOrientedArchitectureCaseStudy
Part3SOAImplementationoftheAVERSCaseStudy
Figure6:OrderProcessingProductionSchedulingBPELProcess
-
8/13/2019 Papazoglou Webserv 2e Cs Solution Notes Part3
9/16
ServiceOrientedArchitectureCaseStudy
Part3SOAImplementationoftheAVERSCaseStudy
BPEL02ProductionControl:
ThisBPELprocessperformsthemain functionssuchascheckingtheaccordanceofschedule
with
production
schedule
and
standards.
It
also
involves
performing
plant
engineering
activities and update of process plan. Furthermore, it also issues requirements for raw
materialsandtransformationofrawmaterialsintoendproducts.
-
8/13/2019 Papazoglou Webserv 2e Cs Solution Notes Part3
10/16
ServiceOrientedArchitectureCaseStudy
Part3SOAImplementationoftheAVERSCaseStudy
Figure7:ProdutionControlProcess
BPEL03
Material
Control
and
Procurement:
-
8/13/2019 Papazoglou Webserv 2e Cs Solution Notes Part3
11/16
ServiceOrientedArchitectureCaseStudy
Part3SOAImplementationoftheAVERSCaseStudy
Thisprocess isprimarilyaboutmanaging the inventory. Italsoperformsother functions like
managing transfersofmaterialandplacingorderswithsuppliers for rawmaterials,supplies,
spare parts, tools,equipment and other required materials. It also monitors progress of
purchasesand
performs
reporting
to
requisitioners.
Furthermore
is
also
handles
receiptof
incoming material supplies, and release incoming invoices for payment after arrival and
approvalofgoods.
-
8/13/2019 Papazoglou Webserv 2e Cs Solution Notes Part3
12/16
ServiceOrientedArchitectureCaseStudy
Part3SOAImplementationoftheAVERSCaseStudy
Figure8:MaterialControlProcurementBPELProcess
-
8/13/2019 Papazoglou Webserv 2e Cs Solution Notes Part3
13/16
ServiceOrientedArchitectureCaseStudy
Part3SOAImplementationoftheAVERSCaseStudy
BPEL04ProductinventorycontrolandProductShipmentAdministration:
ThisBPELprocessdealswithmanaginginventoryoffinishedproducts,makingreservationsfor
specific
product
in
accordance
with
product
selling
directives
and
organizing
transport
for
productshipmentinaccordancewithacceptedordersrequirements.Italsoinvolvesnegotiating
andplacingorderswith transport companies, and releasingmaterial for shipment.Finally, it
preparestheshipmentconfirmationandperformsinvoicingtobesenttothecustomer.
-
8/13/2019 Papazoglou Webserv 2e Cs Solution Notes Part3
14/16
ServiceOrientedArchitectureCaseStudy
Part3SOAImplementationoftheAVERSCaseStudy
Figure9:ProductinventorycontrolandProductShipmentAdministration
Basically,the
BPEL
process
shows
the
same
activities
like
the
BPMN
model.
As
mentioned
before,BPMNprovides the conceptof tasks,whichwasusedwhenmodelling.Thisconcept
-
8/13/2019 Papazoglou Webserv 2e Cs Solution Notes Part3
15/16
ServiceOrientedArchitectureCaseStudy
Part3SOAImplementationoftheAVERSCaseStudy
cannotbetransferredtoBPEL,sinceBPELbasicallyknowsonlytheinvokeactivitytodosome
processing.Furthermore,BPELdoesnotunderstandtheconceptofmultipleinstanceactivities
which are activities inBPMN that are executedmultiple times and inparallel. In this BPEL
process,thiswasmodelledasaforloopthatexecutesactivities inparallel.Itsrangedepends
ontheactivitybefore,thatmeanshowmanyactivitieshavetoberuninparallel.Theforloop
loopsexactlythatmanytimes,thusitisdetermineddynamicallyusingvariables.
Figure10:MappingofmultipleInstanceactivitiesfromBPMNtoBPEL
Furthermore,sometasksinBPMNhavebeenleftoutinBPELbecauseBPELdoesnotsupport
this conceptof tasks, asmentioned. These tasks inBPMNdidmostly somedata gathering,
gettingdatafromadatabaseforexample.Theideawastokeepthedataflowofeachprocess
instancelow
when
data
is
not
needed
frequently.
In
BPEL
however,
data
is
often
modelled
usingglobalvariables,thusbeingavailableduringthewhole instance life.Theseactivitiesare
notrepeatedlymodelledintheBPELsincetheywouldnotaddanyvalue.
5Conclusion
TheSOAimplementationprovidesaBPELmodelforasupplychainscenario.Basedon
previouslymodeled BPMNprocesses,BPELprocessesweremodeledandrefined.WSDLfiles
forseveralservicesinthedescribedsupplychainscenariowerecreated.
BPELisseenasavalidprocessmodelinglanguagetorefineaBPMNmodel.Executable
solutionscanbeachieved.However,thisdoesnotgosmooth.BPMNandBPELhavedifferent
scopesandthusdifferentcomplexity.BPMNinitsversion2.0providesmanynewmodeling
artifactswhichcannotbemappedeasilytoBPEL,e.g.simpletasks,humantasks,ormore
specifically,multipleinstanceactivities.Errorhandlingisevenmorecomplextomodelfrom
BPMNtoBPEL.Thus,itwasnoteasytomapallconceptsmodeledinBPMNtotheBPEL
processes.
BPELismissingfurtherevolvement.Sinceitslastversionsomeyearsagotherehasnotbeen
mucheffort
to
improve
the
language
further,
only
through
extensions.
So
any
modeling
of
a
-
8/13/2019 Papazoglou Webserv 2e Cs Solution Notes Part3
16/16
ServiceOrientedArchitectureCaseStudy
Part3SOAImplementationoftheAVERSCaseStudy
processisstillaquitecomplexandtimeconsumingprocess,howeverprocessescanbe
modeledsuccessfully(tobeexecutable).
6Acknowledgements
Theauthorwishestoacknowledgethefollowingstudentsfortheimplementationofthe
AVERSCaseStudy.
AjaySagar FbioCardosoCoutinho HolgerEdgarOviedoCahuata RodrigoDeOliveiraMachado SuriChandramouli TobiasHberle