Monday, 27 February 2012

SOA 10g Vs 11g

SOA Composite Application Architecture

Welcome to Oracle SOA Suite
Oracle Fusion Middleware is a collection of standards-based software products that spans a range of tools and services from J2EE and developer tools, to integration services, business intelligence, collaboration, and content management. Oracle Fusion Middleware offers complete support for development, deployment, and management.
Oracle SOA Suite is an essential middleware layer of Oracle Fusion Middleware. It provides a complete set of Service Infrastructure components for designing, deploying, and managing composite applications. Oracle SOA Suite enables services to be created, managed, and orchestrated into composite applications and business processes. Composites enable you to easily assemble multiple technology components into one SOA composite application. Oracle SOA Suite plugs into heterogeneous IT infrastructures and enables enterprises to incrementally adopt SOA.
Introduction to Service-Oriented Architecture
Changing markets, increasing competitive pressures and evolving customer needs are placing greater pressure on IT to deliver greater flexibility and speed. Today, every organization is faced with the need to predict change in a global business environment, to rapidly respond to competitors, and to best exploit organizational assets for growth. In response to these challenges, leading companies are adopting service-oriented architecture (SOA) as a means of delivering on these requirements by overcoming the complexity of their application and IT environments.
SOA provides an enterprise architecture that supports building connected enterprise applications to provide solutions to business problems. SOA facilitates the development of enterprise applications as modular business Web services that can be easily integrated and reused, creating a truly flexible, adaptable IT infrastructure. You can move and reconfigure pieces, turning your systems into the IT equivalent of Lego blocks.
Increasingly fragmented and complex infrastructures are limiting IT's ability to deliver on business needs. Many organizations have inherited disjointed legacy systems and packaged applications, a large proportion of which were never designed for information interoperability, integration, and reuse. The result of this is that most of the IT budget goes into maintenance of the current IT infrastructure and only a small amount is available for new functionalities to drive new business opportunities. The major portion of budget for new capabilities goes into the cost of integrating new functionality into the existing systems that offer poor support for interoperability.
Traditionally, business information systems have been developed with a functional orientation often resulting in silos of information. The fundamental problem with this approach is that end-to-end business processes, which span silos, are not adaptable to change as business needs evolve. The processes become fragmented and embedded deep within systems. Enterprise application integration (EAI) and other traditional middleware solutions partially address this by enabling systems to communicate with each other, but they do not fully solve the problem. Their ability to create cross application business processes is inadequate, and they allow only limited business process adaptability. Moreover, these traditional solutions come at a high cost. The majority of EAI and traditional middleware solutions use proprietary technology, which causes dependency on specialized skills and to that single vendor's products. In addition, the systems become tightly coupled, so if an interface change occurs in one system, all other systems need to be adjusted. Not only does the technology make it difficult to make changes, it can become cost-prohibitive to do so.
Service-oriented architecture (SOA) helps address the fragmented IT landscape and addresses the difficulties associated with silos of IT infrastructure and applications
Introduction to Oracle SOA Suite
The components of Oracle SOA Suite benefit from common capabilities, including a single deployment, management, and tooling model, end-to-end security, and unified metadata management. Oracle SOA Suite is unique in that it provides the following set of integrated capabilities:
Messaging
Service discovery
Orchestration
Web services management and security
Business rules
Events framework
Business activity monitoring
These capabilities help address the fragmented IT landscape and addresses the difficulties associated with silos of IT infrastructure and applications. It enables greater flexibility through:
Interoperability: SOA, and the industry standards underpinning it, enable existing siloed applications to interoperate seamlessly and in an easier-to-maintain manner than any traditional EAI solution.
Increased reuse: Once legacy systems and applications are service enabled, these services can be reused, which results in reduced ongoing development costs and results in reduced time to market. Further, business processes built as an orchestration of services can also be exposed as services, further increasing reuse.
More agile business processes: SOA reduces the gap between the business process model and implementation. This enables changes to business processes already implemented as orchestrations of services to be easily captured and implemented.
Improved visibility: SOA can give improved business visibility by enabling business capabilities exposed as services, and the status of in-flight business processes automated with business activity monitoring, to be rapidly integrated into service-enabled enterprise portals, aiding business decision-making.
Reduced maintenance costs: SOA development encourages duplicated overlapping business capabilities (services) that span multiple applications and systems to be consolidated into a small number of shared services. SOA development enables elimination of redundant services and reduces the cost of maintaining systems by providing a single point of change for application logic. Further, SOA gives IT the means to gradually phase out legacy systems and applications, while minimizing disruption to the applications that are built on or are integrated with them using SOA principles. This process frees up funds for new projects.
Compliance and governance: By realizing better and more standardized operational procedures, SOA provides the basis for a comprehensive security solution, and enables better visibility into business operations and exception conditions.
Oracle SOA Suite Standards
Oracle SOA Suite puts a strong emphasis on standards and interoperability. Among the standards it leverages are:
The Service Component Architecture (SCA) assembly model abstracts the implementation and allows assembly of components, with little implementation details. SCA enables you to represent business logic as reusable service components that can be easily integrated into any SCA-compliant application. The resulting application is known as an SOA composite application. The specification for the SCA standard is maintained by the Organization for the Advancement of Structured Information Standards (OASIS).
Service Data Objects (SDO) provide a data programming architecture. It provides a standardized view on data, and provides efficient transportation, as well as change capture, in form of a change summary. More specifically, it collects a data graph of related business objects, called DataObjects. This graph tracks the schema that describes the DataObjects. Knowledge is not required about how to access a particular back-end data source to use SDO in an SOA composite application. Consequently, you can use static or dynamic programming styles and obtain connected and disconnected access.
Business Process Execution Language (BPEL) provides enterprises with an industry standard for business process orchestration and execution. Using BPEL, you design a business process that integrates a series of discrete services into an end-to-end process flow. This integration reduces process cost and complexity.
XSL Transformations (XSLT) processes XML documents and transforms document data from one XML schema to another.
Java Connector Architecture (JCA) provides a Java technology solution to the problem of connectivity between the many application servers in Enterprise Information Systems (EIS).
Java Messaging Service (JMS) provides a messaging standard that allows application components based on the Java Enterprise Edition (JEE) to access business logic distributed among heterogeneous systems.
Web Service Description Language (WSDL) file provides a standardized view on the capabilities of a service. Bindings provide the entry points into the composite at runtime.
SOAP over HTTP (SOAP) provides the default network protocol for message delivery.Introduction to Oracle SOA Suite Components
Oracle SOA Suite provides a comprehensive suite of components for developing, securing, and monitoring service-oriented architecture (SOA).
Service components (BPEL process, business rule, human task, and mediator) are the building blocks that you use to construct an SOA composite application. The Service Infrastructure provides the internal message transport infrastructure capabilities for connecting service components and enabling data flow. Service engines for the components process the message information received from the Service Infrastructure. See SOA Composite Application Architecture for more information about service components.
Oracle Business Activity Monitoring consumes data transported over the Service Infrastructure, providing powerful business insight capabilities.
The following components comprise an Oracle SOA Suite installation:
Service Infrastructure
Oracle Mediator
Oracle Adapters
Business Events and Events Delivery Network
Oracle Metadata Repository
Oracle Business Rules
Oracle WSM Policy Manager
Oracle BPEL Process Manager
Human Workflow
Oracle Business Activity Monitoring
Oracle User Messaging Service
Oracle B2B
Oracle JDeveloper
Oracle Enterprise Manager
The following components are included with Oracle SOA Suite, but available as a separate download:
Oracle Service Bus
Oracle Complex Event Processing
Both the Oracle Service Bus and the Service Infrastructure share common components, including Oracle Adapters, Oracle Metadata Repository, and the UDDI registry. The UDDI registry is available with the Oracle Service Registry, which is a separately licensable component. See Oracle Service Registry for more information.
In addition, several separately licensable products interoperate with Oracle SOA Suite components. See Interoperability with Other Oracle Products for more information.
Service Infrastructure
The Service Infrastructure provides the internal message routing infrastructure capabilities for connecting components and enabling data flow:
Receives messages from the service providers or external partners through SOAP binding components, adapters, or the delivery API in the form of XML.
Routes messages based on the composite definition to the appropriate service engine.
Oracle Mediator and the Service Infrastructure provide the following combined capabilities:
Routing services to provide data movement
Routing rules to specify routing, document transformation, and filtering
Subscriptions to business events
Unified error handling and exception management
Oracle Mediator
Analogous to a load balancer routing HTTP traffic, the Oracle Mediator routes data from service providers to external partners. In addition, it can subscribe to and publish business events.
Using Oracle Mediator, you create routing services and rules for them. A routing service is the key component for moving a message across the enterprise service bus – from its entry point to its exit point. The rules determine how a message instance processed by the routing service gets to its next destination. Using the rules, Oracle Mediator can perform the following actions:
Route: Determines the service component (BPEL process, business rule, human task, and mediator) to which to send the messages.
Validate: Provides support for validating the incoming message payload by using a schematron or an XSD file.
Filter: If specified in the rules, applies a filter expression that specifies the contents (payload) of a message be analyzed before any service is invoked.
Transformation: If specified in the rules, transforms document data from one XML schema to another, thus enabling data interchange among applications using different schemas.
During runtime, Oracle Mediator evaluates routing rules, performs transformations, applies optional time delays, and either invokes another service or raises another business event. A routing service can handle returned responses, callbacks, faults, and time-outs. Oracle Mediator can also be used to implement a variety of integration patterns, such as service virtualization, service aggregation, publish and subscribe, fan-in, and fan-out.
About Oracle Service Bus with Oracle Mediator
Oracle Service Bus provides standalone service bus capabilities, enabling separation between application developers and target systems or services. The main users of the Oracle Service Bus are integration developers and operations personnel. Their mission is to shield application developers from changes in the endpoint services or systems and to prevent those systems from being overloaded with requests from upstream applications.
Whereas Oracle Service Bus provides service virtualization and protocol transformations for an Oracle SOA Suite application containing multiple composites, Oracle Mediator is an intra-composite mediation component that is deployed within an application.
Oracle Service Bus
Oracle Service Bus, available as a separate download with an Oracle SOA Suite license, is an intermediary that processes incoming service request messages, determines routing logic, and transforms these messages for compatibility with other service consumers. It receives messages through a transport protocol such as HTTP(S), JMS, File, and
FTP, and sends messages through the same or a different transport protocol. Service response
messages follow the inverse path.
Oracle Service Bus connects, mediates, and manages interactions between heterogeneous services, not just Web services, but also Java and .Net, messaging services and legacy endpoints. It uniquely delivers the integration capabilities of an Enterprise Service Bus (ESB) with operational service management in a single product with an efficient, seamless user experience. With its flexible deployment options and automated integration with Oracle SOA Governance Suite, Oracle Service Bus handles the deployment, management and governance challenges of implementing SOA from department to enterprise scale.
Specifically, Oracle Service provides the following functional areas:
Management: Provides embedded service management capabilities that provide optimized governance of all messaging. Its preemptive support ensures that mission-critical business processes continue to serve customer needs, even as business demands, requirements, and workloads change.
Mediation: Provides a rich environment for content-based routing, message transformations, and lightweight orchestrations.
Adaptive Messaging: Reliably connects any service by leveraging standards Web service transports, traditional messaging protocols and configuration of enterprise-specific custom transports.
Security: Provides a rapid service configuration and integration environment that abstracts policies associated with routing rules, security, and service end-point access.
Comparing Oracle Mediator with Oracle Service Bus
Oracle Mediator is an intra-composite mediation component that is deployed within a composite, keeping the composite on a canonical model. Its primary function is to provide the transformation of legacy formats to a common format. It is responsible for brokering communications between components that make up a composite, enabling transformation, routing, event delivery, and payload validation inside the composite.
Oracle Adapters
Oracle Adapters use JCA technology to connect external systems to the Oracle SOA Suite.
Oracle SOA Suite provides the following technology adapters to integrate with transport protocols, data stores, and messaging middleware:
BAM
FTP
Java Messaging Service (JMS)
Advanced Queuing (AQ)
Files
Message Queuing (MQ) Series
Oracle also provides support for third-party adapters. See Other Adapters for additional information.
Business Events and Event Delivery Network
You can raise business events when a situation of interest occurs. Business events are messages sent as the result of an occurrence or situation, such as a new order or completion of an order. In Oracle SOA Suite, the mediator service component subscribes or publishes events. When an event is published, other applications can subscribe to it.Definitions for business events, as well as other artifacts of a composite, are stored in the Oracle Metadata Repository (MDS), and then published in the Event Delivery Network (EDN).
Oracle Metadata Repository
The Oracle Metadata Repository (MDS) stores business events, rulesets for use by Oracle Business Rules, XSLT files for Oracle Service Bus and Oracle Mediator, XSD XML schema files for Oracle BPEL Process Manager, WSDL files, and metadata files for Complex Event Processing.
To publishes the MDS services to the outside world, use the Oracle Enterprise Repository provided with the Oracle SOA Governance Suite.
Oracle Business Rules
Oracle Business Rules, initiated by a BPEL process service component, enable dynamic decisions at runtime allowing you to automate policies, constraints, computations, and reasoning while separating rule logic from underlying application code. In addition, the human task and mediator service components can make use of rules for dynamic routing. A mediator service component can use a business rule for routing messages, and a human task can use a business rule for routing assignments.The Oracle Metadata Repository (MDS) stores the rulesets for Oracle Business Rules.
Oracle Business Rules provide more agile rule maintenance and empowers business analysts with the ability to modify rule logic without programmer assistance and without interrupting business processes.
Oracle WSM Policy Manager
Oracle WSM Policy Manager provides the infrastructure for enforcing global security and auditing policies in the Service Infrastructure. By securing various endpoints
and setting and propagating identity, it secures applications. Oracle WSM Policy Manager provides a standard mechanism for signing messages, performing encryption, performing authentication, and providing role-based access control. You also can change a policy without having to change the endpoints or clients for this endpoints, providing greater flexibility and security monitoring for your enterprise.
In addition, Oracle WSM Policy Manager collects monitoring statistics with information about the quality, uptime, and security threats and displays them in a Web dashboard. As a result, Oracle WSM Policy Manager provides better control and visibility over Web services.

