Software Development Lifecycle und die Oracle SOA Suite 10g

cockeysvilleuterusSoftware and s/w Development

Dec 2, 2013 (3 years and 7 months ago)

208 views

Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Introduction

Guido Schmutz

Working for Trivadis for 12 years

Co-Author of different books

Consultant, Trainer Software Architect for Java, Oracle, SOA
and EDA

Member of Trivadis Architecture Board

Trivadis Technology Manager

More than 20 years of software development experience

Contact: guido.schmutz@trivadis.com
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Agenda
Data are always
part of the game.

Introduction

BPEL Lifecycle Management

ESB LifecylceManagement

Summary
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Fusion Middleware –Oracle SOA Suite 10.1.3.4
J2EE Application Server
Oracle AS, JBoss, WebLogic, WebSphere
Messaging
Metadata
Repository
DATA SERVICES &
CONNECTIVITY
Apps
Adapters
Adapters
Partners
B2B
B2B
RFID
SES
SES
DB
Bulk
ODI
ODI
ETL
Multi
Protocol
Routing
XSLT
Transform
Enterprise Service Bus
Enterprise Service Bus
Native
BPEL
Business
Rules
Human
Workflow
BPEL Process Manager
BPEL Process Manager
ROUTING & ORCHESTRATION
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Deployment –The challenge so far (before 10.1.3.4)

Deploying a SOA Project to a different environment (Test,
Development, Production) requires changes to the project

Location of services

Port numbers of services

Location of hosted WSDLs

Location of hosted XSDs

...

Changes have to be made in various files

Changes have to be made manually

Often need a different artifact (BPEL suitcase, ESB suitcase) for
each environment
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Agenda
Data are always
part of the game.

Introduction

BPEL Lifecycle Management

ESB LifecylceManagement

Summary
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
BPEL normal deploymentsteps

Using “Deploy”in JDeveloper
 

 

  

 
 
 
 
       



























 

Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
ParterlinkWSDL location:
http://devhost:8888/orabpel/CreditService?wsdl
Deploying to multiple environments

Deploying a BPEL suitcase to other environments
uses same configuration
Engine
Delivery
Queue
WSIF Framework
Dehydaration
Dev Server
JDeveloper/ Ant Scripts
BPEL Suitcase
deploy
ParterlinkWSDL location:
http://devhost:8888/orabpel/CreditService?wsdl
Engine
Delivery
Queue
WSIF Framework
Dehydaration
Test Server
deploy
ParterlinkWSDL location:
http://devhost:8888/orabpel/CreditService?wsdl
bpel.xml
CustomerService.wsdl
OrderService.wsdl
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Deploying to multiple environments

Configuration can be
changed, but must
be done manually

Many settings in
many files to change

Filenames are
always different for
each project making
scripting difficult

Results in multiple
suitcases (same
files, different
settings)
Engine
Delivery
Queue
WSIF Framework
Dehydaration
Dev Server
deploy
ParterlinkWSDL location:
http://devhost:8888/orabpel/CreditService?wsdl
ParterlinkWSDL location:
http://devhost:8888/orabpel/CreditService?wsdl
Engine
Delivery
Queue
WSIF Framework
Dehydaration
Test Server
deploy
ParterlinkWSDL location:
http://
testhost:7777
/orabpel/CreditService?wsdl
ParterlinkWSDL location:
http://
testhost:7777
/orabpel/CreditService?wsdl
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Solution: the Deployment Plan (since 10.1.3.4)

Allows users to develop in one environment (possibly using
JDeveloper) and then –without touching the code –deploy the
suitcase to another environment

Holds configuration for one environment

Instead of managing separate suitcase files, the user generates a
deployment plan from a suitcase and modifies the configuration for
each environment

