bpel development with activebpel brendan tansey. what is bpel? business process execution language...
TRANSCRIPT
![Page 1: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/1.jpg)
BPEL Development with ActiveBPEL
Brendan Tansey
![Page 2: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/2.jpg)
What is BPEL?
• Business Process Execution Language for Web Services (BPEL4WS)
• Web service orchestration language
• Simple arithmetic and logical operators
• Lecture on Oct 26th!
![Page 3: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/3.jpg)
BPEL Development
• Requires:– BPEL Engine– BPEL Developer (or text
editor, for the masochistic)
• BPEL Engine– Executes BPEL processes– IBM BPWS4J– ActiveBPEL Engine– Installation notes on Wiki
![Page 4: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/4.jpg)
BPEL Developer
• Oracle BPEL Designer– Oracle BPEL Process
Manager (OC4J, JBOSS, BEA WebLogic)
• Eclipse BPEL Project• Parasoft BPEL Maestro• Intalio Designer• Many others
![Page 5: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/5.jpg)
ActiveBPEL Designer
• Construct graphical workflows
• Assist with WSDL creation• Simulate workflow execution• Prepare service for
deployment• Deploy service to ActiveBPEL
server• Eclipse-based• Makes your life easier
![Page 6: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/6.jpg)
ActiveBPEL Designer Cons• Windows-only
– Windows lab in CSC 1-67– Go to CSC 1-43 to get an
account– Install onto network drive– Make workspace on network
drive
• Quirky– Hence, presentation
![Page 7: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/7.jpg)
ActiveBPEL Designer Demo• Create a simple web service
that adds 4 input numbers• Uses an existing web service
– Takes 4 numbers as input {a,b,c,d}
– Returns two sums as output {a+b, c+d}
• Create client for service
![Page 8: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/8.jpg)
Live Demo! (with slides)
Using an external web service to add four numbers
![Page 9: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/9.jpg)
Create project/BPEL
Add external web references
![Page 10: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/10.jpg)
Create sequence
• Drag ‘Sequence’ from palette
• In sequence, insert “Operation Wizard”
• Follow wizard instructions, creating a new WSDL file in your current project
• Refresh project so new WSDL is visible
![Page 11: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/11.jpg)
Create service instance
• Force first element of sequence to create a new instance
![Page 12: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/12.jpg)
Using external services
• Add WSDLs as imports
![Page 13: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/13.jpg)
Using external services• Create input and output
variables for services
![Page 14: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/14.jpg)
Create assignment activity• Assign our service’s input
to input for other service
![Page 15: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/15.jpg)
Invoke web service
• Create invoke activity with Operation Wizard
• Select local copy of remote WSDL (can’t use remote copy – buggy)
• Choose port type and operation
• Create new PLT• Add to existing WSDL
(buggy)
![Page 16: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/16.jpg)
Assign service output
• Use built-in arithmetic operator
![Page 17: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/17.jpg)
Simulating execution
![Page 18: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/18.jpg)
Providing sample input
![Page 19: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/19.jpg)
Error!
• Need to initialize complex types before using• Initialize with literals.<in0 xmlns="" xmlns:def="http://siffleur.cs.ualberta.ca:9999/axis/services/AddFunction1Service" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="def:Complex"> <i xmlns:tns="Sum4WSDL" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:double">0.0</i> <r xmlns:tns="Sum4WSDL" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:double">0.0</r></in0>
• Red = Invoked service’s namespace• Green = Your service’s namespace• Yellow = Variable type & element types• Magenta = Variable structure
![Page 20: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/20.jpg)
Creating complex responses
<?xml version="1.0" encoding="UTF-8"?><ns1:addComplexReturn xmlns:ns1="urn:BeanService">
<i>4.2</i><r>5.7</r>
</ns1:addComplexReturn>
![Page 21: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/21.jpg)
Successful simulation
Can now examine output variable
![Page 22: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/22.jpg)
Deploying your service
• The ActiveBPEL Engine requires that all services are packaged into .bpr files.– These packages need deployment
descriptors and manifests
• These files need to be placed in the Tomcat/bpr directory
• Or, deployed through ActiveBPEL Designer (easiest)
![Page 23: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/23.jpg)
Creating a Deployment Descriptor
![Page 24: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/24.jpg)
Finish deployment
Change Deployment URL to Match ActiveBPEL Engine installation
‘Binding’ must be set to ‘RPC Encoded’
![Page 25: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/25.jpg)
Creating a client
• See sample code on Wiki• String endpoint = URL of
service• URL can be found in Axis
servlet• call.setOperationName(new
QName(“”,”<processName>”);
• <processName> from BPEL Admin Console
![Page 26: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/26.jpg)
Engine admin client
• http://siffleur.cs.ualberta.ca:9999/active-bpel/
• Can conflict with other Tomcat applications. Errors in the admin client are likely caused by this.
• Can view process graph for deployed services online
![Page 27: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/27.jpg)
Tips
• If working from home, authenticate to access.cs.ualberta.ca to access non-standard remote ports.
• When creating an ‘invoke’ activity, copy remote WSDL to local project in order to use it. Local copy also needs to be added to web references.
![Page 28: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/28.jpg)
More tips
• ‘Invoke’ creation wizard is buggy. If you can’t select your WSDL, click ‘Create new …’ then back to ‘Use existing …’.
• Remember the ‘…’ when creating static endpoints.
• There is more than one way to accomplish most things in ActiveBPEL.
![Page 29: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/29.jpg)
Yet more tips
• If an import isn’t being read correctly, remove it and re-add it.
• If properties give errors when they should work, check imports, then re-select each value
![Page 30: BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration](https://reader031.vdocument.in/reader031/viewer/2022020920/56649c7d5503460f949328cd/html5/thumbnails/30.jpg)
References
• ActiveBPEL documentation: http://www.activebpel.org/docs/index.html
• BPEL v1.1 Specifications: http://www-128.ibm.com/developerworks/library/specification/ws-bpel/
• More on BPEL: next Tuesday in class