Oracle BPEL Process Manager
Oracle BPEL Process Manager provides the standard for assembling a set of discrete services into an end-to-end process flow, radically reducing the cost and complexity of process integration initiatives. Oracle BPEL Process Manager enables you to orchestrate synchronous and asynchronous services into end-to-end BPEL process flows.
You integrate BPEL processes with external services (known as partner links). You also integrate technology adapters and services, such as human tasks, transformations, notifications, and business rules within the process.


Human Workflow
Many end-to-end business processes require human interactions with the process. For example, humans may be needed for approvals, exception management, or performing activities required to advance the business process. The human workflow component provides the following features:
Human interactions with processes, including assignment and routing of tasks to the correct users or groups
Deadlines, escalations, notifications, and other features required for ensuring the timely performance of a task (human task activity)
Presentation of tasks to end users through a variety of mechanisms, including a worklist application (Oracle BPM Worklist)
Organization, filtering, prioritization, and other features required for end users to productively perform their tasks
Reports, reassignments, load balancing, and other features required by supervisors and business owners to manage the performance of tasks
The graphic shows an overview of human workflow:
A BPEL process invokes a human task activity when it needs a human to perform a task. A human task activity creates a task in the human task service component.
The human task service component uses workflow services to perform a variety of operations in the life cycle of a task, such as querying tasks for a user, retrieving metadata information related to a task, and so on.
The human task service component presents tasks to users through a variety of channels, such as Oracle BPM Worklist, email, portals, or custom applications. Oracle BPM Worklist, a role-based application that supports the concept of supervisors and process owners, and provides functionality for finding, organizing, managing, and performing tasks.
Oracle Business Activity Monitoring
Oracle Business Activity Monitoring (Oracle BAM) is a complete solution for building real-time operational dashboards and monitoring and alerting applications over the Web. Using this technology, business user gain the ability to build interactive, real-time dashboards and proactive alerts to monitor their business services and processes. More specifically, Oracle BAM enables business operation workers and managers to:
Monitor business processes and services in real-time
Analyze events as they occur by correlating events, identifying trends as they emerge, and alerting users to bottlenecks, exceptions, and solutions to business problems
Act on current conditions with event-driven alerts, real-time dashboards, BPEL processes, and Web services integration, enabling quick changes or corrective action to business processes
The graphic depicts the Oracle Business Activity Monitoring active data architecture for dynamically moving real-time data to end users through every step of the process. It shows various mechanisms to feed data into Oracle BAM. Oracle BAM processes incoming data and analyzes events. Oracle BAM Web Applications, including Active Viewer, Active Studio, Architect, Administrator, enable users to build Oracle BAM schema, dashboards, and alerts. BAM Data Control enables developers to create ADF pages with active data content. Oracle BAM and its applications then provide output to users.
Oracle SOA Suite makes it easy to expose SOA events, such as BPEL processes, to the BAM engine. Because many of the events are not SOA events, you need to consider all of the different disparate events and how you want to correlate and aggregate that information together and display in real-time dashboards.
Oracle Complex Event Processing
Databases are best equipped to run queries over finite stored data sets. However, many modern applications require long-running queries over continuous unbounded sets of data. By design, a stored data set is appropriate when significant portions of the data are queried repeatedly and updates are relatively infrequent. In contrast, data streams represent data that is changing constantly, often exclusively through insertions of new elements. It is either unnecessary or impractical to operate on large portions of the data multiple times. Many types of applications generate data streams as opposed to data sets, including sensor data applications, financial tickers, network performance measuring tools, network monitoring and traffic management applications, and clickstream analysis tools. Managing and processing data for these types of applications involves building data management and querying capabilities with a strong temporal focus.
To address this requirement, Oracle SOA Suite provides Oracle Complex Event Processing (Oracle CEP), a data management infrastructure that supports the notion of streams of structured data records together with stored relations. Oracle CEP is included with Oracle SOA Suite, but available as a separate download. It is optimized to handle very large volumes of events, such as those found in bank transactions, that cannot be managed by Oracle BAM. In addition, Oracle Complex Event Processing can perform complex correlations and pattern matching.
For a composite application to use Oracle CEP, an Oracle Mediator publishes business events to the Event Delivery Network (EDN). At runtime, the Oracle CEP Service Engine subscribes to these events. The Oracle CEP Service Engine executes a Continuous Query Language (Oracle CQL) query and searches for patterns in event streams. Oracle CQL is a query language based on SQL with added constructs that support streaming data. Using Oracle CQL, you can express queries on data streams to perform complex event processing. The Oracle CEP Service Engine listens on these streams, caches all the necessary individual, seemingly unrelated events and tries to correlate them into specific patterns. The data provided from complex event processing queries can then be used in Oracle BAM.
The potential applications of Oracle CEP are numerous, from electronic trading and risk management to intrusion detection and compliance monitoring.
Specifically, Oracle CEP provides the following functional areas:
Data and Event Sources: An Oracle CEP event source identifies a producer of data that your Oracle CQL queries operate on. Event sources include data feeds such as wire services and stock tickers, sensors such as temperature, motion, or radio frequency identification (RFID) detectors, and other devices. Oracle CEP provides a variety of adapters that connect such real-world event sources to your Oracle CQL queries. Oracle CEP adapters support the following event sources: JMS, HTTP publisher/subscriber, and file.
Context Creation: Oracle CEP offers a variety of sliding window operators and views (subqueries) that allow you to define the temporal or semantic context in which filtering, correlation and aggregation, and pattern matching takes place. Using windows and views, you can define contexts such as events in the last 5 minutes or events for a particular customer, and so on. Oracle CQL provides a variety of sliding windows, including: range-based (time or constant value), tuple-based, and partitioned. In addition, you can easily define custom window operators.
Filtering: Using Oracle CQL, you can specify queries that select on any of the attributes of the events offered by event sources. You use such queries to filter the event sources to obtain events of interest. Oracle CQL provides a rich set of operators, expressions, conditions, and statements for this purpose.
Correlation and Aggregation: Using Oracle CQL, you can perform advanced statistical and arithmetic operations on the attributes of the events offered by event sources. Oracle CQL provides: single-row functions that return a single result row for every row of a queried stream or view; aggregate functions that return a single aggregate result based on a group of tuples, rather than on a single tuple; statistical and advanced arithmetic operations based on the Colt open source libraries for high performance scientific and technical computing; and statistical and advanced arithmetic operations based on the java.lang.Math class. In addition, you can easily define custom single-row and aggregate functions.
Pattern Matching: Using the Oracle CQL MATCH_RECOGNIZE condition, you can succinctly express complex pattern matching operations for a wide variety of tasks such as algorithmic trading, double-bottom detection, non-event detection, and so on. The following example detects if perishable food is exposed to temperatures of 25 C or higher for more than 5 minutes.
select its.itemId from ItemTempStream
MATCH_RECOGNIZE (
PARTITION BY
itemId
MEASURES
A.itemId as itemId
PATTERN (A B* C)
DEFINE
A AS (A.temp >= 25) and ,
B AS ((B.temp >= 25) and
(B.element_time - A.element_time <>
C AS ((C.temp >= 25) and
C.element_time - A.element_time >= INTERVAL "0 00:00:05:00" DAY TO SECOND)
)) as its
]]>
Complex Event Sinks: An Oracle CQL event sink identifies a consumer of Oracle CQL query results. That is, a consumer of notable events that Oracle CQL queries have extracted from event sources by executing filtering, correlation and aggregation, and pattern matching within various contexts. Typically, notable events are fewer in number (and much higher in value) than the events offered by event sources. Oracle CEP adapters support the following event sinks: JMS, HTTP publisher/subscriber, file, and event beans. Event beans are Plain Old Java Objects (POJO) that contain the business logic you want executed when certain notable events occur.
Oracle User Messaging Service
Oracle User Messaging Service provides a common service responsible for sending out messages from applications to devices. It also routes incoming messages from devices to applications.
You can easily send outgoing notifications from a BPEL process flow or invoke outgoing and incoming messages for tasks assigned to users from a human task.
Oracle B2B
Oracle B2B is an eCommerce gateway that enables the secure and reliable exchange of messages between an enterprise and its trading partners. It is a binding component of the Oracle SOA Suite and this platform enables the implementation of complete end-to-end eCommerce business processes.
What Is eCommerce?
Electronic commerce, eCommerce, is the buying and selling of products or services electronically and can take many forms, for example, machine-to-application, customer-to-application, application-to-application and business-to-business (B2B). In any form, eCommerce, is an integral component of any enterprise integration strategy and the focus must be the business process. You must address process orchestration, error mitigation, data (translation, transformation, and outing), security, compliance, visibility, and management.
What Does Oracle B2B Provide?
Oracle B2B addresses the documents, packaging, transports, messaging services, Trading Partner profiles, and agreements with the following features:
Document Management: Provides multiple document standards, such as definitions, validation, translation, identification, correlation, batching, routing, code lists, and envelope generation.
Trading Partner Management: Provides capabilities to manage trading partner profiles and agreements.
Profiles: Provides trading partners details, such as identifications, contacts, users, delivery channels, supported documents, and security.
Agreements: Enables agreement between trading partners for a specific interaction.
System Management: Provides features to monitor and manage the environment.
The graphic demonstrates a typical eCommerce use case:
The application initiates the purchase order.
A mediator service component receives the purchase order. It validates, performs code conversion, transforms the purchase order to a canonical, and routes the document. (Canonical refers to a canonical data model that is used to transition between different document standards.)
A BPEL process service component receives the purchase order, orchestrates any required business process, and can invoke a human task, business rule, and error handling as required.
A mediator service component receives the purchase order, validates, performs code conversion, transforms the canonical to the target purchase order, and routes the document.
Oracle B2B receives the purchase order, identifies the partner, identifies the agreement, validates the purchase order, translates the purchase order to EDI, generates the EDI envelope, generates acknowledgments, and manages the secure exchange of the purchase order with the external trading partner.
Oracle JDeveloper
Oracle JDeveloper is the development component of Oracle SOA Suite. It forms a comprehensive Integrated Service Environment (ISE) for creating and deploying composite applications and managing the composite.
Oracle JDeveloper enables developers to model, create, discover, assemble, orchestrate, test, deploy, and maintain composite applications based on services.
The SOA Composite Editor enables you to create, edit, and deploy services, and also to assemble them in a composite application, all from a single location. These components are integrated together into one application and communicate with the outside world through binding components such as Web services and JCA adapters.
The SOA Composite Editor enables you to use either of two approaches for designing SOA composite applications:
The top-down approach of building a composite application puts interfaces first and implementation next. For example, you first add BPEL processes, human tasks, business rules, and Oracle Mediator routing services components to an application, and later define the specific content of these service components.
The bottom-up approach takes existing implementations of service components and wraps them with Web service interfaces for assembly into a composite application. For example, you first create and define the specific content of BPEL processes, human tasks, business rules, and Oracle Mediator routing services components, and later create an SOA composite application to which you add these service components.
Oracle JDeveloper provides the following additional editors to design service components:
Oracle BPEL Designer: You can create a BPEL process service component in the SOA composite application of Oracle JDeveloper and then design it by using the BPEL Designer, which is displayed, when you double-click a BPEL process in the SOA Composite Editor.
Oracle Mediator Editor: You can create a mediator service component in the SOA composite application of Oracle JDeveloper, and then design it by using the Mediator Editor, which is displayed when you double-click a Mediator in SOA Composite Editor.
Human Task Editor: You can create a human task service component in the SOA composite application of Oracle JDeveloper and then design it by using the Human Task Editor, which is displayed when you double-click a human task in the SOA Composite Editor.
Business Rules Designer: You can create a business rules service component in the SOA composite application of Oracle JDeveloper and then design it by using the Business Rules Designer, which is displayed when you double-click a business rule in the SOA Composite Editor.
Oracle Enterprise Manager
You can configure, monitor, and manage your SOA composite application during run time from Oracle Enterprise Manager Fusion Middleware Control Console. Fusion Middleware Control is a Web browser-based, graphical user interface that you can use to monitor and administer a farm.
A farm is a collection of components managed by Fusion Middleware Control. It can contain Oracle WebLogic Server domains, one Administration Server, one or more Managed Servers, clusters, and the Oracle Fusion Middleware components that are installed, configured, and running in the domain.
Fusion Middleware Control organizes a wide variety of performance data and administrative functions into distinct, Web-based home pages for the farm, domain, servers, components, and applications. The Fusion Middleware Control home pages make it easy to locate the most important monitoring data and the most commonly used administrative functions from your Web browser.
You deploy SOA composite applications designed in Oracle JDeveloper to the SOA Infrastructure. The SOA Infrastructure is a Java EE-compliant application running in Oracle WebLogic Server. The application manages composites and their life cycle, service engines, and binding components.
From Fusion Middleware Control, you select a farm and select the SOA Infrastructure for that farm to begin administration. You can navigate to Oracle SOA Suite administration tasks through the SOA Infrastructure home page and menu. The SOA Infrastructure provides you with access to all deployed SOA composite applications, service engines, service components, business events, and other elements.
Fusion Middleware Control provides a wide variety of administrative and performance data for the SOA components, composite applications, and composite instances within the SOA infrastructure, enabling you to administer and pinpoint issues.
Life Cycle of an SOA Composite Application
The basic life cycle of an SOA composite application is as follows:
Use Oracle JDeveloper to design an SOA composite application with various SOA components.
Package the composite application for deployment.
Deploy the SOA composite application to the SOA Infrastructure. The SOA Infrastructure is a Java EE-compliant application running in Oracle WebLogic Server. The application manages composites and their life cycle, service engines, and binding components.
Use Oracle Enterprise Manager Fusion Middleware Control to monitor and manage the composite application for a farm's SOA infrastructure.
SOA Composite Application Architecture
An SOA composite is an assembly of services, service components, and references designed and deployed together in a single application. Wiring between the service, service component, and reference enable message communication. The composite processes the information described in the messages.
The graphic provides an example of a composite that includes a mediator service component and a BPEL service component, an inbound service binding component, and an outbound reference binding component.
Service Components
Service components are the building blocks of an SOA composite application. Each service component is hosted in its own service engine container. Messages sent to the service engine are targeted at specific service components. For example, a message targeted for a BPEL process is sent to the BPEL service engine. Service engines process the message information received from the .
The following service components are available. There is a corresponding service engine of the same name for each service component. All service engines can interact together in a single composite.
BPEL process
For process orchestration and storage of synchronous or asynchronous process. You design a business process that integrates a series of business activities and services into an end-to-end process flow.
Business rules
For designing a business decision based on rules.
Human task
For modeling a workflow that describes the tasks for users or groups to perform as part of an end-to-end business process flow.
Mediator
For routing events (messages) between different components.
Services
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
References enable messages to be sent from the SOA composite application to external services in the outside world.
Wires
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 reference
Separately Licensed Products
You can use the following separately licensed products with Oracle SOA Suite:
Oracle Service Registry
Other Adapters
Oracle SOA Governance Suite
Oracle Business Process Management Suite
Oracle Business Process Analysis Suite
Oracle Event-Driven Architecture Suite
Oracle Data Integrator
Oracle Business Intelligence
Oracle Service Registry
The Oracle Service Registry provides visibility into services, service providers, and related resources across the enterprise. Specifically, it publishes the Oracle Metadata Repository (MDS) services to the outside world. It provides a configurable, scalable, secure repository, called the Oracle Application Server UDDI Registry, of Web services that can be managed, discovered and governed by Oracle Fusion Middleware. The Oracle Service Registry advertises the existence of these services to potential consumers. The Oracle Service Registry provides the following services for an enterprise:
Enables service providers to publish and advertise their offerings
Allows service consumers to find, access, and invoke services that meet defined criteria
Provides critical features for SOA governance
For Oracle SOA Suite, a BPEL process service component use the UDDI registry to store a service key for a partner link in a BPEL process, and a mediator service component uses the registry to store a service key for a SOAP service. A BPEL process service component interacts with external services through partner links, and a mediator service component can route to an external SOAP services. When the SOA composite application runs, BPEL process and mediator service components use the service key to query the UDDI registry for the WSDL URL for the service. In this way, Oracle Service Registry manages the endpoint for WSDLs rather than Oracle BPEL Process Manager and Oracle Mediator.
The Oracle Service Registry is also provided as part of the Oracle SOA Governance Suite.
Other Adapters
Oracle provides the following packaged-application adapters for integrating Oracle SOA Suite with various packaged applications, such as SAP and Siebel:
Oracle Applications
PeopleSoft
SAP R/3
Siebel
PeopleSoft
J.D. Edwards OneWorld
Oracle provides the following legacy adapters for integrating Oracle SOA Suite with legacy and mainframe applications:
Tuxedo
CICS
VSAM
IMS/TM
IMS/DB
Oracle SOA Governance Suite
eases the transition of an organization to service-oriented architecture (SOA) by providing a means to reduce risk, maintain business alignment, and show business value of SOA investments through a combination of people, process, and technology. Oracle's holistic SOA governance solution automates essential SOA governance processes to enable organizations to realize the agility benefits of SOA while managing risk in the transformation to SOA. It provides end-to-end capabilities to support SOA governance efforts, regardless of the status or progress of an organization's SOA transformation. Whether just embarking on an SOA program, or expanding from project or pilot to broader deployment, the Oracle SOA Governance Suite solution guides organizations along the path to demonstrated, measurable SOA success. Oracle SOA Governance Suite is Oracle Fusion Middleware's strategic approach to governing SOA.
Components in Oracle SOA Governance Suite provide visibility, control and analytics to make SOA initiatives successful:
Oracle Enterprise Repository provides metadata management for all assets within the SOA and sophisticated tools for governing those assets throughout the lifecycle and enabling their reuse.
Serving as the core of Oracle SOA Governance, its primary focus is managing the detailed asset metadata associated with the design-time stages of the service lifecycle and applying structure for promoting those assets through the different stages of the lifecycle.
Oracle Service Registry provides a standards-based reference for the dynamic discovery and use of services and their associated policies at runtime.
It contains a subset of the metadata managed within Oracle Enterprise Repository that is useful to the runtime infrastructure for dynamic discovery of services and policies. Service descriptions, service location and end points, service operations and parameters, and service policies are all examples of the information available within the registry. Oracle Enterprise Repository publishes services, policies, endpoints, categorizations, and artifacts to the Oracle Service Registry at each stage of the lifecycle. Reciprocally, assets in the Oracle Service Registry can be submitted back to the Oracle Enterprise Repository for visibility and governance.
Oracle Web Services Manager provides message-level security policies.
Oracle Enterprise Manager SOA Management Pack provides management of business processes and SOA deployments.
Oracle Business Process Management Suite
The Oracle Business Process Management (Oracle BPM) Suite enables unparalleled collaboration between business and IT, as it provides both process modeling and design capabilities in one tool. The Oracle BPM Suite enables business users to drive process modeling with minimal IT involvement. The Oracle BPM Suite is intended for human-centric use cases that require flexibility and collaboration.
Specifically, the Oracle BPM Suite contains the following components:
Oracle BPM Studio provides a modeling tool for both business analysts and IT to build and test processes. It supports both Business Process Modeling Notation (BPMN) and XML Process Definition Language (XPDL) standards.
Oracle BPM User Interaction provides user interface options for end-user interaction with processes, including the BPM WorkSpace (which is a Web based UI), extensions, or portlets that integration with Oracle's portal solutions, and lastly, options that enable process interaction through Microsoft Office. Oracle BPM Dashboards provide process visibility into the processes.
Oracle BPM Business Rules provide a comprehensive rules engine that enables externalization of rules and policies.
Oracle BPM Server provide execution of BPMN and XPDL processes. It also enables you import and export XPDL processes to BPEL process for use with Oracle BPA Suite.
Oracle BPM Process Administrator enables administration of processes.
Although there are some overlaps between Oracle BPA Suite and Oracle BPM Suite, such as BPMN modeling and simulation, the two suites address distinct use cases. While the Oracle BPA Suite supports top-down modeling starting from business objectives and strategies down to BPMN models, Oracle BPM Suite provides BPMN modeling and implementation and not the higher-level modeling features of Oracle BPA Suite.
Oracle Business Process Analysis Suite
Oracle Business Process Analysis (Oracle BPA) Suite is a modeling and analysis tool targeted at business analysts. Oracle BPA Suite extends the business value of BPEL processes and fosters collaboration between business analysis and IT. It enables process owners, skilled business analysts, and architects to perform process modeling and analysis, simulation and publishing of process models. The Oracle BPA Suite further supports the execution and monitoring of these process models for IT Developers with BPEL and Oracle BAM.
Specifically, Oracle BPA Suite contains the following components:
Architect provides process modeling using BPEL, built upon a robust service-oriented architecture, for drawing business processes.
Publisher provides a role-based presentation of process models to a Web portal.
Repository stores and provides concurrent access to business process models and related artifacts. IT developers can use Oracle JDeveloper to utilize these models to create SOA composite applications.
Simulator simulates the process
models based on a set of discrete events to do "what if" analysis. This simulation enables business analysts to discover bottlenecks, determine process throughput time, compare process alternatives,and quantify the impact of organization changes.
Oracle SOA Extensions take business processes from concepts to execution by sharing process blueprints with Oracle SOA Suite.
Oracle BPA enables collaboration among business and IT users by disseminating and distributing information. The business models promote rapid BPEL development by propagating business changes in real-time to IT. Changes can also apply to current work without IT losing work.
Unlike the Oracle BPM Suite, the business process models in the BPA Studio have to be explicitly promoted to be viewed with Oracle JDeveloper. This suite is beneficial when an enterprise is interested in how their organization or their business processes work, usually as part of a project to create a new process or to redesign or improve an existing process.
SuiteOracle Event-Driven Architecture
Oracle Event-Driven Architecture (Oracle EDA) Suite provides a set of Oracle integration products focused on meeting the event-driven application development needs for developers defining front-office applications that require low latency, high throughput, and deterministic processing of data or event streams. Oracle EDA Suite provides developers with a lightweight Java server for event processing tuned for high-throughput, low latency use cases on top of JRocket Real-Time. In addition to this event server, the Oracle EDA Suite is differentiated from the competition's offering by providing an industry-leading event processing engine and an event visibility platform.
Components in the Oracle EDA Suite provide visibility, control, and analytics to make SOA initiatives successful:
Oracle Business Rules
Oracle Service Bus
Oracle Complex Event Processing
Oracle Business Activity Monitoring
Oracle Business Rules
Oracle Business Rules, initiated by a BPEL process service component, enable dynamic decisions at runtime allowing you to automate policies, constraints, computations, and reasoning while separating rule logic from underlying application code. In addition, the human task and mediator service components can make use of rules for dynamic routing. A mediator service component can use a business rule for routing messages, and a human task can use a business rule for routing assignments. The Oracle Metadata Repository (MDS) stores the rulesets for Oracle Business Rules.
Oracle Business Rules provide more agile rule maintenance and empowers business analysts with the ability to modify rule logic without programmer assistance and without interrupting business processes.
Oracle Service Bus
Oracle Service Bus, available as a separate download with an Oracle SOA Suite license, is an intermediary that processes incoming service request messages, determines routing logic, and transforms these messages for compatibility with other service consumers. It receives messages through a transport protocol such as HTTP(S), JMS, File, and
FTP, and sends messages through the same or a different transport protocol. Service response
messages follow the inverse path.
Oracle Service Bus connects, mediates, and manages interactions between heterogeneous services, not just Web services, but also Java and .Net, messaging services and legacy endpoints. It uniquely delivers the integration capabilities of an Enterprise Service Bus (ESB) with operational service management in a single product with an efficient, seamless user experience. With its flexible deployment options and automated integration with Oracle SOA Governance Suite, Oracle Service Bus handles the deployment, management and governance challenges of implementing SOA from department to enterprise scale.
Specifically, Oracle Service provides the following functional areas:
Management: Provides embedded service management capabilities that provide optimized governance of all messaging. Its preemptive support ensures that mission-critical business processes continue to serve customer needs, even as business demands, requirements, and workloads change.
Mediation: Provides a rich environment for content-based routing, message transformations, and lightweight orchestrations.
Adaptive Messaging: Reliably connects any service by leveraging standards Web service transports, traditional messaging protocols and configuration of enterprise-specific custom transports.
Security: Provides a rapid service configuration and integration environment that abstracts policies associated with routing rules, security, and service end-point access.
Oracle Complex Event Processing
Databases are best equipped to run queries over finite stored data sets. However, many modern applications require long-running queries over continuous unbounded sets of data. By design, a stored data set is appropriate when significant portions of the data are queried repeatedly and updates are relatively infrequent. In contrast, data streams represent data that is changing constantly, often exclusively through insertions of new elements. It is either unnecessary or impractical to operate on large portions of the data multiple times. Many types of applications generate data streams as opposed to data sets, including sensor data applications, financial tickers, network performance measuring tools, network monitoring and traffic management applications, and clickstream analysis tools. Managing and processing data for these types of applications involves building data management and querying capabilities with a strong temporal focus.
To address this requirement, Oracle SOA Suite provides Oracle Complex Event Processing (Oracle CEP), a data management infrastructure that supports the notion of streams of structured data records together with stored relations. Oracle CEP is included with Oracle SOA Suite, but available as a separate download. It is optimized to handle very large volumes of events, such as those found in bank transactions, that cannot be managed by Oracle BAM. In addition, Oracle Complex Event Processing can perform complex correlations and pattern matching.
For a composite application to use Oracle CEP, an Oracle Mediator publishes business events to the Event Delivery Network (EDN). At runtime, the Oracle CEP Service Engine subscribes to these events. The Oracle CEP Service Engine executes a Continuous Query Language (Oracle CQL) query and searches for patterns in event streams. Oracle CQL is a query language based on SQL with added constructs that support streaming data. Using Oracle CQL, you can express queries on data streams to perform complex event processing. The Oracle CEP Service Engine listens on these streams, caches all the necessary individual, seemingly unrelated events and tries to correlate them into specific patterns. The data provided from complex event processing queries can then be used in Oracle BAM.
The potential applications of Oracle CEP are numerous, from electronic trading and risk management to intrusion detection and compliance monitoring.
Specifically, Oracle CEP provides the following functional areas:
Data and Event Sources: An Oracle CEP event source identifies a producer of data that your Oracle CQL queries operate on. Event sources include data feeds such as wire services and stock tickers, sensors such as temperature, motion, or radio frequency identification (RFID) detectors, and other devices. Oracle CEP provides a variety of adapters that connect such real-world event sources to your Oracle CQL queries. Oracle CEP adapters support the following event sources: JMS, HTTP publisher/subscriber, and file.
Context Creation: Oracle CEP offers a variety of sliding window operators and views (subqueries) that allow you to define the temporal or semantic context in which filtering, correlation and aggregation, and pattern matching takes place. Using windows and views, you can define contexts such as events in the last 5 minutes or events for a particular customer, and so on. Oracle CQL provides a variety of sliding windows, including: range-based (time or constant value), tuple-based, and partitioned. In addition, you can easily define custom window operators.
Filtering: Using Oracle CQL, you can specify queries that select on any of the attributes of the events offered by event sources. You use such queries to filter the event sources to obtain events of interest. Oracle CQL provides a rich set of operators, expressions, conditions, and statements for this purpose.
Correlation and Aggregation: Using Oracle CQL, you can perform advanced statistical and arithmetic operations on the attributes of the events offered by event sources. Oracle CQL provides: single-row functions that return a single result row for every row of a queried stream or view; aggregate functions that return a single aggregate result based on a group of tuples, rather than on a single tuple; statistical and advanced arithmetic operations based on the Colt open source libraries for high performance scientific and technical computing; and statistical and advanced arithmetic operations based on the java.lang.Math class. In addition, you can easily define custom single-row and aggregate functions.
Pattern Matching: Using the Oracle CQL MATCH_RECOGNIZE condition, you can succinctly express complex pattern matching operations for a wide variety of tasks such as algorithmic trading, double-bottom detection, non-event detection, and so on. The following example detects if perishable food is exposed to temperatures of 25 C or higher for more than 5 minutes.
select its.itemId from ItemTempStream
MATCH_RECOGNIZE (
PARTITION BY
itemId
MEASURES
A.itemId as itemId
PATTERN (A B* C)
DEFINE
A AS (A.temp >= 25) and ,
B AS ((B.temp >= 25) and
(B.element_time - A.element_time <>
C AS ((C.temp >= 25) and
C.element_time - A.element_time >= INTERVAL "0 00:00:05:00" DAY TO SECOND)
)) as its
]]>
Complex Event Sinks: An Oracle CQL event sink identifies a consumer of Oracle CQL query results. That is, a consumer of notable events that Oracle CQL queries have extracted from event sources by executing filtering, correlation and aggregation, and pattern matching within various contexts. Typically, notable events are fewer in number (and much higher in value) than the events offered by event sources. Oracle CEP adapters support the following event sinks: JMS, HTTP publisher/subscriber, file, and event beans. Event beans are Plain Old Java Objects (POJO) that contain the business logic you want executed when certain notable events occur.
Oracle Business Activity Monitoring
Oracle Business Activity Monitoring (Oracle BAM) is a complete solution for building real-time operational dashboards and monitoring and alerting applications over the Web. Using this technology, business user gain the ability to build interactive, real-time dashboards and proactive alerts to monitor their business services and processes. More specifically, Oracle BAM enables business operation workers and managers to:
Monitor business processes and services in real-time
Analyze events as they occur by correlating events, identifying trends as they emerge, and alerting users to bottlenecks, exceptions, and solutions to business problems
Act on current conditions with event-driven alerts, real-time dashboards, BPEL processes, and Web services integration, enabling quick changes or corrective action to business processes
The graphic depicts the Oracle Business Activity Monitoring active data architecture for dynamically moving real-time data to end users through every step of the process. It shows various mechanisms to feed data into Oracle BAM. Oracle BAM processes incoming data and analyzes events. Oracle BAM Web Applications, including Active Viewer, Active Studio, Architect, Administrator, enable users to build Oracle BAM schema, dashboards, and alerts. BAM Data Control enables developers to create ADF pages with active data content. Oracle BAM and its applications then provide output to users.
Oracle SOA Suite makes it easy to expose SOA events, such as BPEL processes, to the BAM engine. Because many of the events are not SOA events, you need to consider all of the different disparate events and how you want to correlate and aggregate that information together and display in real-time dashboards.
Oracle Data Integrator
Oracle Data Integrator helps to you to integrate the vast amounts of information stored in disparate systems. Oracle Data Integrator streamlines the high-performance movement and transformation of data between disparate systems in batch, real-time, synchronous, and asynchronous modes, with a focus on batch processing large amounts of data.
Oracle Data Integrator is optimized to handle very large transformations that cannot be managed by Oracle Mediator. The main scenarios are depicted in the graphic:
A BPEL process or a mediator service component passes XML payload for a document larger than 10 MB to Oracle Data Integrator to transform the payload.
A BPEL process or an mediator service component passes an XML payload to Oracle Data Integrator to transform and load an XML file into a database.
Oracle BAM, Oracle Complex Event Processing, Oracle BPEL Process Manager, human task, or Oracle Mediator trigger a rule requiring a data warehouse refresh for Oracle Business Intelligence. Oracle Data Integrator orchestrates data-tier loading and insertion into a staging area, and then transforms aggregate data and loads tables, enabling Oracle Business Intelligence and data warehouse applications to report on the triggered data.
Oracle SOA Suite and Oracle Data Integrator enable enterprises to perform any kind of data transfer and transformations: from real-time to batch and from small data changes propagation to complete replications. They enable companies to more easily handle initiatives related to business intelligence (BI), data warehousing, master data management (MDM), Oracle BAM, application migration and consolidation, and SOA.
Oracle Business Intelligence
Many IT environments use multiple applications and multiple data sources, making it challenging to:
Automate business processes across applications
Modify business processes
Make relevant business insight
Provide access across applications
When Oracle Business Intelligence is used in conjunction with SOA composite applications, your organization can meet these challenges. Oracle SOA Suite and Oracle Business Intelligence enable business analysts to:
Gain insight from monitor and analyze business-process data. Oracle BAM provides visibility of in-flight BPEL processes and Oracle Business Intelligence shows the business impact of process performance by integrating application and process data and providing ad-hoc analysis and reporting.
Take action from the dashboards, alerts, and reports provided by Oracle Business Intelligence. For example, a BI dashboard can initiate a BPEL process.
Orientate business processes towards business goals. You can design a BPEL process to leverage business metrics in Oracle Business Rules and generate, access, and deliver business intelligence reports.
Specifically, Oracle Business Intelligence helps answer key business questions by providing the following output to business analysts:
Production reports support all document types, such as invoices, checks, statements, and government forms.
Financial reports provide formatted financial statements and built-in financial intelligence.
Ad-hoc queries enable business users to create and modify charts, picots, and dashboards.
Interactive dashboards provide dynamic, event-driven guided analytics for leading business analysts from insight to action.
Detections and alerts provide notifications to any device in multiple formats, such as PDF reports and Briefing Books.
Microsoft Office output provides dynamic updates across applications.
Disconnected and mobile analytics provide offline reports and dashboards to PDAs, phones, and laptops
Desktop gadgets provide collaboration through report sharing, chatting, and discussion.

