Getting Started with Oracle SoA Lab#6 CREATING PROJECT PROCESS STUDENT Description: BISP is committed to provide BEST learning material to the beginners and advance learners. In the same series, we have prepared a complete end-to end Hands-on Beginner’s Guide for Oracle SoA. The document detailed step by step way to create complete Oracle SOA Student Project. Join our professional training program and learn from experts. History: Version Description Change Author Publish Date 0.1 Initial Draft Shiva Kant Pandey 21 st Aug 2012 0.1 Review#1 Amit Sharma 29 th Aug 2012 www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 1
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Getting Started with Oracle SoA
Lab#6 CREATING PROJECT PROCESS STUDENT
Description: BISP is committed to provide BEST learning material to the beginners and advance learners. In the same series, we have prepared a complete end-to end Hands-on Beginner’s Guide for Oracle SoA. The document detailed step by step way to create complete Oracle SOA Student Project. Join our professional training program and learn from experts.
History:Version Description Change Author Publish Date0.1 Initial Draft Shiva Kant Pandey 21st Aug 20120.1 Review#1 Amit Sharma 29th Aug 2012
SCA Architecture , BPEL PROCESS & Project on Process Student
Service-component architecture (SCA) : It is a group of specifications intended for the development of applications based on service-oriented architecture (SOA), which defines how computing entities interact to perform work for each other. SCA is based on the notion that all the functions in an enterprise should exist in the form of services that are combined into composites to address specific business requirements.
SCA encompasses diverse technologies, programming languages, frameworks and platforms for Web service components and for the methods used to connect them.
SCA can be broken down into four major parts or models:
• The Assembly Model : which defines how components are combined, linked and packaged as
services independent of the programming language.
The Implementation Model : which defines how services are packaged and accessed for
specific programming languages.
The Policy Model : which defines service policies independent of the programming code.
The bindings model : which defines how components are accessed independent of the
programming code
The specifications specify that an application designed with SCA should have the
following advantages:
Decoupling of application business logic from the details of its invoked service calls
Target services in a multitude of languages including C++, Java, COBOL, and PHP as well
as XML, BPEL, and XSLT
The ability to seamlessly work with various communications constructs including One-
Way, Asynchronous, Call-Return, and Notification
The ability to "Bind" to legacy components or services , accessed normally by
technologies such as Web Services, EJB, JMS, JCA, RMI, RPC, CORBA & others.
The ability to declare (outside of business logic) the Quality of Service requirements,
such as Security, Transactions and the use of Reliable Messaging
Data could be represented in Service Data Objects
The value proposition of SCA, therefore, is to offer the flexibility for true composite
applications, flexibly incorporating reusable components in an SOA programming style. The
overhead of business logic programmer concerns regarding platforms, infrastructure,
plumbing, policies and protocols are removed, enabling a high degree of programmer
productivity
SCA is said to provide interoperability through an approach called "Activation". It is the
method that provides the highest degree of component autonomy, compared to older
"mediation" (e.g. JBI) or "Invocation" method used in JCA,
The SCA Assembly Model consists of a series of artifacts, which are defined by elements contained in XML files. An SCA runtime may have other non-standard representations of the artifacts represented by these XML files, and may allow for the configuration of systems to be modified dynamically. However, the XML files define the portable representation of the SCA artifacts.
The basic artifact is the Composite, which is the unit of deployment for SCA and which holds Services which can be accessed remotely. A composite contains one or more Components, which contain the business function provided by the module. Components offer their function as services, which can either be used by other components within the same module or which can be made available for use outside the module through Entry Points. Components may also depend on services provided by other components — these dependencies are called References. References can either be linked to services provided by other components in the same module, or references can be linked to services provided outside the module, which can be provided by other modules. References to services provided outside the module, including services provided by other modules, are defined by External Services in the module. Also contained in the module are the linkages between references and services, represented by Wires.
A Component consists of a configured Implementation, where an implementation is the piece of program code implementing business functions. The component configures the implementation with specific values for settable Properties declared by the implementation. The component can also configure the implementation with wiring of references declared by the implementation to specific target services.
Composites are deployed within an SCA System. An SCA System represents a set of services providing an area of business functionality that is controlled by a single organization. As an
example, for the accounts department in a business, the SCA System might cover all financial-related functions, and it might contain a series of modules dealing with specific areas of accounting, with one for customer accounts and another dealing with accounts payable. To help build and configure the SCA System, Composites can be used as component implementations, in the same way as Java classes or BPEL processes. In other words, SCA allows a hierarchy of composites that is arbitrarily deep - such a nested model is termed recursive.
The capture and expression of non-functional requirements, such as security, is an important aspect of service definition, and has an impact on SCA throughout the lifecycle of components and compositions. SCA provides the Policy Framework to support specification of constraints, capabilities and Quality of Service (QoS) expectations, from component design through to concrete deployment.
Binding components establish a connection between a SOA composite and the external world. There are two types of binding components:
• Services provide the outside world with an entry point to the SOA composite application. The WSDL file of the service advertises its capabilities to external applications. These capabilities are used for contacting the SOA composite application components. The binding connectivity of the service describes the protocols that can communicate with the service, for example, SOAP/HTTP or a JCA adapter.
• References enable messages to be sent from the SOA composite application to external services in the outside world.
Wires enable you to graphically connect the following components in a single SOA composite application for message communication:
Services to service components Service components to other service components
Service components to references
When properly implemented, SCA can help an enterprise to minimize the workload on its developers, shorten learning curves, facilitate reuse of services and update policies without having to modify the programming. SCA also facilitates control over access methods and the implementation of security-related countermeasures.
BUSINESS PROCESS EXECUTION LANGUAGE (BPEL)• It is service component of Oracle SOA• It is meant for the orchestration of the services & executes the services in a systematic order
• It is again a programming language similar to any other & has activities like Switch, While,
Sequence, Scope, invoke, Receive & Reply etc.
Introduction
BPEL stands for Business Process Execution Language, and comes from a standards consortium consisting of BEA Systems, IBM, and Microsoft, BPEL combines and replaces IBM's Web Services Flow Language (WSFL) and Microsoft's XLANG specification. BPEL provides an “orchestration engine” for describing exchanges of information internally or externally. BPEL deals explicitly with the functional aspects of business processes: control flow (branch, loop, parallel), asynchronous conversations and correlation, long running nested units of work, faults and compensation. BPEL directly addresses these business process challenges: coordinating asynchronous communication between services, correlating message exchanges between parties, implementing parallel processing of activities, manipulating data between partner interactions, supporting long running business transactions and activities, and providing consistent exception handling.
BPEL is a XML-based workflow definition language that allows businesses to describe inter or intra enterprise business processes that are connected via Web services. BPEL becomes the “glue” to bind Web services into a cohesive business solution, facilitating their orchestrated interaction both within and between enterprises. A Business Process using BPEL can compose multiple Web services, effectively creating a completely new business application with its own public interface to end users (internal or external). BPEL opens a completely new way or at least enhanced way, for software development for mainstream business applications to allow a programmer to describe a business process that will take place across the Internet. BPEL provides an XML-based grammar for describing the logic to control and coordinate Web services participating in a process flow. This grammar can be interpreted and executed by a BPEL orchestration engine, which is controlled by one of the participating business parties. The engine coordinates all of the activities in the process, and controls the system's corrective activities when exceptions occur. BPEL builds on and extends XML and Web Services specifications
The Role of BPELThe BPEL specification defines the syntax and semantics of the BPEL language, which contains a variety of process flow constructs. It allows for conditional branching, parallel process flows, nested sub-processes, process joins, and other related features. BPEL is defined in an XML format. Just as today's software development tools include Web services in their development capabilities, there also exist easy-to-use tools to create and manage business processes using BPEL
Why Do I Need BPELTraditional methods for integration and business process automation typically involve embedded logic inside of applications designed to meet a specific business need such as ERP, supply chain, or CRM. The development, testing, and deployment efforts required to change these applications make integration and process changes both costly and complex.
To address these issues, proprietary EAI and static BPM products emerged to abstract integration and process automation into a new layer of software tools. These software products liberated integration and process tasks from the underlying business systems so they could be more effectively changed, managed, and optimized.
BPEL and Web services now provide a standardized integration interface and a standardized language for integration and process automation. BPEL, in effect, has the potential to commoditize the capabilities provided by proprietary EAI and BPM solutions. As often occurs in a commodity market, the resulting prices for products and services are certain to fall.
STEP WISE PROCEDURE “PROCESS STUDENT PROJECT”Step 1: Create new project
New --->All Technologies--->SOA Tier --->SOA project --->OK ---> Project Name (ProcessStudent) ---> ADF Business Component---> SOA--->Next -->Empty Composite ---> Finish.Now you can see your project on left pane with all its contents so as we need to start our project with XSD .
Step 19: Now add three more elements (Result , Total, Average) by right clicking on its sequence ---> insert inside sequence---> elementThen click on elements & rename them & set their types as on earlier discussion .
Step 20 : Right Click on target namespace & click insert inside schema---> elementso select two elements & rename element1 as ProcessStudentRequest & rename element2 as ProcessStudentResponse as shown below :
Step 21: Click on ProcessStudentRequest & write its type as stdobj:StudentType in Property inspector located in right pane & hit enter
Step 22: Right click on ProcessStudentResponse -->insert inside element -->sequence.Then Right Click on sequence --->insert inside sequence--->element Click on element & rename it as Student & press Enter key.
finally Click on ProcessStudentResponse & write its type as stdobj:StudentResultType in Property inspector located in right pane & hit enter
Step 25: Create BPEL Process This composite .xml is partitioned into three sections 1. Exposed Services2. Components3. External refrences
Now right click on component section and choose BPEL Process
Step 26: Fill all its blank spaces Name (ProcessStudentProcess) ---->NameSpace (Leave as it is)--->Template(Select Synchronous BPEL process)----> Service Name(ProcessStudentService)----> mark Expose as a SOAP service ----> Transaction (required) ----> Click on Input Browse to select input of wsdl -----> & then Click on Output Browse to select Output of wsdl
Step 41: Right click on assign-->Edit --->General ----> Name(AssignCalculation)
Step 42: Click on Copy Rules
Click Expression Drag it & keep it in TotalVar under Variables
Step 43: Click Lang1Marks ---> insert into expression ---> plus sign(+)--> Lang2Marks---> insert into expression ---> plus sign(+)--> Lang3Marks---> insert into expression---> Click Ok
Step 45: Click TotalVar under BPEL Variables---> insert into expression ---> Select Mathematical Function choose Divide ---> insert into expression ---> 3.0(Since number of subjects are three )---> OK
Switch Activity : Switch activity is as similar as if else condition in other programming language example c.This activity consists of an ordered list of one or more conditional branchesdefined in a case branch, followed optionally by an otherwise branch. Thebranches are considered in the order in which they appear. The first branch whose condition is true is taken and provides the activity performed for the switch. If condition is false, then the otherwise branch is taken. If the otherwise branch is not explicitly specified, then an otherwise branch with an empty activity is assumed to be available. The switch activity is complete when the activity of the selected branch completes
Step 48: Click on Condition
Step 49: Click on Xpath Expression builder to set condition
Step 50: Click Lang1Marks ---> insert into expression ---> greater equals 35--> Lang2Marks---> insert into expression ---> greater equals 35--> Lang3Marks---> insert into expression---> greater equals 35--> Click Ok
Step 65: We have successfully login inside Enterprise manager 11g (Farm_dev_soa)we can clearly observe here that admin server is up & all deployment status is also up it means that our admin server is running .Now In left pane of window under Farm_dev_soa click on SOA radio button now again expand & under default we can easily see all the deployed projects. Click twice on ProjcessStudent Project .
Step 66: Observe that all information regarding to ProcessStudent Project is given Running instances 0 means that yet we have not tested any instance.Total 0Project Status Active Now click on Browser tab
Step 83: Now again double click on ProcessStudentProject on left pane & observe that after first test it created Instance with its instance id 160004 & instance state completed.Now since we have completed our test & wanted to exit from enterprise manager , Click on ShutDown Tab & then LogOut.