Eliminates the need to provide customized suitcases for each
environment
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
DeployingusingDeploymentPlan
Engine
Delivery
Queue
WSIF Framework
Dehydaration
DevServer
ParterlinkWSDL location:
http://devhost:8888/orabpel/CreditService?wsdl
Engine
Delivery
Queue
WSIF Framework
Dehydaration
Test Server
ParterlinkWSDL location:
http://
testhost:7777
/orabpel/CreditService?wsdl
deploy
deploy
ParterlinkWSDL location:
http://devhost:8888/orabpel/CreditService?wsdl
ParterlinkWSDL location:
http://
testhost:7777
/orabpel/CreditService?wsdl
BEPL Project
compile
deploymentPlanDEV.xml
deploymentPlanTEST.xml
create
c
reate
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Deployment Plan

You can replace the following attributes and properties

Configuration properties in the BPEL deployment descriptor
(bpel.xml)

Partner link binding property in bpel.xmlfile

schemaLocationattribute of an import in a WSDL file

locationattribute of an include in a WSDL file

schemaLocationattribute of an include, import and refine in an
XSD file
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Creating a Template Deployment Plan

add the following commands to the build.xmlant file that is
build by JDeveloperfor the BPEL project

Creates the deployment plan either directly from project files or from a
generated suitcase
<target name="generate_plan_from_project">
<
generateplan
planfile
="${process.dir}/templ-planfile.xml
"
verbose="true"
overwrite="true"
descfile="${process.dir}/bpel/bpel.xml"/>
</target>
<target name="generate_plan_from_suitcase">
<
generateplan
planfile="
${process.dir}/templ-planfile.xml
"
verbose="true"
overwrite="true"
suitecase="${process.dir}/output/bpel_${BPELSuitcase.BPELProcess(id)}
_${rev}.jar"/>
</target>
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Creating the Deployment Plan (I) –using template
<replace>is used to replace the value of a property within the bpel.xml
<BPELDeploymentPlanxmlns="http://schemas.oracle.com/bpel/deployplan"
xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/">
<BPELProcessid="BPELBusinessProcess">
<partnerLinkBindings>
<partnerLinkBindingname="client">
<property name="wsdlLocation">
<replace>BPELBusinessProcess.wsdl</replace>
</property>
</partnerLinkBinding>
<partnerLinkBindingname="CustomerService">
<property name="wsdlLocation">
<replace>CustomerService.wsdl</replace>
</property>
</partnerLinkBinding>
<partnerLinkBindingname="CreditCardService">
<property name="
wsdlLocation
">
<replace>
http://
devserver:8888
/esb/wsil/…CreditCardValidationRS?wsdl
</replace>
</property>
</partnerLinkBinding>
...
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Creating the Deployment Plan (II) –using template
<searchReplace>is used to <search>for a string in WSDL and XSD files and
<replace>it with another string.
...
<wsdlAndSchemaname="
Order.cdm.xsd|OrderService.wsdl
">
<jca:propertyname="PhysicalDirectory">
<searchReplace>
<search>c:\temp</search>
<replace>c:\temp\devserver</replace>
</searchReplace>
</jca:property>
</wsdlAndSchema>
<wsdlAndSchemaname="
*
">
<searchReplace>
<search>localhost</search>
<replace>
devserver
</replace>
</searchReplace>
</wsdlAndSchema>
</BPELDeploymentPlan>
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Attaching a Deployment Plan to a BPEL Suitcase

add the following commands to the build.xmlant file that is
build by JDeveloperfor the BPEL project

This attaches a specific deployment plan to the BPEL suitcase
<target name="attach_plan">
<
attachplan
planfile="
${process.dir}/planfile.xml
"
verbose="true"
overwrite="true"
suitecase="${process.dir}/output/bpel_${BPELSuitcase.BPELProcess(id)}
_${rev}.jar"/>
</target>
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Modifying Ant to Use Deployment Plan

to add the attachment of the plan file as part of the regular deploy
process modify the dependency of the process-deploytask
<target name="process-deploy"
depends="validateTask, compile,
attach_plan
, deployProcess,
deployTaskForm, deployDecisionServices"/>
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Descriptor in BPEL console reflects changes
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Unit Testing BPEL
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Agenda
Data are always
part of the game.