Sunday, 26 February 2012

SOA 11g: Automatic Recovery

A cool feature in SOA 11g, is the functionality to recover faulted instances on a particular time. This feature is introduced in PS2. Instances that are faulted and marked to be recovered, can be retried on a particular time.

It is some times a disadvantage, while you do not want this feature. By default it is recovering faulted instance form 00:00 hours. If your instances are still failing, that soa-infra tablespaces grows.

The feature can be disables or changed on an other time, via Enterprise Manager by setting the BPEL property under soa-infra -> SOA Administartion -> BPEL Properties -> More Advanced BPEL Properties -> recoveryConfig.



Put the value maxMessageRaiseSize to 0, to disable auto recovery. I even set the begin and end time the same.

Oracle Service Bus Migration (ESB to OSB)

Many customers have already build services with the Oracle SOA Suite. A part of these services are implemented with Oracle Enterprise Service Bus (ESB). After the acquisition of BEA System, Oracle introduced the new product; the Oracle Service Bus (OSB).

This product is positioned as standalone Service Bus. The ESB will be integrated into the new Oracle 11g SOA stack, and renamed into mediator as a component of the Service Component Architecture (SCA).

Business requirements can result that instead of using the ESB the OSB is required. This could result that customers already have implemented ESB services and they need to migrate to the OSB.

