BPEL Development Guide
BPEL
Copyright © 2011-2017 Red Hat, Inc. and/or its affiliates.
Abstract
Chapter 1. Introduction
1.1. Understanding BPEL
1.2. About Business Process Orchestration
1.3. About Apache ODE
1.4. Features of BPEL Engine
- Provides BPEL component within the SwitchYard.
- Enterprise quality GWT based BPM console to manage process definitions and instances.
- Compiled approach to BPEL that provides detailed analysis and validation when deployed.
- Short-lived and long-running process executions.
- Process persistence and recovery.
- Process versioning.
- Runs in JBoss Cluster.
Chapter 2. BPEL and SwitchYard
2.1. Introduction
2.2. Structure of a SwitchYard BPEL Application
src/main/resources folder are structured differently. The switchyard.xml configuration file is located in the META-INF folder. However, the BPEL deployment descriptor (deploy.xml), and the BPEL process definition are located in the root folder. You can locate the WSDL interface definitions, and any accompanying XSD schemas in the sub-folders. You must ensure that the BPEL process and SwitchYard BPEL component configuration define the correct relative path for the artifacts.
say_hello
src/main/java
src/main/resources
META-INF
switchyard.xml
deploy.xml
SayHello.bpel
SayHelloArtifacts.wsdl
JRE System Library [JavaSE-1.6]
src
pom.xml
2.3. Providing a Service with the BPEL Component
Procedure 2.1.
- Define your process using WS-BPEL within JBoss Developer Studio (with JBoss Integration and SOA Development tooling installed).
- Define a WSDL interface for the BPEL service.
- Define a Deployment Descriptor using the ODE Deployment Descriptor editor bundled with JBoss Tools.
- Add the component containing the implementation and service interface to the SwitchYard configuration.
2.4. Example of BPEL Component Configuration
<sca:component name="SayHelloService">
<bpel:implementation.bpel process="sh:SayHello"/>
<sca:service name="SayHelloService">
<sca:interface.wsdl interface="SayHelloArtifacts.wsdl#wsdl.porttype(SayHello)"/>
</sca:service>
</sca:component>
implementation.bpel element that identifies the fully qualified name of the BPEL process. This component may also contain one or more service elements defining the WSDL port types through which the BPEL process can be accessed.
deploy.xml). Here is an example of the deployment descriptor for the BPEL process referenced above:
<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
xmlns:examples="http://www.jboss.org/bpel/examples">
<process name="examples:SayHello">
<active>true</active>
<retired>false</retired>
<process-events generate="all"/>
<provide partnerLink="client">
<service name="examples:SayHelloService" port="SayHelloPort"/>
</provide>
</process>
</deploy>
2.5. Consuming a Service from a BPEL Process
deploy.xml file:
<process name="ls:loanApprovalProcess">
<active>true</active>
<process-events generate="all"/>
<provide partnerLink="customer">
<service name="ls:loanService" port="loanService_Port"/>
</provide>
<invoke partnerLink="assessor" usePeer2Peer="false">
<service name="ra:riskAssessor" port="riskAssessor_Port"/>
</invoke>
</process>
usePeer2Peer property informs the BPEL engine not to use internal communications for sending messages between BPEL processes that may be executing within the same engine, and instead pass messages through the SwitchYard infrastructure.
switchyard.xml file below:
<sca:component name="loanService">
<bpel:implementation.bpel process="ls:loanApprovalProcess" />
<sca:service name="loanService">
<sca:interface.wsdl interface="loanServicePT.wsdl#wsdl.porttype(loanServicePT)"/>
</sca:service>
<sca:reference name="riskAssessor">
<sca:interface.wsdl interface="riskAssessmentPT.wsdl#wsdl.porttype(riskAssessmentPT)"/>
</sca:reference>
</sca:component>
2.6. Property Injection into a BPEL Process
SwitchYardPropertyFunction.resolveProperty() XPath custom function. The bpel:copy section copies Greeting property value into the ReplySayHelloVar variable in example shown below:
<bpel:copy>
<bpel:from xmlns:property="java:org.switchyard.component.bpel.riftsaw.SwitchYardPropertyFunction"
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
<![CDATA[concat(property:resolveProperty('Greeting'), $ReceiveSayHelloVar.parameters/tns:input)]]>
</bpel:from>
<bpel:to part="parameters" variable="ReplySayHelloVar">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:result]]></bpel:query>
</bpel:to>
</bpel:copy>
Chapter 3. Administering Your System with BPEL Console
3.1. About the BPEL Console
- any process definitions you have deployed to the BPEL engine
- the process instances executing in the BPEL engine
- a process execution history
- the query pertaining to the execution history
3.2. Process Definition
3.3. Deploying Process Definition
3.4. Manually Undeploy a Process
Procedure 3.1. task
- Launch a web browser and navigate to http://localhost:8080/bpel-console.
- Enter your user name and password.
- Click on the Runtime tab.
- Select the Deployments option. You will now be able to see the version information and current status (active or retired) of each process definition.
- Check if there is any active process consisting of any unfinished instances, retire the process.
- Undeploy the process only when there is no active process instance.
3.5. Active Process Instance
3.6. View the Process Version
Procedure 3.2. task
- Launch a web browser and navigate to http://localhost:8080/bpel-console.
- Enter your user name and password.
- Click on the tab to see which BPEL processes are currently deployed. The process version information for each of these processes is also visible.
- Only one version of a process can be active at a time. When you open a process definition, the active version is automatically selected.
3.7. About Business Process Analytics Format
3.8. View the BPAF Data
Procedure 3.3. task
- Launch a web browser and navigate to http://localhost:8080/bpel-console.
- Enter your user name and password.
- Click on the Managed Instances tab to see which BPEL processes are currently deployed. The process version information for each of these processes is also visible.
- Select a process definition to open it.
- Use the Execution History to produce a chart. Here you can specify a particular period of time to review and choose whether or not to include failed and terminated instances in the chart.
3.10. Configuring Logging Functionality
Procedure 3.4. task
- Open the
deploy.xmlfile in a text editor.Notedeploy.xmlfile exists with every BPEL deployment unit. - Configure the
deploy.xmlfile as follows:<deploy xmlns="schemas" xmlns:bpl="examples" xmlns:intf="examples/wsdl"> <process name="bpl:HelloGoodbye"> <active>true</active> <process-events generate="all"/> <provide partnerLink="helloGoodbyePartnerLink"> <service name="intf:HelloGoodbyeService" port="HelloGoodbyePort"/> </provide> </process> </deploy>
NoteAdd theprocess-eventselement to generate all the events. For more information, navigate to the Apache ODE events http://ode.apache.org/ode-execution-events link. - Save the file and exit.
3.11. View the Instance Data
Procedure 3.5. task
- Launch a web browser and navigate to http://localhost:8080/bpel-console.
- Enter your user name and password.
- Under the Managed Instances tab, select the Open Button list to view the deployed process definitions. When you select any one of the process, it displays the list of process definitions and version of that particular process.
- Select a process instance to open it. You can see its details in the Execution Details panel.
- Click the Instance Data button. It displays all the details about the process.
- Click the Execution Path button. It opens the related instance execution graph.NoteThe instance execution graph is a visual representation of a running instance of a process. It tells the user about the process instance's performance over time.
- The View tab shows the instance execution graph, while the Source tab below it shows all of the "activity" events.
3.12. View a History Instance Query
Procedure 3.6. Task
- Log into the BPEL Web Console.
- Choose a process definition and a process status from the list box.You can also optionally choose to input the correlation key, the start time and the end time as search criteria.
- Go to the History Instances List and double-click on a row. A window will pop up showing you all of the execution events that happened when that process ran.
3.13. Active Process Definition
3.14. Retired Process Definition
3.15. Manually Retire an Active Process Definition
Procedure 3.7. Task
- Launch a web browser and go to http://localhost:8080/bpel-console.
- Input your user name and password.
- Click on the Runtime tab.
- Select the Deployments option.You will now be able to see the version information and current status (active or retired) of each process definition.
- Select the particular version of the process definition you want to retire and then press the button.NoteIf you undeploy a process, its end-points will only deactivate if no previous versions of that process have ever existed.
3.16. Enable Execution Events
Procedure 3.8. task
- Open the
deploy.xmlfile in a text editor. - Add
<process-events generate="all"/>parameter in thedeploy.xmlfile.
Result
Events are successfully enabled.
Chapter 4. Configuring the BPEL Engine to Run in a Clustered Environment
4.1. About BPEL Engine in a Clustered Environment
4.2. Install the BPEL Engine in a Clustered Environment
4.3. Deploying a BPEL Process in a Clustered Environment
switchyard.xml configuration file is located under the META-INF directory.
4.4. BPEL Process Service Invocation
Chapter 5. BPEL and REST
5.1. BPEL Console RESTful Services
5.1.1. BPEL Console RESTful Services
Table 5.1. BPEL Console RESTful Services
|
Method
|
Path
|
Description
|
Consumes
|
Produces
|
|---|---|---|---|---|
|
Server Info (General REST server information)
|
GET
|
/gwt-console-server/rs/server/status
|
*/*
|
application/json
|
|
-
|
GET
|
/gwt-console-server/rs/server/resources/{project}
|
*/*
|
text/html
|
|
Process Management(Process related data.)
|
GET
|
/gwt-console-server/rs/process/definitions
|
*/*
|
application/json
|
|
-
|
GET
|
/gwt-console-server/rs/process/definition/{id}/instances
|
*/*
|
application/json
|
|
-
|
GET
|
/gwt-console-server/rs/process/instance/{id}/dataset
|
*/*
|
text/xml
|
|
-
|
POST
|
/gwt-console-server/rs/process/instance/{id}/end/{result}
|
*/*
|
application/json
|
|
-
|
GET
|
/gwt-console-server/rs/process/definition/{id}/image
|
*/*
|
image/*
|
|
-
|
GET
|
/gwt-console-server/rs/process/definition/{id}/image/{instance}
|
*/*
|
image/*
|
|
Process Engine(Process runtime state)
|
GET
|
/gwt-console-server/rs/engine/deployments
|
*/*
|
application/json
|
|
Process History(Process History Service)
|
GET
|
/gwt-console-server/rs//history/definition/{id}/instances
|
*/*
|
applications/json
|
|
-
|
GET
|
/gwt-console-server/rs//history/definitions
|
*/*
|
application/json
|
|
-
|
GET
|
/gwt-console-server/rs//history/definition/{id}/instances
|
*/*
|
application/json
|
|
-
|
GET
|
/gwt-console-server/rs//history/instance/{id}/activities
|
*/*
|
application/json
|
|
-
|
GET
|
/gwt-console-server/rs//history/instance/{id}/events
|
*/*
|
application/json
|
|
-
|
GET
|
/gwt-console-server/rs//history/definition/{id}/instances/completed
|
*/*
|
application/json
|
|
-
|
GET
|
/gwt-console-server/rs//history/definition/{id}/instances/failed
|
*/*
|
application/json
|
|
-
|
GET
|
/gwt-console-server/rs//history/definition/{id}/instances/terminated
|
*/*
|
application/json
|
|
-
|
GET
|
/gwt-console-server/rs//history/definition/{id}/instances/chart/completed
|
*/*
|
application/json
|
|
-
|
GET
|
/gwt-console-server/rs//history/definition/{id}/instances/chart/failed
|
*/*
|
application/json
|
Chapter 6. BPEL Database
6.1. BPEL Database Schema Diagram
Figure 6.1. BPEL Database Schema Entity Relationship Diagram

Legal Notice
Trademark Disclaimer