Introduction

BPEL Lifecycle Management

ESB LifecylceManagement

Summary
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
ESB normal deploymentsteps

using “Register with ESB”in JDeveloper
 

 

  

 
 
 
 
       



























 

 
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Deploying to multiple environments

Deploying a ESB
suitcase to other
environments
uses the same
configuration

Same problem as
with BPEL
Dev Server
JDeveloper
ESB Suitcase
register
WSDL location:
http://devhost:8888/orabpel/CreditService?wsdl
WSDL location:
http://devhost:8888/orabpel/CreditService?wsdl
Test Server
register
WSDL location:
http://devhost:8888/orabpel/CreditService?wsdl
Metadata
Server
WebDAV
WSIF Framework
Database
Metadata
Server
WebDAV
WSIF Framework
Database
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Solution 1: Location attribute

ESB suitcase is deployed normally

Location attribute of Service Endpoints is changed on the ESB
console

Still many manual adjustments necessary, but without having to
touch/change the suitcase
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Solution 2: using Ant Deployment feature (10.1.3.4)

Similar to the BPEL deployment plan

A set of custom ant tasks that can be used for deployment
automation

Enables to deploy, undeploythe metadata to an ESB metadata
(design time) server with and without property substitution

ESB uses no build script by default, have to create your own one
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Ant Deployment feature: deployESBProjects

Can be used to deploy one to many ESB projects to a given ESB
metadata server

Identical behavior to that of JDeveloper“Register with ESB”
function
<target name="DeployESBProjects">
<deployESBProjectsesbMetadataServerHostname="localhost“
esbMetadataServerPort="8888"
userName="oc4jadmin"
password="welcome1">
<esbProjectdirectory="${basedir}"/>
</deployESBProjects>
</target>
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Ant Deployment feature: undeployESBEntities

Can be used to undeployone of many ESB entities (systems,
service groups and services)

Entities can be specified in any order

The guidfor any ESB entity can be found in corresponding the
.esbsys, .esbgrpor .esbsvcfiles
<target name="UndeployESBEntities">
<undeployESBEntitiesesbMetadataServerHostname="localhost"
esbMetadataServerPort="8888"
userName="oc4jadmin"
password="welcome1">
<system guid="67BA4DF1BED411DDBFA873B82343E5E5"/>
<serviceGroupguid="6E6A3020BED411DDBFA873B82343E5E5"/>
<service guid="76597020BED411DDBFA873B82343E5E5"/>
<service guid="C6D58890BED411DDBFA873B82343E5E5"/>
<service guid="A9D47E11C0B211DDBFDA3581D20F8214"/>
</undeployESBEntities>
</target>
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Ant Deployment feature: extractESBDeploymentPlan

Supports extracting the deployment plan from a JDeveloperESB
project into the identified Deployment Plan file

ESB project must have been deployed at least once using
JDeveloper’s“Register with ESB”function
<target name="ExtractESBDeploymentPlan">
<delete file="${basedir}/templ-planfile.xml" verbose="true"/>
<extractESBDeploymentPlansourceDir="${esbProjectToDeploy}"
deploymentPlanFile="${basedir}/templ-planfile.xml"/>
</target>
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Ant Deployment feature: deployESBSuitcase

Can be used to deploy one ESB project which is maintained by
JDeveloperwith the contents of the designated Deployment Plan
file applied

Provides identical behavior to the Register with ESBfunction with
the following differences

Application of the deployment plan is not done in Register with ESB