This article describes the approach on migration from ESB to OSB.

Assumptions
Migrating to the Oracle Service Bus requires knowledge of various technologies.
Tools
There are no tools yet for automatic migration of ESB services to OSB. That is why document give you best practise on this.

Tools that are used for the migration are:
  • Oracle JDeveloper
  • Oracle Workshop (Eclipse development)

Oracle JDeveloper
Oracle JDeveloper is use to view the ESB services. It is used to determine the dependencies of the artefacts that it is using.

Oracle Workshop
Oracle Workshop is used to build and deploy the new OSB services.

Approach
While there is no automatic migration, we need to rebuild the services in OSB. The approach is as follows.

Reuse the artifacts from ESB as much as possible. This means in practices that we will reuse the WSDL definitions, schema definitions and style sheets.

Open in JDeveloper the ESB services and determine the artifacts it is using;
  • WSDL files
  • XSD schema's
  • Used elements
  • Used namespaces
  • Stylsheets
  • Filters
  • Adapters
Describe for each ESB service the artifacts in structured way; for example in a table format:


Based on these artefacts, the OSB services can be build.

Development environment
Depending on the complexity of the OESB services, a different sequence of steps should be followed. First of all a project structure should be in place. In this project structure various components will be stored.

Projects
The Workspace (OSB Project Structure) should contain one OSB Configuration Project, give this configuration a name "MyOSBConfig" and an OSB Project called "MyOSBMigration". The former contains the server definition for an OSB Server running on :, the latter all project resources.

