Transcript ActiveBPEL

BPEL Development
with ActiveBPEL
Brendan Tansey
What is BPEL?
• Business Process Execution
Language for Web Services
• Web service orchestration
• Simple arithmetic and logical
• Lecture on Oct 26th!
BPEL Development
• Requires:
– BPEL Engine
– BPEL Developer (or text editor,
for the masochistic)
• BPEL Engine
Executes BPEL processes
ActiveBPEL Engine
Installation notes on Wiki
BPEL Developer
• Oracle BPEL Designer
– Oracle BPEL Process Manager
(OC4J, JBOSS, BEA WebLogic)
Eclipse BPEL Project
Parasoft BPEL Maestro
Intalio Designer
Many others
ActiveBPEL Designer
Construct graphical workflows
Assist with WSDL creation
Simulate workflow execution
Prepare service for deployment
Deploy service to ActiveBPEL
• Eclipse-based
• Makes your life easier
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
• Quirky
– Hence, presentation
ActiveBPEL Designer Demo
• Create a simple web service
that adds 4 input numbers
• Uses an existing web service
– Takes 4 numbers as input
– Returns two sums as output
{a+b, c+d}
• Create client for service
Live Demo! (with slides)
Using an external web
service to add four numbers
Create project/BPEL
Add external web references
Create sequence
• Drag ‘Sequence’ from palette
• In sequence, insert “Operation
• Follow wizard instructions,
creating a new WSDL file in
your current project
• Refresh project so new WSDL
is visible
Create service instance
• Force first element of sequence
to create a new instance
Using external services
• Add WSDLs as imports
Using external services
• Create input and output
variables for services
Create assignment activity
• Assign our service’s input to
input for other service
Invoke web service
• Create invoke activity with
Operation Wizard
• Select local copy of remote
WSDL (can’t use remote copy –
• Choose port type and
• Create new PLT
• Add to existing WSDL (buggy)
Assign service output
• Use built-in arithmetic
Simulating execution
Providing sample input
• Need to initialize complex types before using
• Initialize with literals.
<in0 xmlns="" xmlns:def=""
xmlns:xsi="" xsi:type="def:Complex">
<i xmlns:tns="Sum4WSDL" xmlns:xsd=""
xmlns:xsi="" xsi:type="xsd:double">0.0</i>
<r xmlns:tns="Sum4WSDL" xmlns:xsd=""
xmlns:xsi="" xsi:type="xsd:double">0.0</r>
Red = Invoked service’s namespace
Green = Your service’s namespace
Yellow = Variable type & element types
Magenta = Variable structure
Creating complex responses
<?xml version="1.0" encoding="UTF-8"?>
<ns1:addComplexReturn xmlns:ns1="urn:BeanService">
Successful simulation
Can now
examine output
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)
Creating a Deployment Descriptor
Finish deployment
‘Binding’ must be set
to ‘RPC Encoded’
Change Deployment URL to
Match ActiveBPEL Engine
Creating a client
• See sample code on Wiki
• String endpoint = URL of
• URL can be found in Axis
• call.setOperationName(new
• <processName> from BPEL
Admin Console
Engine admin client
• Can conflict with other Tomcat
applications. Errors in the
admin client are likely caused
by this.
• Can view process graph for
deployed services online
• If working from home,
authenticate to 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.
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
Yet more tips
• If an import isn’t being read
correctly, remove it and re-add
• If properties give errors when
they should work, check
imports, then re-select each
• ActiveBPEL documentation:
• BPEL v1.1 Specifications:
• More on BPEL: next Tuesday in