Home Cloud & Networking Oracle SOA BPEL Process Manager 11gR1 - A Hands-on Tutorial

Oracle SOA BPEL Process Manager 11gR1 - A Hands-on Tutorial

books-svg-icon Book
eBook $36.99 $24.99
Print $60.99
Subscription $15.99 $10 p/m for three months
$10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
BUY NOW $10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
eBook $36.99 $24.99
Print $60.99
Subscription $15.99 $10 p/m for three months
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
  1. Free Chapter
    Creating Basic BPEL Processes
About this book
BPEL, Business Process Execution Language is the definitive standard in writing and defining actions within business processes. Oracle BPEL Process Manager R1 is Oracle's latest offering, providing you with a complete end-to-end platform for the creation, implementation, and management of your BPEL business processes that are so important to your service-oriented architecture."Oracle SOA BPEL Process Manager 11gR1 – A Hands-on Tutorial" is your guide to BPEL design and development, SOA Suite platform troubleshooting, and engineering in a detailed step-by-step guide working real-world examples and case studies. Using industry-leading practices you will start by creating your first BPEL process and move onto configuring your processes, then invoking, orchestrating, and testing them. You will then learn how to use architect and design services using BPEL, performance tuning, integration, and security, as well as high availability, troubleshooting, and modeling for the future. "Oracle SOA BPEL Process Manager 11gR1 – A Hands-on Tutorial" is your complete hands-on guide to Oracle SOA BPEL Process Manager 11g.
Publication date:
June 2013
Publisher
Packt
Pages
330
ISBN
9781849688987

 

Chapter 1. Creating Basic BPEL Processes

Over a period of time, people are in the process of finding ways to reuse existing applications to build new applications that are cheaper and faster and achieve interoperability between applications. Loosely-coupled integration of existing applications is required to achieve application agility for timely responses to the changing business requirements. BPEL is one of the leading integration technologies to implement agility for composite applications.

 

Evolution of web applications


Web applications can be created in multiple ways that depend on the business requirements. There are four generations of web applications which are currently used by the businesses. The first generation web applications were simply informational and static in nature. The second generation web applications enabled interaction with end users and dynamically presented and performed simple transactions online. The third and fourth generation web applications are allowing businesses to perform complex business transactions online that have increased the need for simplifying system integration and reusability of existing enterprise applications with agility.

 

Evolution of integration technologies


Organizations iteratively work on improving and modifying business processes to stay competitive in the market. This requires application implementations to be more flexible that by design adapt to the changes in business processes. In other words, most enterprise businesses need agility in creating and maintaining applications to run mission-critical businesses functions, and that requires a platform to quickly create and update business process and/or workflow services. Usually these business process services are composite services that depend on the multiple services within and between enterprises. The application's platform, that enables mission-critical business processes online, is easy to maintain if they are developed using technology components such as SOA and BPEL.

This book uses the JDeveloper IDE for designing and validating BPEL services and Oracle BPEL Process Manager (part of SOA Suite) platform, which has a runtime engine, for BPEL services.

 

An introduction to BPEL


BPEL stands for Business Process Execution Language. The standard body for BPEL is Organization for the Advancement of Structured Information Standards (OASIS) that produces worldwide standards incorporating industry consensus. The syntax of BPEL is XML-based and the current specification is WSBPEL Version 2.0.

BPEL is a programming language that has a mix of structured (blocks) and unstructured (control-links and events). BPEL is used for designing business processes that integrate web services into end-to-end process flow, and for the orchestration of business services. BPEL is mainly used for orchestrating services. The following figure shows the sample structure of a BPEL process:

A brief description of BPEL is given as follows:

  • BPEL is one of the leading specifications to standardize orchestration logic and process automation between web services.

  • The key benefit of BPEL is about leveraging more from existing application assets. BPEL enables legacy applications to be deployed as web services and orchestrated across platforms.

  • Identifying and documenting both the existing and new required high-level business process is a time-consuming but essential job.

  • BPEL enables developers to develop processes quickly by defining the order in which services will be invoked and provide an easy interface to connect processes from external systems.

  • Business Process Execution Language for web services provides a means to formally specify business processes and interaction protocols. BPEL is acting as a glue to bind web services into a cohesive business solution and facilitating their orchestrated interaction within and between enterprises.

  • Web service is an integration model created for allowing integration of systems built using heterogeneous tools and technologies. BPEL is one of the core components for defining composite web services to perform complex business functions.