Folder Structure
Create for every ESB service, an OSB service with the following directory structure.
ESBName<ESBName>
Input
WSDL <WSDLFile>
Schema <SchemaFile>
Element <elementused>
Adapter?
DB
DatasourceJNDI<JNDIdatasource>
Query<query>
JMS
JMSConnectionfactory<jmsconfactory>
Queue/Topic<queue/topicname>
File
Directory<directory>
Filename<filename>
Output#1
FilterUsed<Y/N><XPATHfilter>
WSDL <WSDLFile>
Schema <SchemaFile>
Element <elementused>
Adapter?
WS<endpoint>(MarkifthisaBPELWS)
DB
DatasourceJNDI<JNDIdatasource>
Query<query>
JMS
JMSConnectionfactory<jmsconfactory>
Queue/Topic<queue/topicname>
File
Directory<directory>
Filename<filename>
Output#2
<nextoutput>


FolderDescription
BusinessServiceAll the business services are located here.
ProxyServiceAll the proxy services are located here.
SchemaLocal schema's in the project are located here.
TransformationLocal transformation files (XSLT & XQuery).
WsdlThe interface definitions.

For each ESB project copy the used XSLT files into the transformation directory.

Naming Convention
A recommended approach for naming conventions of OSB resources is to add the
prefix `PS_' for Proxy Services, `BS_' for Business Services, `XQ_' for XQuery
transformations, and append a version indication `_v1r0'. Examples:

Project: CollectOrderInformation
Proxy service: PS_GetOrder_RS_v1r0
PS_GetOrderLines_RS_v1r0

Bus. Service: BS_GetOrder_v1r0
BS_GetOrderLines_v1r0

Proxy Endpoints:
The enpoints of the proxy services will be renamed to

/<logical_name><proxyname_v1r0>

Common Schemas
All schemas of the Common data Model are imported in the OSB project in folder Common/Schema/. All generated or imported WSDLs should preferably refer to these schemas, potentially importing service specific schemas in the "Schema" folder of the respective service.

Implementation
Based on the pervious table the OSB service can be build. Execute the following steps to perform this.
  • Create the business services
  • Create the proxy service
  • Implement the message flow
Create the business services
Create a new business service for each output definition. If an external web service is called, import or consume the WSDL definition of that web service. The same applies if this service is a BPEL process. In this case some additional changes should be made, this is described in the next paragraphs..

If you are calling a BPEL process, you could use the BPEL transport instead of normal http protocol. The BPEL protocol is more efficient implementation on calling BPEL from OSB.

When the business service is created, the WSDL and schemas are copied into a folder of your project. After creating the business service move the WSDL files to the WSDL directory and the schemas to the Schema directory or to the Common/Schema directory.

Note: With BEA ALSB 3.0, you should remove the partner link bindings, otherwise the WSDL is invalid. This is fixed in OSB 10gR3.

Create the proxy service
Create a new proxy service for each input definition. If the service is based on a interface definition from an external web service is called, import or consume the WSDL definition of that web services.

When the proxy service is created, the WSDL and schemas are copied into a folder of your project. After creating the proxy service move the WSDL files to the WSDL directory and the schemas to the Schema directory or the Common/Schema directory.

Implement the message flow
Implementing the flow is the most important step of the migration. Based on the various output from the ESB, you should route the message to the various business services.

The most simple one is just create a routing node to call the services.
Often we need a transformation call the business service
In the replace action we define the transformation., this is based on the style sheet of the ESB.
When there are filters defined in ESB service, this can be replaces in OSB via If-Then actions or conditional branches actions.

Stylesheets
Note that there can be issues with style sheets. The style sheet is based on the JDeveloper diagrammer, it is using namespaces and namespace aliases based on the interface definition of the ESB. Execute the test action on the replace action of the Oracle Workshop (Eclipse).
It could be that the style sheet is using Oracle SOA specific extensions or custom functions, these are not available in OSB. If this is the case, you should change the style sheet or, which is easier, create a XQuery transformation.

Deployment and Test
Deploy and test the OSB service, you could use various test scenarios and tools to perform this.
  • Test style sheets and XQueries from Eclipse.
  • Test business services from the OSB Console.
  • Test proxy services from the OSB Console.
  • Use tools such as SoapUI to perform end-to-end tests.



Adapters
Database Adapter
Note that the current version of OSB does not have a DB adapters as in the ESB.

Therefore you should create the DB adapter in BPEL as a simple wrapper for this
query. The BPEL process should use the same input and output schema's and namespaces as generated in the partner link of the DB adapter. The future version of OSB 10gR3 will have support of the DB adapter.

JMS Adapter
The OSB has full support of the using JMS messaging.

Import WSDL from BPEL
The ESB service has both the Proxy Service as the Business Service based on the same WSDL that is `consumed' from the BPEL process. The steps to create a similar service in OSB are:
  1. Import the WSDL from the BPEL process URI (?WSDL) by consuming froma URI. All included schemas are imported as well and stored in the samefolder.
  2. Leave the WSDL itself in the `WSDL' folder.
  3. Drag and drop the service specific schema to the `Schema' folder thereby automatically changing the reference in the WSDL.
  4. Change the references from either the WSDL or the service specific schema to the CDM schemas by changing the "schemaLocation" property of the "import"tag.
  5. Remove the imported CDM schemas from the `wsdl' directory.
  6. Add a Business Service in the `BusinessService' directory based on the imported WSDL.
  7. Add a Proxy Service in the `ProxyService' directory based on that same WSDL.
  8. Add a `Routing Node' to the Proxy Service and route to the Business Service.

