Showing posts with label BPEL. Show all posts
Showing posts with label BPEL. Show all posts

Tuesday, January 19, 2016

Getting Started With Apache ODE

Apache ODE (Apache Orchestration Director Engine) 'executes' or 'runs' one or more business processes which have been expressed in the Web Services Business Process Execution Language (WS-BPEL). 
Introduction to BPEL can be found from here

Intalling Apache ODE 

For this I'm using
  • OS : Ubuntu 15.10 (64 bit)
  • Apache ODE: V.1.3.6 
  • Apache Tomcat: 7.0.65
  • Eclipse : Version: Mars.1 Release (4.5.1)
Steps for Installing Apache ODE is as follows.
  • Download below bundles.
  • Extract the Apache Tomcat bundle to a prefered location . (This will refer as TOMCAT_HOME)
  • Extract ODE bundle and copy the ode.war file to TOMCAT_HOME/webapps folder.
  • Start the tomcat server. (This will extract the ode.war file within webapps folder)
  •  Add BPEL Designer plugin for eclipse.
Help->Install New Software->Add (http://download.eclipse.org/bpel/site/1.0.5) -> Select Eclipse BPEL Desiner
  • Setup ODE Server in Eclipse
    •  Window -> Show View -> Servers -> Right click on Empty Space in the View -> New -> Server
    • Select Apache - > ODE V.1.x Server -> Click Next
    • Set ODE's home directory ( TOMCAT_HOME/webapps/ode)
    • Set Tomcat Home directory( TOMCAT_HOME) and port. (Default tomcat port is 8080)
    • Click Finish. You now have the ODE server which is ready to run on the Eclipse. You can see this server on the Server View
    • Start the Server.
If you are using Tomcat v.6 or v.7, you probably get the following error.

Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/juli/logging/LogFactory
at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:49)
Caused by: java.lang.ClassNotFoundException: 
org.apache.juli.logging.LogFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357


This error occurs because some jars in the Launch environment. 

Fix:
  • double click on the installed Ode v1.x Server in the Server View to see the configuration
  • Open launch configuration → Classpath tab → User Entires → Add External JARs → select Jar files in [TOMCAT_HOME]\bin\ → Then Ok.
  • Now try to start your ODE server in the Server View

Monday, January 18, 2016

Introduction to BPEL


BPEL (Business Process Execution Language for Web Services, also WS-BPEL, BPEL4WS) is a language used for composition, orchestration, and coordination of web services. It provides a rich vocabulary for expressing the behavior of business processes. BPEL uses an XML-based vocabulary to specify and describe business processes. BPEL is a specialized language focused on the definition of business processes.

What is a Business Process?

A business process is a collection of coordinated service invocations and related activities that produce a business result, either within a single organization or across several.

Why Business Process?

Enterprise applications and information systems have became fundamental assets of companies. Companies rely on them to be able to perform business operations. Enterprise information systems can improve the efficiency of businesses through automation of business processes. Business processes are usually of dynamic nature. Every change and improvement in a business process has to be reflected in the applications that provide support for them.

Problem:

Changing and modifying applications is a difficult job, which requires time. This means that information systems cannot react instantly to changes in business processes

Solution :

Automation of Business Processes .To have that we need to have :

  • Web Services : To have an standerdized way to expose and access functionality of applications as services.
  • ESB : For communication and management of services (message interception, routing, transformation etc )
  • SOA - enterprise information systems usually consist of several different applications, which address certain (sometimes isolated) functions and tasks and not whole business processes.Best methods and practices for building integration architectures are today known as SOA.
  • BPEL - To have composition of exposed services of integrated applications into business processes. Provide an environment where business processes can be developed in an easy and efficient manner and quickly adapted to the changing needs of enterprises without too much effort.

Service Composition :

Services are composed in a particular order and follow a set of rules to provide support for business processes. For composition, we will use a dedicated language, BPEL, and an engine on which business process definitions will be executed.
Web services can be combined in two ways:
  • Orchestration- a central process (which can be another Web service) takes control of the involved Web services and coordinates the execution of different operations on the Web services involved in the operation. 
  • Choreography - does not rely on a central coordinator. Each Web service involved in the choreography knows exactly when to execute its operations and with whom to interact. 
For composing Web services for a business process, orchestration is a better option for reasons such as simpler process management, loose-coupling between participating Web services, ease in error handling, standardization etc.

BPEL Business Processes: 

With BPEL, we can describe business processes in two distinct ways:
  • Executable business processes - 
Allow you to specify the exact details of business processes. They follow the orchestration paradigm and can be executed by an orchestration engine.
When we define an executable business process in BPEL, we actually define a new web service that is a composition of existing services. The interface of the new BPEL composite web serviceuses a set of port types, through which it provides operations like any other web service. To invoke an executable business process, we have to invoke the resulting composite web service.
  • Abstract business processes- 
Allow specification of the public message exchange between parties only. They do not include the internal details of process flows and are not executable. They follow the choreography paradigm. Abstract processes are rarely used. The most common scenario is to use them as a template to define executable processes.

BPEL Components: Architecture

The three core components of BPEL are the:
  • BPEL Designer( a GUI) - a business expert/analyst of a company would use the BPEL Designer and define the business process
  • Process flow template - Once the business expert defines the business process flow, a process logic template containing the process flow logic is generated by the Designer in the background.
  • BPEL Engine - At runtime, this process template would be executed by the BPEL Engine. 




BPEL Servers

BPEL servers provide a run-time environment for executing BPEL business processes. Functionality includes invocation of the Web services, mapping of the data content, error handling, transactionality, security, and so forth. Typically, the BPEL Engine would be integrated within the Application Server.
ex: Apache ODE
Oracle BPEL Process Manager  


References: 
BPEL for Web Services - By Benny Mathew and Poornachandra Sarang