Automatic refresh/resynchis not done with this task
<target name="DeployESBSuitcase" depends="UndeployESBEntities">
<deployESBSuitcaseesbMetadataServerHostname="localhost"
esbMetadataServerPort="8888"
sourceDirectory="${esbProjectToDeploy}"
deploymentPlanFilename="${deploymentPlanFilename}"
forcedDeployment=“true"/>
</target>
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
ESB deployment plan
<deploymentPlan>
<systemDeploymentPlanqname="SoftwareLifecycleDemo">
<deferredQueueNametopicConnectionFactory="OracleASjms/MyXATCF"
numberOfListeners="1">OracleASjms/ESBDeferredTopic</deferredQueueName>
<properties>
<property value="esb" name="clusterName"/>
<property value .../>
</properties>
<serviceGroupDeploymentPlan
qname="SoftwareLifecycleDemo.CreditCardServices">
<parent type="system" qname="SoftwareLifecycleDemo"/>
<serviceDeploymentPlan
qname="
SoftwareLifecycleDemo.CreditCardServices.AmexcoCreditCardService
"
status="ENABLED">
<parent type="serviceGroup" qname="SoftwareLifecycleDemo.CreditCardServices"/>
<properties>
<serviceDefinition>
<property value="AmexcoCard.wsdl" name="wsdlURL"/>
<property value="
http://testserver:8888/event/SoftwareLifecycleDemo/
CreditCardServices/AmexcoCreditCardService
" name="soapEndpointURI"/>
</serviceDefinition>
<endpoint>
<property value="http://testserver:8091/AmexcoCardService/"
name="Location"/>
</endpoint>
</properties>
</serviceDeploymentPlan>
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Using the Deployment Plan
build.
DEV
.propertiesbuild.
TEST
.properties
build.xml
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Unit Testing ESB Services
with SoapUI

SoapUIis the universal Web Services testing tool

Can be used for unit, integration and load testing

GUI and integration with Maven / Ant

Free version available

But
should we really
call an external service
in unit testing ?

Mock Services ?
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Mock Services with
SoapUI

Mock Services are created
based on the WSDL of the
“real”service

Different
response
messages
can be
specified

ESB deployed
with different
Deployment
Plan (DEV)
 

 

  

 
 
 
 
       



























 

 
 


!
"
#

#




Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Deployment Plan with AmexcoMock Service
<serviceDeploymentPlan
qname="SoftwareLifecycleDemo.CreditCardServices.AmexcoCreditCardService"
status="ENABLED">
<parent type="serviceGroup"
qname="SoftwareLifecycleDemo.CreditCardServices"/>
<properties>
<serviceDefinition>
<property value="AmexcoCard.wsdl" name="wsdlURL"/>
<property value="http://devserver:8888/event/SoftwareLifecycleDemo/
CreditCardServices/AmexcoCreditCardService"
name="soapEndpointURI"/>
</serviceDefinition>
<endpoint>
<property value="
http://devserver:8088/mockAmexcoCardResourceBinding
"
name="Location"/>
</endpoint>
</properties>
</serviceDeploymentPlan>
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Integration Testing BPEL and ESB

SoapUIcan be used to do integration testing of BPEL and ESB
together (possibly with the Mock Service in place)
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Agenda
Data are always
part of the game.

Introduction

BPEL Lifecycle Management

ESB LifecylceManagement

Summary
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
Summary

Since SOA Suite 10.1.3.4 both BPEL and ESB services can be
build and deployed automatically via Ant

No more manual changes necessary to artifacts prior to
deployment

can be integrated into Continuous Integration (CI) tools

SoapUIcan be used to unit test and mock Web Services
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
SOA, ESB in use–a real architecture
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
AddingBPEL to themix
Application A
Tables
PL/SQL
PL/SQL
Storage
Data Access
Business Logic
ESB
Web Service
Facade
Business Process Execution Language (BPEL)
Application C
Tables
ORM
Java
Application B
Tables
PL/SQL
Java
Java
Java
Integration
Platform
Mediation
Adapter
Mediation
Mediation
Orchestration
Software Development Lifecycle und die Oracle SOA Suite 10g ©2008
TheTrivadis Integration Architecture Blueprint