Imported WSDL from ESB
The ESB service has a Proxy Service based on a ESB "generated" WSDL and the Business Service based on the WSDL of a BPEL process. The steps to create a similar service in OSB are:
  1. Import the OESB "generated" WSDL in the Workspace `wsdl' folder.
  2. Add a "service" and a "binding" to that WSDL, because the WSDL is not well-defined, refer to the PortType of the WSDL.
  3. Create a Proxy Service in the `ProxyService' directory based on that WSDL.
  4. Import the WSDL from the BPEL process as described for the previous service migration; don't forget to move the schemas.
  5. Add a Business Service in the `BusinessService' directory based on the imported WSDL.
  6. Add a `PipelinePair' to the Message Flow of the Proxy Service.
  7. In the request Pipeline, add a `stage' with a `replace' action, change the XPath to `.', enter variable `body', in the expression select the XSL file and add the rootelement of the body (request) to the `Binding' box, check `replace node contents'.
  8. Same for the response `Pipeline', but obviously for the response XSL and the response rootelement.
  9. Add a `Routing Node' to the Proxy Service and route to the Business Service.

Friday, 17 February 2012

SOA Design Patterns in the Cloud

Service Oriented Architecture (SOA) is a software design approach in which an application consists of software services and  software service consumers. Some of the attributes of SOA being
  • Loose Coupling
  • Contracts between service provider and service consumer
  • Allows co working of multiple technologies