BPEL syntax is based on XML. Therefore, it may not be a good idea to design and develop BPEL code by using a text/XML editor. A visual BPEL editor under JDeveloper IDE helps to develop and validate BPEL code easily without memorizing the BPEL specifications line by line. The following figure shows the interaction between a BPEL process and other services:

To deploy and execute BPEL processes, one needs Oracle Business Process Manager Engine. Currently Business Process Manager is part of Oracle SOA Suite. This book covers Version 11.1.1.16 of Oracle SOA Suite.

The following figure shows details of the components that interact with a sample BPEL service:

OASIS Web Services Business Process Execution Language (WSBPEL) is a vendor-neutral specification.

BPEL process manager is one of the components of the Oracle SOA Suite. The Oracle SOA Suite is a combination of multiple applications created by Oracle developers and deployed in a WebLogic container. For example, SOA Infra.ear, Adaptors, B2B, and so on.

Four separate main components/engines are included in SOA Suite. Each of these components has been created by Oracle developers using JSP, Servlets, EJB, JMS, RDBMS, and other system components.

  • BPEL Processes

  • Mediator

  • Business Rules

  • Human Task

BPMN (BPM Suite) is another component that can configure along with SOA Suite. SOA Infra is the core application. Similar to any enterprise web application, SOA Suite uses a database for storing the metadata information. For example, SOA Infra application uses database schemas for storing all the application information.

Oracle SOA Suite, along with JDeveloper IDE, enables the following:

  • Design and develop business services

  • Manage business services

  • Orchestrate services in to SOA composite applications

  • Provide a runtime engine for deploying and managing SOA composite applications

The following figure shows different service components of an SOA Suite:

JDeveloper packages various SOA components as SOA composite applications. SOA composite applications may contain some or all of the following components:

  • BPEL processes for process orchestration

  • Human workflows for modeling human interactions such as approving a salary increment for an HR system

  • Mediator for routing and transforming the messages (Oracle Service bus can be used for the same purpose

  • Spring framework for integrating Java interfaces to SOA Composite applications

  • Business rules for acting as a simple rules engine

Since Oracle SOA Suite runs on top of WebLogic container, you can deploy normal J2EE components as part of SOA composite applications; however, it may not be a good idea to use SOA Suite as a normal J2EE container. Separate the J2EE components and deploy it in another instance of WebLogic instances. Some of the J2EE components are listed as follows:

  • Oracle Application Development Framework (ADF) is a Java framework initiated from the original Model View Controller (MVC) framework

  • EJB service for adding enterprise services

  • J2EE technologies such as JSP, Servlet, and JSF for web applications

  • JMS for messaging

Following are the Oracle SOA Suite management applications and services as part of the SOA Suite installation:

  • Welcome Page: http://{hostname}:{port}

  • Admin Server: http://{hostname}:{port}/console

  • Enterprise Manager (EM): http://{hostname}:{port}/em

  • Dynamic Monitoring Service (DMS): http://{hostname}:{port}/dms

  • B2B : http://{hostname}:{port}/b2bconsole

  • Web Services Inspection Language (WSIL): http://{hostname}:{port}/inspection.wsil

  • Web Services Manager (WSM): http://{hostname}:{port}/wsm-pm

  • Composer : http://{hostname}:{port}/soa/composer

  • DefaultToDo : http://{hostname}:{port}/workflow/DefaultToDoTaskFlow

  • Worklist: http://{hostname}:{port}/integration/worklistapp

  • MessagingService endpoint: http://{hostname}:{port}/ucs/messaging/webservice

  • MessagingServices preferences: http://{hostname}:{port}/sdpmessaging/userprefs-ui

  • SOA-Infra: http://{hostname}:{port}/soa-infra/

    Note

    Please note, that for all the service endpoints, you need to replace the hostname and port. For example:

    http://{hostname}:{port}/console

    Where {hostname} is a parameter that you replace with the hostname or IP address of your installation, {port} is the port number on which the server is listening for requests (7001 by default).

    Example of the personal installation URL is as follows:

    http://localhost:7001/console/

The concept of composition is to create enterprise solutions by assembling instead of building from scratch. Object-oriented programming allows for reusing the code within the applications. The concept of composite applications allows for reusing the existing applications.

As shown in the following figure, a brand new building is created by assembling pre-built components to cut down the construction time. Similar to creating a new building by assembling components, BPEL allows for creating business processes from existing services:

 

Installing and configuring BPEL Process Manager


This section focuses on setting up the development environment to design and develop business process services using BPEL. The following figure shows the typical environment system components for designing and developing a BPEL service:

BPEL Process Manager is part of SOA Suite for Version 11.1.1.6. The development environment for creating and updating BPEL Process Manager requires the JDeveloper IDE with SOA Suite extension, a database with SOA Suite Schemas, and an SOA Suite.

The following are the steps to be followed:

  1. Install Oracle JDeveloper

    • Install JDeveloper

    • Install SOA Extensions

  2. Install SOA Suite Database Schemas

  3. Install Oracle SOA Suite

Step 1 – install Oracle JDeveloper

Setting up the development environment involves three major steps. As shown in the following figure, the first step is to install JDeveloper and SOA Extensions:

As shown in the following screenshot, download JDeveloper from the Oracle's website:

Tip

Install JDeveloper 11.1.1.6.0 or a newer version. Please note that installing JDeveloper Version 11.1.1.6 installs the following products preconfigured and ready to use with JDeveloper:

  • WebLogic Server Version 10.3.6

  • JDK

  1. Install JDeveloper by executing jdevstudio11116install.exe. One of the major steps for the installation process is configuring a new, or using an existing, middleware home directory. This will install WebLogic along with JDeveloper, as shown in the following screenshot:

  2. You'll see the Middleware Home Directory screen (if needed, update the install directory), click on Next. Then select Complete and again click on Next.

  3. The next screen will list the Middleware Home and Product Installation directories. Click on Next. We recommend keeping the default selection of All Users, as shown in the following screenshot and click on Next:

  4. On the next screen you will find the installation summary. Click on Next on the Installation Summary window that will start installing the Oracle JDeveloper. On completion of the installation, you will see the congratulations window, as shown in the following screenshot. Please check the Run Quickstart option and click on Done:

  5. On next window, click on Launch Oracle JDeveloper 11g and select the Default Role option and leave Always prompt for role selection on startup selected, as shown in the following screenshot and click on OK. On the next window, make sure to associate the file types of JDeveloper Application, JDeveloper Project, Java Source File, and Java Server Page with JDeveloper:

Installing SOA extensions

The SOA extension for JDeveloper contains SOA Composite Assembly, BPEL PM, Mediator, Human Task, Business Rules, and Adapters. These components are deployed and configured as part of SOA Suite installs. The JDeveloper extensions are only for design.

Perform the following steps to install SOA extensions. An alternative approach is to download the SOA Composite Editor – JDeveloper extensions from Oracle Fusion Middleware Products Update Center from Oracle's website.

  1. Select Check for Updates from the Help tab, as shown in the following screenshot and then click on Next on the Welcome window:

  2. Select Oracle Fusion Middleware Products and Official Oracle Extensions and Updates. Make sure you are connected to the Internet. Another alternative is to download the SOA extensions in the hard disk and manually configure it in JDeveloper:

  3. Select the SOA composite editor. This will install the SOA extensions required for creating and updating BPEL services. Click on Next:

  4. On the next window, it will display that it is downloading and installing the SOA extension for the JDeveloper. On a successful install, you will see the Installation Summary window, as shown in the following screenshot. Click on Finish to complete the SOA extension install and restart the JDeveloper. This completes the installation of JDeveloper with SOA Suite extensions:

Step 2 – download and install Oracle Database

As shown in the following screenshot, the second step is to install a database and execute an RCU script for creating SOA schemas:

This step assumes that you have got an Oracle database server installed and you have database admin privileges to run Repository Creation Utility (RCU). In the case of personal Oracle Express Database, start the database service if it is not running. One can use the Start Database option from the Start menu options.

Open a Windows shell command prompt and run sqlplus system/{password}@XE as sysdba to log in to Oracle Express Database.

The default limit of processes is not sufficient for creating the SOA Suite schema. Set the processes to 600 for all the SIDs, as given in the following lines of command:

SQL> alter system reset sessions scope=spfile sid='*';
SQL> alter system set processes=600 scope=spfile;

Make the changes effective immediately with the following command:

SQL> shutdown immediate

Using system Start menu's Start Database menu options start the Oracle Database service.

Validate the system settings with the following steps:

  1. Connect to the database using a Windows shell command prompt and run sqlplus system/{password}@XE as sysdba.

    SQL> show parameter session
    SQL> show parameter processes
    
  2. Set the RCU_JDBC_TRIM_BLOCKS variable as TRUE before creating the schemas using RCU if your database is Oracle XE.

    Note

    RCU_JDBC_TRIM_BLOCKS is an environment variable with the operating system. Please note, that RCU_JDBC_TRIM_BLOCKS is not a variable in Oracle XE!

  3. In Windows, you need to navigate to Control Panel | Advanced system settings | Advanced. From under System Properties, click on Environment Variables. An Environment Variables dialog appears. From under the System variables section, click on New. A New System Variable dialog appears. Set the Variable Name as RCU_JDBC_TRIM_BLOCKS and Variable Value as TRUE, as shown in the following screenshot:

  4. For creating RCU schemas, execute rcu.bat from the bin folder located at {FullPath}\rcuHome\BIN. Please note, that rcu.bat won't work with the files and folders names having a space in them. It will display the repository creation utility (RCU). Click on Next on the Welcome window that will take you to the Create Repository step, as shown in the following screenshot:

  5. Click on Next and enter the database information. Look in the tnsnames.ora or listener.ora files located in the Oracle Database install directory for the database information. As shown in the following screenshot, ensure that you use the exact information from the tnsnames.ora file as the database information. For example, enter the value for Host Name as the database server hostname. If you are running the Repository Creation Utility on the database server itself, you may use Host Name as localhost, as shown in the following screenshot:

  6. You can ignore the database support warnings. It will initiate the installation step of Checking Prerequisites with all the green ticks, as shown in the following screenshot. Click on OK:

  7. The next screen allows you to add a prefix with database schemas. Usually the prefix DEV is used for development environments, PROD for production, and so on. Select the SOA and BPM Infrastructure components on the next window that will allow you to select Metadata Services, as shown in the following screenshot. Dependent schemas are selected automatically. If you choose to select other components, these install instructions may not match your experience. Also, you may have to increase processes in XE (you will get a message telling you what is required):

    The preceding step creates the following database schemas:

    • MDS: Metadata service

    • SOA Infra: SOA Infrastructure

    • ORA BAM: Business Activity Monitoring Service

    • ORA SDPM: User Messaging Service

  8. Click on OK on the next window and choose a password for the database schemas, as shown in the following screenshot. It is recommended to keep the same passwords for all schemas for a development environment:

  9. On the next window it will create tablespaces for the all the schemas created earlier:

  10. Click on OK to create tablespaces in the database:

  11. Click on Create. This will create all schemas in the database, as shown in the following screenshot. On the next window, click on Close. That completes the creation of database schemas for the SOA Suite:

Step 3 – install Oracle SOA Suite

As shown in the following figure, the final step is to install the SOA Suite.

The Oracle SOA Suite Version 11.1.1.6 can be downloaded from Oracle's website.

Perform the following steps to complete the installation:

  1. Extract all the disks from the ZIP archive into one folder and run setup.exe from disk1.

  2. To avoid the install error message, provide the location of JDK/JRE while running the setup.exe file from the command line. You will need to pass jreLoc as a parameter to setup.exe, as shown in the following command line:

    setup.exe -jreLoc C:\Oracle\Middleware\jdk160_24
    

    Tip

    If you are installing JDK manually in a folder, select the entire file path with no spaces. The installer won't recognize a folder name with spaces.

  3. It will launch the install window, as shown in the following screenshot. Click on Next. On the next window click on Skip Software Updates and then click on Next:

  4. It will start the SOA Suite installation and that will perform the Prerequisite Checks. On successful checks, we will get all the status as green, as shown in the following screenshot. Click on Next:

  5. Please make sure that you have already installed WebLogic as a standalone install or as part of the JDeveloper install. On the next window, as shown in the following screenshot, enter the location of Oracle Middleware Home and click on Next:

  6. On the next window, if you get the warning message that an existing Oracle SOA Suite 11g home has been detected, click on Yes to upgrade the existing Oracle SOA Suite 11g and then click on Next:

  7. On the next window, we will get the installation summary, as shown in the following screenshot. Click on Install to start the SOA Suite installation:

  8. On the next window, you will get the installation progress window that may take a few minutes to finish the install. On completion of the install, click on Next and that will take you to the Installation Complete window, as shown in the following screenshot. Click on Finish to complete the Oracle SOA Suite installation:

 

Creating an SOA Suite domain


A typical development environment consists of the following:

  • One admin server

  • One managed server

However, you can perform the development with a single admin server as well.

A production environment will usually be a clustered environment consisting of multiple managed server and single admin instances.

To create an SOA Suite domain, perform the following steps:

  1. Ensure that you choose Oracle SOA Suite for developers instead of Oracle SOA Suite in the Domain Configuration wizard.

  2. Execute config.bat from command prompt, as shown in the following screenshot:

    Alternatively, you can select Configure Application Server from the Windows Start menu, as shown in the following screenshot:

  3. As shown in the following screenshot, select the Create a new WebLogic domain radio button and click on Next.

  4. As shown in the following screenshot, select the Oracle products and then click on Next. On the next window, enter the desired domain name, domain location, and application locations, or leave the default values for them and click on Next:

  5. Enter the user password and click on Next, as shown in the following screenshot. Store the password at a safe place, you will need it later:

  6. On the next window, select Development Mode and select the Sun SDK 1.6 from under Available JDKs (in the following screenshot, the only available JDK is Sun SDK 1.6). Click on Next:

  7. As shown in the following screenshot, enter the database information. Do not modify the schema user session. Please select and enter the data in the order as shown in the following screenshot:

  8. If you receive a connection error do the following:

    • Ensure that the database is up and running.

    • Make changes to DBMS/Service, Host Name, and Port number. Check for the tnsnames.ora file for correct entries. Always use the same information used for RCU.

    Sometimes, you may get the following error:

    To resolve the preceding error, please ensure that you created schemas with the correct RCU version and are able to connect to the database with the username and password provided in the preceding screen.

    Tip

    Please note that we should not modify the username to the schemas. The username is selected by the utility. Change only the password. For a development environment, always prefix the schema with DEV.

    Ensure that all the steps described in the RCU install session executed, including steps for changing the number of default Oracle database processes.

  9. Shut down and start the database after the changes. The preceding changes are required only in the case of the database connection error messages. Test the JDBC connections for the SOA Suite database schemas and make sure it is green for all the schemas, as shown in the following screenshot. Click on Next:

  10. On the next window you will see the configuration summary, as shown in the following screenshot. Clicking on Create will start writing the WebLogic domain setup files for Oracle SOA Suite. On the next window, you will see the progress of writing the domain setup files. Click on Done to finish setting up the WebLogic domain for Oracle SOA Suite:

  11. Now, to start the admin server, go to the domain's bin folder for which you wish to start the administration server using the following command:

    cd $BEA_HOME/user_projects/domains/<domain_name>/bin
    
    • For Windows execute startWebLogic.cmd

    • For Linux, execute startWebLogic.sh

To start WebLogic, execute the startWeblogic.cmd script from the command prompt. Server logfiles are located as $BEA_HOME/ user_projects/ domains/ <domain_name> /servers/<ServerName> /logs / <ServerName>.log.

One can confirm that the WebLogic administration server started properly by looking at the message Service started RUNNING in the server logfile.

 

Creating sample BPEL business processes


  1. Start JDeveloper from the Start menu with the default role. In JDeveloper, from the Application tab, click on New and select SOA Application and then click on Next, as shown in the following screenshot:

  2. Enter the Project Name and click on Finish, as shown in the following screenshot:

  3. It will load the JDeveloper's Design view for developing SOA applications, as shown in the following screenshot:

  4. Drag-and-drop a BPEL Process from Component Pallet to the JDeveloper canvas. The Create BPEL Process screen will appear on the JDeveloper console.

  5. As shown in the following screenshot, you can name your BPEL process. In this case the name is the default BPELProcess1. In the Template field, select Synchronous BPEL Process. Executing Synchronous BPEL processes returns a result. The Asynchronous BPEL processes may not return any value:

  6. As shown in the following screenshot, double-click on BPELProcess1 to view the BPEL:

  7. After double-clicking on the BPEL process, a window, as shown in the following screenshot, will appear:

  8. The next step is to debug the basic BPEL process. Currently, the business process has only receiveInput and replyOutput activity. Click on Run (or Make) to compile the project, as shown in the following screenshot:

  9. After selecting Debug, the following dialog is displayed as no Default Run Target was specified in Run/Debug page of the Project Properties dialog.

  10. Use the dialog in the following screenshot to specify the Default Run Target. Ignore any warning message about the non-existence of the src folder:

  11. From the Activities toolbar on the right-hand side of your window, drag an Assign activity and drop it between receiveInput and replyOutput. The following screenshot will appear after the changes:

  12. You can rename it by double-clicking on Assign1.

An Assign activity is usually used for manipulating data. For example, Assign activity can be used for copying the contents of one variable to another.

Assign activity is mainly used for copying the XML data contained in one BPEL variable to another BPEL variable. The data in a variable is visible and shared among all process activities.

Partner Link represents a link to services. JDeveloper's Source tab allows you to make the changes to the sources if required. The following screenshot shows how the Copy Rules tab can be used for creating a copy rule and connecting the source and target types:

In the sample BPEL process being shown in the preceding screenshot, input data from an input string is being copied to an output string using the concat function of XPath.

XPath is language for navigating through elements and attributes in an XML document and finding information within an XML document. The syntax of XPath's concat function is as follows:

fn:concat(string,string,...)

It returns the concatenation of the strings. For example, concat("My","first","XPATH function!") gives the output as My first XPATH function.

While copying the value of an input string to an output string, use the concat function of XPath to combine the strings together to manipulate the data. The Assign activities in BPEL build the XPath queries.

It is recommended to use the drag-and-drop feature for copying and assembling functions. The source code example of the Assign activity is given as follows (you can view the source code from JDeveloper' Source tab):

<assign>
   <copy>
      <from expression="concat('BPEL working ',
         bpws:getVariableData('input', 'payload', '/p:input))"/>
      <to variable="output" part="payload" query="/p:result/p:message"/>
   </copy>
</assign>

Assign activity in BPEL can do the following:

  • Copy data of one XML variable from input to output

  • Calculate the value of an expression and store it in a variable

The Assign syntax of the copy function is as follows:

<copy> <from...> <to...> </copy>
 

Deploying BPEL business processes


  1. As shown in the following screenshot, select Deploy from the JDeveloper menu and select the project:

  2. Select Deploy to Application Server, as shown in the following screenshot:

  3. Enter a Connection Name. For example, enter Weblogic:

  4. Ensure that you start Oracle SOA Suite WebLogic server and database servers. Enter the WebLogic console user ID and password in the next screen.

  5. As shown in the following screenshot, enter the server details that you want to deploy the service to. In case of a development integration environment, you may plan to deploy to a remote server. Enter the remote server information:

  6. Ensure that the domain name is correct in the preceding screen. Click on Next. As shown in the next screenshot, click on the Test Connection button for testing the WebLogic connection.

    If the application server box is empty, then do the following:

    • Ensure that the WebLogic application server and SOA managed server instances is up and running

    • Connect to an external WebLogic application server for deploying the services by providing the server information

  7. Click on Next. In case of errors, ensure that you can connect to the WebLogic console using an external browser. If you are using a proxy for your browser, ensure that you use it while connecting from JDeveloper as well. Update or remove the proxy setting to remove connection errors:

  8. As shown in the following screenshot, the next screen will display a message that the creation of the connection is complete. Click on Finish:

  9. Follow the steps and test the connections. Use default port numbers configured while creating the WebLogic domain using the Configuration Wizard. Once connected, JDeveloper will recognize WebLogic in the dialog box, as shown in the following screenshot:

  10. The SOA BPEL process manager is required for deploying the BPEL service. If you receive the following dialog box, ensure that the SOA servers are running in the local server, otherwise proceed with selecting the SOA server and finish the application connection process:

  11. JDeveloper shows the following successful validation message:

 

Testing and managing BPEL business process instances


  1. To test the BPEL process, log in to Oracle's Enterprise Manager (EM) web interface using the following syntax:

    http://{hostname}:/em
  2. Log in using an admin user and password:

  3. As shown in the following screenshot, click on the default domain from SOA node on the left-hand side navigation bar and select BPELSample1. Click on the Test tab:

  4. Ensure that the WSDL URL is correct and has http instead of https. Click on the Test Web Service button:

  5. The result will be displayed, as shown in the following screenshot:

 

Summary


In this chapter you have developed an understanding of the concept and evolution of BPEL, installing SOA Suite and JDeveloper, creating and deploying basic BPEL services using JDeveloper and SOA Suite, and testing a BPEL service. The next chapter covers major aspects of BPEL language that includes the basic activities, structured activities, human workflow, correlation, and adapters. You will also learn how to create complex BPEL processes using JDeveloper and their use cases.

Latest Reviews (1 reviews total)
Oracle SOA BPEL Process Manager 11gR1 - A Hands-on Tutorial
Unlock this book and the full library FREE for 7 days
Start now