There may be  some  confusion in the air about the applicability of SOA in a Cloud  managed environment and whether  Cloud is the next generation of SOA, however SOA as a design approach is complimentary to the attributes of Cloud and together they further strengthen the delivery of services over the network.   This articles  explains some of the design patterns of SOA and their usage in a Cloud environment.
For the sake of case study, Oracle SOA 11g Suite is  used as the SOA development platform and Amazon EC2 Suite of products is used for the Cloud platform.

While there is not a specific AMI within Amazon EC2 at this time that also host the Oracle SOA Suite, however Oracle SOA suite can very much be installed be on the  AMI that  contain Windows 2008 Server or  Red hat Enterprise  Linux .
Applicability Of SOA Design Patterns In a Cloud Platform
The following  chart  explains the various  SOA patterns, especially as applicable to Oracle SOA Suite and their  fitment to a Cloud platform.
SOA Pattern
Applicability To  Cloud Platform
Adapter Pattern : It allows to connect to multiple technologies like messaging , databases without knowing much of the internals of them. For example Database Adapter is basically to service enable databases without having to  write SQL.

Oracle 11g SOA Suite supports database adapters to multiple databases.
Amazon RDS (Relational Database Services) exposed as an SOAP based interface which can be connected as a Adapter pattern using the regular Services Interface as part of Oracle SOA Suite.

Amazon Simple DB is a non relational database service, which can be connected using the regular SOAP interface and can satisfy the needs of Adapter pattern in SOA.

Amazon EBS and S3 based instances  can satisfy the needs of  File Adapter in a SOA.
Mediator Pattern : Mediator is the component in charge of interconnecting the other components within a composite application.
Oracle SOA suite uses mediator pattern for intra composite  mediation.
With Multiple EC2 Instances can run different services like  basic compute services, storage services like EBS,  database services like  RDS, Simple DB,  it is very much possible to have a mediator  that inter connects the multiple services towards a business process realization.
Binding Pattern : The binding can be used expose the SOA composite applications over SOAP .
With Elastic IP,  Services  can be exposed to outside Cloud Consumers that will act as a Binding.
Business Process Orchestration Pattern : This pattern aims at realizing long running business process through  orchestration  of multiple individual  services.

Oracle 11g Suite support BPEL Component to perform orchestration .
With various  services exposed as Services as explained above, a Business process can be orchestrated in a cloud platform much similar  in a  normal data center.
Proxy Pattern : A business service describes the end point being virtualized, its policies and interfaces. A proxy service is what the service bus exposes to service consumers and implements the virtualization logic.
With Elastic IP acting as a proxy interface to multiple virtual machines and abstracts from issues like Virtual machine failure or migration of Virtual machines, Cloud platform adapts the Proxy pattern to support virtualization.
Asynchronous Pattern : In a real world scenario Asynchronous pattern is helpful when
  • When the response might not come back instantly from the service provider
  • When a given request needs to be send to multiple providers or vice versa
  • When the service consumer did not know who will provide the service
  • When consumer and provider will not be online at the same due to geographical and time zone constraints
Amazon SQS is a distributed queue system that enables web service applications to quickly and
reliably queue messages that one component in the application generates to be consumed by another component.
Using Amazon SQS, you can decouple the components of an application so they run independently, with Amazon SQS easing message management between components. Any component of a distributed application can store any type of data in a fail-safe queue. Any other component can then later receive the data programmatically using the SQS API.

Summary
With SOA is fundamentally a loosely coupled computing paradigm, with the following attributes :
  • Loose Coupling
  • Discoverability
  • Location Transparency
The Cloud Platform  is a ideal platform for implementing  SOA based Business Process Realization and the above mentioned supporting Services in Amazon EC2 will help to realize the Same.

A similar comparison is also possible in the Windows Azure platform with the support from Microsoft framework.  So as we see,   Cloud Platform further compliments to the benefits of SOA platform.

Debug Logging in BPEL using Sensors – Part 1

When developing and/or debugging BPEL processes, the Oracle BPEL Console is your best friend. Every change to every variable, every activity that was executed, everything is right there for you to inspect, whether the instance is still in-flight or already completed. But although this sounds like the ultimate debugging tool, I’m sure you’ve noticed like me that when your processes get really big (which they tend to do rather quickly), there’s two reasons why debugging can be difficult. The first is plain and simple “information overload”. If your audit flow contains hundreds of activities and possibly thousands of variable data changes, finding an individual piece of information is not trivial. I find the second reason, however, to be of even more profound impact: the BPEL console will not show you the execution path through your process flow (which would indicate which parts of the code got executed, and which didn’t), but rather it displays a long, sequential list of  Activities that were executed. Especially if you have a lot of switch and/or pick statements, and if your code contains loops (in which case each iteration will add all executed Activities to the list), determining “what happened” during execution of your instance from this long, long audit trail might prove a challenge.
In a “mini-series” of Blog entries, I will share a number of techniques that I have used in situations like this, to extract logging/debug information from a BPEL process instance using BPEL Sensors. This first entry will focus on a simple, straightforward form of logging, using a “Variable Sensor” to provide a sort of “management summary” of the execution of a BPEL process instance. ....

Using Sensors for Logging and Debugging

BPEL Sensors can be very useful to extract information from the execution of a process. Basically, they come in three flavours: Activity Sensors, Fault Sensors and Variable Sensors. The first type is ideal to have a BPEL process trigger “events”, as you can configure them to “fire” when individual Activities in your process get executed. You even get to specify if they need to fire on activation (i.e. before the Activity is executed), on completion, on faults, when compensation is invoked, or on all these events. Finally, you can pass any amount of process data along to it, allowing the “Sensor Action” associated with the Sensor to use that information, for instance by posting it on a queue, storing it in the database, sending it to a BAM server, or invoking custom Java code with it.
Sometimes I use Activity Sensors for debugging purposes, by adding them to critical activities that determine process behavior, and adding process variables to them so that I can see those bits of information that were crucial at that particular moment in process execution. This is a very powerful method and I will show some examples in future Blog entries, but often, my needs are more simple, and all I really need is a BPEL equivalent of a good old Log4J statement in Java code:
log.debug(‘Entering Order line loop, with ‘+orderlines.size()+’ order lines’);

Simple logging using Variable Sensors

For simple logging like this, where the log messages are just simple strings, the “Variable Sensor” comes in handy. This type of Sensor is triggered every time a change is made to a process variable. So, unlike Activity Sensors where you need to specify exactly where in the process flow you want that sensor to fire, with Variable Sensors you only define it once and it fires automatically each and every time in your process when changes are made to the process variable it is assigned to. So basically, to get some simple debug logging going, all you need is to create one “Log” variable, add a Variable Sensor to it, and just by assigning a new value to it anywhere in the process where you need logging, the Sensor fires and processes the value of the variable.
So, how does this work? As an example, let’s take the BPEL process flow below. This is a simple demo flow and, as mentioned before, for simple flows the BPEL Console works perfectly well all by itself. Just imagine this is part of a much bigger process, and you would need to figure out what happened in this part of the flow by inspecting hundreds of audit trail entries.
 

Configure Sensors for Logging purposes 

To incorporate Sensor based logging in our process, there are two tasks to perform. The first part is configuration. You only need to do this once for the entire process. In terms of Log4J, it would compare to the code at the top of the class, defining the "log" variable that we can write to.
Log log = LogFactory.getLog(this.getClass());
In fact, this is incredibly similar to what we will do in BPEL! We also start by adding a variable, “LogMessage”, to the process, and then we add a Variable Sensor to it that will process all changes that are made to it. To get started, click on the “Variables” icon on the process diagram (x) (see screenshot below).

 
In the window that pops up, create a new Variable called “LogMessage”, of type xsd:string.
 
Click “OK” to close this window, then select the newly created “LogMessage” variable and click on the “Edit” button:.
 
Select the “Sensors” tab, and press the “Create” button to create a Variable Sensor:.
 
Name the sensor “LogSensor”, and use the little icon on the right of the “Target” field to select the “LogMessage” variable. It’s kinda weird you need to do this since you entered this window from the “Edit Variable – LogMessage” window, but oh well….
 
A Sensor is like a trigger definition that indicates _when_ it fires. But in order to make it _do_ something, you’ll need to tie it to a “Sensor Action”. In PL/SQL terms, a “Sensor” is like a table trigger that invokes a PL/SQL procedure, and the “Sensor Action” is the procedure that it invokes. The Sensor Action (procedure) can therefore be re-used by many Sensors (triggers).
You can create a Sensor Action within the current dialog, by clicking the “Add” button in the “Sensor Actions” section. In the “Sensor Action Chooser” you can pick previously defined Sensor Actions, but since we have not created one yet, we’ll do that now. Notice that there are two flavors to choose from: BAM Sensor Actions, and regular “Sensor Action”. Choose the latter..
 
In the dialog that pops up, call the Sensor Action “LogAction”, and leave “Publish Type” to “Database”. This means that the Sensor events (including their data) will be written to a pre-defined database tables in the BPEL dehydration store. In this case (this being a Variable Sensor), that table is “VARIABLE_SENSOR_VALUES”. Unfortunately, you can NOT define your own table. But for debug logging purposes like ours this is ideal, especially since the BPEL console has maintenance facilities to clean up this table. In fact, as you’ll see later, there is not even any need to query this table, as its contents will be shown in the BPEL Console when inspecting the process instance..
 
Press OK, and see how the newly created LogAction is tied to the LogSensor on the LogMessage variable. Also notice you could have multiple Sensor Actions could be tied to a single LogSensor, allowing you, for instance, to write to the database AND post to a JMS queue..

OK this dialog, and see the summary: You have a LogMessage variable, with a sensor called “LogSensor” on it, which is tied to the “LogAction” Sensor Action (which will publish to the database).
 

This concluded the configuration part. Although it may seem like a lot of work the first time, I promise that this takes under a minute once you’ve done this a few times. And, remember, you only need to do this once for the entire process. The actual "log statements" are far simpler to create, as we’ll see next.

Adding "Log statements" to your Process 

What we have now is a LogMessage variable which is “rigged” so that every change to it will automatically be published to the database (and, as you will see later, is also automatically visible in the BPEL console). All we need to do now is start creating our "log statements" in the BPEL process. This simply means: assigning values to the “LogMessage” variable at places in your process flow that currently interest you. 

You can add new Assign activities to your process to do this, or just add Copy Operations to existing Assigns activities in your process. In the “Assign” dialog, select the LogMessage variable on the right (notice the cool “sensor” icon to the left of it), and (typically) the ‘Expression’ type on the left. You could log simple strings by just typing something like ‘Hello, this is debug logging’ (don’t forget the single quotes), or use the Expression Builder to mix your log statements with dynamic values (typically with the ‘concat’ statement, with which you can concatenate an arbitrary number of strings, separated by commas).
 
Below is the result of adding a simple, static log statement to an existing Assign activity:.
 

The Result 

Now I’m sure you are wondering where this logging turns up after initiating a process instance. Well, our “LogAction” Sensor Action published to the database, but fortunately you won’t have to go to the database and query that table to retrieve the logging information. When looking at the Flow of an individual instance in the BPEL Console, one of the tabs reads “Sensor Values”. Below, you can see the result from adding some log statements to the Process we started out with.
 
So there you have it. Simple, log4J style logging that requires just a little setting up at Process level, and then simply some Copy rules to a single “LogMessage” variable to create logging that is conveniently accessible from the BPEL console.

Cleaning up

To wrap things up: how to clean things up after you’re done debugging. When you no longer need your log statements, there’s a couple of things to do. First, you can purge all sensor values from the BPEL tables, by going to the “Instances” tab in the BPEL Console and clicking the “Purge All Sensor Data” button. Then, in JDeveloper, have some options. You can:
  1. Disable logging for now (but you might want to turn it back on later)
    To do this, simple delete the LogSensor from the LogMessage variable. The LogMessage variable and log statements remain in your code but will take hardly any time during execution, and no sensors will fire (and therefore no database activity to the sensor tables will take place). All you need to do to turn logging on again at a later point is recreate the LogSensor and assign it to the LogAction (which will still be there).
  2. Remove all trace of logging
    • Delete the LogMessage variable from the BPEL process.
    • Rebuild the process and notice the compilation errors. Clicking on them will lead you to all the Copy operations where you wrote to the LogMessage variable. If this is the only operation in the Assign, remove the assign, otherwise just remove the Copy operation.
    • Rebuild the process to make sure you’ve gotten rid of them all.
That it for now. In the next part, I will show how you can use Activity Sensors if using a simple xsd:string as log message does not suffice, and you need more information about the BPEL process state in your log. In the third (and probably final) part, I will show how you can use a custom Java SensorAction, to be able to use the Log4J logging framework to deal with your log messages.

Saturday, 11 February 2012

XREF table creation and lookups in SOA Suite 11g

I was working on a requirement on XREF tables in SOA Suite 11g. I would like  to share my experience here.
Sample requirement: I created two dummy tables  
SAP_EMP_TABLE 
R12_EMP_TABLE
The content of SAP_EMP_TABLE was as follows:
EMP_ID
EMPNAME
JOBCODE
1
Sharat
SAP1
2
Neeraj
SAP2
3
Abhishek
SAP1
And I wanted to transfer the data in R12_EMP_TABLE as so that
SAP1=ORC1
SAP2=ORC2
Approach:
So, First I created XREF Table inside a BPEL process(XrefCreationDemo), SAP_ORCL.xref.
I populated this XREF table with Reference values and their respective column names using the function:
xref:populateXRefRow("SAP_ORCL.xref","SAP","SAP2","ORCL","ORC2","ADD") in an assign activity.
At first I got confused because there was nothing inside SOA_INFRA.XREF_DATA table after this. But at the same time I was sure that it is working fine because it was not running second time. Which means that actually the values were getting stored somewhere. For this please check the XREF data source at Weblogic Admin and there you can find out where actual XREF_DATA is present. There I saw that whatever I inserted was present. Here is the content present in XREF_DATA table.

  
After this I created another process XrefDemo, in which I used the following inside transform activity between source table and destination table
xref:lookupXRef("oramds:/deployed-composites/XrefCreationDemo_rev1.0/SAP_ORCL.xref","SAP",ns0:jobcode,"ORCL",true())
Here you can see that the XREF table we inserted is present at oramds:/deployed-composites/XrefCreationDemo_rev1.0/ which is nothing but the project name of the process in which we populated the XREF Table.
After using xref:lookupXRef I was successful in inserting the data in R12_EMP_TABLE and its content was as follows:
EMP_ID
EMPNAME
JOBCODE
1
Sharat
ORC1
3
Abhishek
ORC1
2
Neeraj
ORC2
Conclusion: The Xref tables we create is a one-time activity and we can refer to any XREF table from oramds, if it is properly populated in XREF_DATA. We will be using BPEL process for populating the data.

xslt padding with characters call template for left pad and right pad

  Could a call-template be written that took two parameters ?   a string, and a   number) return the string with empty spaces appended t...