oracle developer day - dbguide.net · 2005-11-04 · bpel의중요성 bpm/soa을하면서web...
TRANSCRIPT
2
Session #2
SOA기반의 Composite Applications 구현
한정훈
Senior ConsultantOracle Fusion Middleware
3
Agenda
ü 서비스지향아키텍쳐
ü Orchestrationü What is BPEL ?ü BPEL Programming Languageü Steps to Build a Business Processü Oracle BPEL Process Manager
4
서비스지향아키텍쳐(SOA)란?
우리가하드웨어시스템에서배웠던것 ?
Ø Standard
Ø Reuse
Ø Agility
Ø Flexibility
5
서비스지향아키텍쳐
ü SOA is an architectural style whose goal is to achieve loose coupling among interacting software agents
ü Collection of Services that communicate with each other
– Simple data passing– Activity coordination
ü Not new!– TPMs– CORBA– DCOM
SOASOASOAInteroperable
LooselyCoupled
Re-Usable
Composable
6
CRM Shipping and Distribution
Order Management
Manufacturing
Integration code – Proprietary Solution
SOA 이전의비즈니스프로세스
7
CRM Shipping and Distribution
Order Management
Manufacturing
Service
SOA의비즈니스프로세스
8
SOA의비즈니스프로세스
ERP - Billing
Activation
Payment
WSDL/WSIF
XML/XML Schema
SOAP JCA JMS
SHARED SERVICES
Create new cell phoneplan
XSLT/XQuery
BPEL
ORCHESTRATE
Reduce friction, enhance visibility, thrive on change
PORTAL JSR-168
INTERACT/ACCESS
Struts/JSF
Portal
Web Application
API
WS
WS-Security
GATEWAY
SecurityReliabilityLogging
SLADynamic Routing
WS-Management
9
Collaborative ApplicationsCollaborative Applications
Business Service OrientationBusiness Service Orientation
Channel & Portal Services(Internal, External)
Channel & Portal Services(Internal, External)
Supp
ly S
ide
Colla
bora
tion
Supp
ly S
ide
Col
labo
ratio
n
Utility Services(Infrastructure, Security, Instrumentation, Management)
Utility Services(Infrastructure, Security, Instrumentation, Management)
Core DataCore Applications
Business Process OrchestrationBusiness Process Orchestration
Dem
and Side CollaborationD
emand Side Collaboration
Core Applications
Core Applications
Core DataCore DataEnterpriseIntegration
Etc….
Procure-to-payOrder-to-CashCommon Application
Services Collaborative Design
캡제미니의서비스아키텍쳐프레임워크
AA BB CC BB CC11
Functions A, B & C are oriented for access as Business Services
11
22
Functions exposed as Web Services, using Business Connectors
22
33Functions now exposed as Web Services are integrated to form a Business Service
33
55
Business Process integrated with Collaborative Apps
55
44
Business Service orchestrated as Business Process
44
10
웹서비스를통합하여비즈니스프로세스로
Web Service 1
Web Service 2
Web Service 3
Web Service 4
Web Service 5
Web Service n
Orchestration Requirements
11
서비스의오케스트레이션
BPELBPEL
Credit RatingCredit Rating
WSDLWSDL
Service BusService Bus
Star LoanStar Loan
Order EntryOrder Entry United LoanUnited Loan
AADDAAPPTTEERR
AADDAAPPTTEERR
WWSSDDLL
FulfillmentFulfillment
AADDAAPPTTEERR
Application ServerApplication Server
12
Composite Applications
SubmitRFQ Get BOM Check
AvailabilityCalculateDiscount
ValidatePermit Approve Create
RFQDeliverRFQ
Portal ERP Java MQ Series Web App Mainframe Email/EDIDatabase
Reusable Services
Quote2Cash A
Quote2Cash B
13
SubmitRFQ Get BOM Check
AvailabilityCalculateDiscount
ValidatePermit Approve Create
RFQDeliverRFQ
Reusable Services
BPM과통합
ü 프로세스통합은애플리케이션통합을필요로함.
All computing is part of a business process!
견적요청프로세스
Business Process:수작업과자동화된서비스를포함하는여러단계의비즈니스트랜잭션(multi-step business transactions involving automated services and/or humans)
Portal ERP Java MQ Series Web App Mainframe Email/EDIDatabase
15
BPEL이란?개별서비스들을종단간프로세스로조립하기위한 마크업언어(Markup language for composing a set of discrete services into an end-to-end process flow)
• 10+ years of R&D from MSFT and IBM
• SOAP but also Java, JCA
• Rich Flow Semantics
• Optimized Bindings
• XPATH+XSLT+XQuery
• WS-Security
• A Process is a Service
Determine if Can Fulfill
10:00am
Handle Negative Credit Exception
Discount Service
start
end
BPEL Flow
?
Credit Service InventoryService
Get Discount
Send Credit Application
Receive Credit Result
03:00pm
Send Inventory Request
Receive Inventory Result
<process>
</process>
<switch>
<variable>
<partnerLink>
<partnerLink> <partnerLink>
<faultHandlers>
<receive>
<invoke>
<invoke><flow>
</flow>
16
BPEL의역사
2000/05
XLang(Microsoft)
2001/03
BPML(Intallio et al)
2001/05
WSFL(IBM)
2001/06
BPSS(ebXML)
2002/03
BPEL4WS 1.0(IBM, Microsoft)
BPEL4WS 1.1(OASIS)
2002/06 2003/04
WSCI(Sun et al)
WSCL(HP)
2002/08
전용솔루션(Proprietary) 표준(Standard)
2005/2006
WS-BPEL 2.0(OASIS)
17
BPEL의중요성
ü BPM/SOA을 하면서 Web service orchestration을 proprietary solution을사용할 것인가?
– 현재 BPEL만이 Oracle, IBM, BEA, Microsoft 가지원하고표준화기구(OASIS)에서추진하는유일한표준
• Gartner believes that BPEL will emerge as the leading industry standard for Web service orchestration and coordination of business processes.
Gartner는 BPEL이Web service orchestration 과비즈니스프로세스의coordination을위한업계선도표준이될것이라고믿는다.
- David Smith, Research Vice President and fellow, Gartner
• BPEL is the future of the integration space.
BPEL은인티그레이션분야의미래다.- John Rymer, Vice President, Forrester Research, Inc
18
BPEL –프로그래밍언어
ü Variablesü Activitiesü Control Flowü Scopeü Fault Handlingü Event Handling
19
BPEL - Variables
ü 메시지의저장, 재설정및변환에사용ü 메시지의전송및수신에필요
ü 각변수는유형을가진다.Example:<variables>
<variable name="loanApplication"messageType="ns2:LoanServiceRequestMessage"/>
</variables>
20
BPEL - Activities
ü 기본 Activities– <invoke>– <receive>– <assign>– <reply>– <throw>– <terminate>– <wait>
ü 구성 Activities– <sequence>– <switch>– <pick>– <flow>– <link>– <while>– <scope>
21
BPEL - Activities
ü <invoke>– 서비스를동기및비동기적으로호출
Ex: Invoke Credit Serviceü <receive>
– 메시지의수신,Ex: 프로세스의시작, 비동기웹서비스에서의콜백메시지의수신
ü <reply>– 동기프로세스에서응답의반환, 초기<receive>와연관
ü <assign>– variables, expressions 및 endpoint references 사이에자료를복사– XPath표현식및 XSLT 엔진을사용
Ex: Loan Application의 input payload에서 United Loan input으로자료복사
22
BPEL – Scope
ü 비즈니스프로세스를단계적으로분할하는기능ü <scope>은 activity들의실행영역
Ex: PL/SQL Block, Java의 try-catchü BPEL 프로세스는그자체가하나의 <scope>이다ü <scope> 내부에서는로컬변수의선언및그자체에서발생하는예외를처리한다.Ex: GetCreditRating Scope –Credit Service의호출및예외처리
23
BPEL – Control Flow
ü BPEL 로직의분기및반복제어기능ü <sequence>는 activities의순차적처리를실행한다.ü <switch>는표현식에의거하여기술된적어도하나의하위
<case>요소, 또는 <otherwise>요소를실행한다.Ex: United loan과 Star loan이제공한금리중에서더낮은것을선택
ü <while>는표현식이 ‘true‘인동안내부 activity들을반복하여실행한다.
ü <flow>는기술된하위노드들을동시에병렬처리한다. Ex: United Loan service와 Star Loan service를동시에호출
24
Partner Links
ü 프로세스에서상호연동하는모든서비스들
ü 일반적으로웹서비스를사용Ex: CreditService, UnitedLoanService, StarLoanService
ü 구현된다른 BPEL프로세스를사용할수도있음ü 파트너링크유형
– 각서비스가상호수행하는역할및기능을선언
25
BPEL - Fault Handling
ü <faultHandlers>를사용하여각 <scope>의예외처리를수행하여해당 <scope>의완전한실행을수행
ü <catch>를이용하여특정예외를처리Ex: 신용불량예외처리및 process 강제종료
ü 기타모든예외를일괄처리시에는 <catchAll>을사용
26
비즈니스프로세스의구축과정
1. 1. Public InterfacePublic Interface의의 정의정의
2. 2. 파트너파트너 일람표의일람표의생성생성
3. 3. 메시지메시지 및및유형의유형의생성생성
4. 4. 변환변환 로직의로직의 구현구현
5. 5. 오케스트레이션오케스트레이션로직의로직의구현구현
6. 6. 반복반복
7. 7. 시험시험 환경환경구축구축
8. 8. 파일럿파일럿 운용운용
9. 9. 잘잘 조정된조정된운영작업운영작업
27
단계 1: Public InterfacePublic Interface의의 정의정의
• 구축되어질 BPEL 프로세스의WSDL 기술
LoanFlow.wsdl
WSDL
LoanFlow
initiate
onResult
Client Callback
LoanRowBPEL Process
28
단계 2: 파트너파트너일람표의일람표의 생성생성
• BPEL 프로세스의파트너링크로호출될서비스의목록• 각파트너링크에대하여, 호출되어질역할을기록 (choreography)• 호출자와피호출자의관계를규명
bpel.xml
Dep
loym
ent D
escr
ipto
rEn
d po
int r
efer
ence
bi
ndin
g
LoanFlow.wsdl
WSDL
LoanFlow
initiate
onResult
Client Callback
LoanRowBPEL Process Credit RatingCredit Rating
WWSSDDLL
Web ServiceWeb Service
Start LoanStart LoanWWSSDDLL
Web ServiceWeb Service
United LoanUnited LoanWWSSDDLL
Web ServiceWeb Service
29
단계 3: 메시지메시지및및유형의유형의 생성생성
• BPEL 프로세스에서사용되어질 XML 문서와메시지의유형을기술한XML 스키마
bpel.xml
Dep
loym
ent D
escr
ipto
rEn
d po
int r
efer
ence
bi
ndin
g
LoanFlow.wsdl
WSDL
LoanFlow
initiate
onResult
Client Callback
Credit RatingCredit RatingWWSSDDLL
Web ServiceWeb Service
Start LoanStart LoanWWSSDDLL
Web ServiceWeb Service
United LoanUnited LoanWWSSDDLL
Web ServiceWeb Service
LoanRowBPEL Process
Schedule Response
variablesvariablesSchedule Request
Exchange Requestmore…
30
단계 4: 변환변환 로직의로직의 구현구현
• BPEL 프로세스에서사용되어질다양한유형에대한상호연결정보를기술한 XSLT와 XQuery 파일
bpel.xml
Dep
loym
ent D
escr
ipto
rEn
d po
int r
efer
ence
bi
ndin
g
LoanFlow.wsdl
WSDL
LoanFlow
initiate
onResult
Client Callback
Credit RatingCredit RatingWWSSDDLL
Web ServiceWeb Service
Start LoanStart LoanWWSSDDLL
Web ServiceWeb Service
United LoanUnited LoanWWSSDDLL
Web ServiceWeb Service
LoanRowBPEL Process
Schedule MapSchedule MapXSLTXSLT
WWSSDDLL
transformationtransformation
variablesvariablesloanApplicationcrInputcrOutputmore…
31
단계 5: 오케스트레이션오케스트레이션 로직의로직의구현구현
• 종단간비즈니스프로세스안에서파트너링크를통하여상호작동하도록 연결
• 예외처리와대기시간종료가적정하게작동하도록구현
Select Lowest Offer
Negative CreditfaultHandler
Synchronous <invoke>
<receive>
<invoke>
<process>
?
<receive>.
<invoke> <invoke>
Get Rating
Send LoanApplication
Receive Loan Offer <receive>.Receive
Loan Offer
Send LoanApplication Star LoanStar Loan
Credit RatingCredit Rating
United LoanUnited Loan
32
단계 6: 반복
• 새로운파트너의추가• 예외관리의계속적인개선• 자동호출및복귀시험
LoanFlow.wsdl
WSDL
LoanFlow
initiate
onResult
Client Callback
orchestration
bpel.xml
Dep
loym
ent D
escr
ipto
rEn
d po
int r
efer
ence
bi
ndin
g
Credit RatingCredit RatingWWSSDDLL
Web ServiceWeb Service
Start LoanStart LoanWWSSDDLL
Web ServiceWeb Service
United LoanUnited LoanWWSSDDLL
Web ServiceWeb Service
LoanRowBPEL Process
variablesvariablesloanApplicationcrInputcrOutputmore…
Schedule MapSchedule MapXSLTXSLT
WWSSDDLL
transformationtransformation
33
단계 7: 시험시험환경환경 구축구축
• 각 End-point에대한시험서비스구축(다른BPEL프로세스또는웹서비스에서호출)
• 호출및피호출관계에대한시험시나리오생성• 고장시험, 장시간운용시험, 성능시험, 스트레스시험
Dummy Test Services
LoanFlow.wsdl
WSDL
LoanFlow
initiate
onResult
Client Callback
orchestration
bpel.xml
Dep
loym
ent D
escr
ipto
rEn
d po
int r
efer
ence
bi
ndin
g
Credit RatingCredit RatingWWSSDDLL
Web ServiceWeb Service
Start LoanStart LoanWWSSDDLL
Web ServiceWeb Service
United LoanUnited LoanWWSSDDLL
Web ServiceWeb Service
LoanRowBPEL Process
variablesvariablesloanApplicationcrInputcrOutputmore…
Schedule MapSchedule MapXSLTXSLT
WWSSDDLL
transformationtransformation
34
단계 8: 파일럿파일럿운용운용
• BPEL 프로세스를실제 End-point로연결• 복귀시험의운용
Integration over internet/intranet
LoanFlow.wsdl
WSDL
LoanFlow
initiate
onResult
Client Callback
orchestration
bpel.xml
Dep
loym
ent D
escr
ipto
rEn
d po
int r
efer
ence
bi
ndin
g
Credit RatingCredit RatingWWSSDDLL
Web ServiceWeb Service
Start LoanStart LoanWWSSDDLL
Web ServiceWeb Service
United LoanUnited LoanWWSSDDLL
Web ServiceWeb Service
LoanRowBPEL Process
variablesvariablesloanApplicationcrInputcrOutputmore…
Schedule MapSchedule MapXSLTXSLT
WWSSDDLL
transformationtransformation
35
단계 9: 잘잘 조정된조정된 운영작업운영작업
• 예외관리(Exception Management)• Web Service 관리프레임워크와의통합• 보안(Security)• 보관(Archiving)
36
Oracle BPEL Process Manager
Enterprise-strength infrastructure for designing, deploying and managing BPEL business processes
• Comprehensive and nativeBPEL implementation
• Easy-to-use modeling tool
• Scalable and reliable engine
• Flexible binding framework
• Rich management and monitoring
• Get up and running in less than 15 minutes!
BAMBAM
Application Server Application Server ( Oracle, BEA, JBoss, IBM)( Oracle, BEA, JBoss, IBM)
TransformationTransformation CorrelationCorrelation
WSIF BindingWSIF Binding QueuingQueuing
SAPSAP EBSEBS DBDB FileFile ……
XSLTXSLTMapperMapper
AdapterAdapterFactoryFactory
BPELBPELConsoleConsole
BPELBPELDesignerDesigner WorkflowWorkflow RuleRule
BPEL EngineBPEL Engine
Dehydration Store
(Oracle Database)
Oracle BPEL Process ManagerOracle BPEL Process Manager
37
각종플랫폼을뛰어넘어…
Application Serverü Oracle Application Serverü WebLogic Serverü WebSphereü JBoss
Databaseü Oracle Databaseü SQL Serverü Oracle Liteü Sybaseü Pointbase
IDEü JDeveloperü Eclipse
Operating Systemsü Linuxü Window XP/2003ü Solarisü HP UXü zOS
38
Oracle Fusion MiddlewareA Complete SOA Platform
Event ServicesWeb Services Rules Engine
SOA Run time
Enterprise Grid
Portals Wireless OCS
J2EE
BPEL Process ManagerBusiness Processes
Information Access and InsightOWB Discoverer BAM
B2B Orchestration Pre-built Business Flows
Enterprise Service Bus
Data Hubs and IntegrationOracle Data Hubs 200+ Adapters
Jdeveloper
Development EnvironmentApplication Development Framework
OID Security and Identity M
anagement
Dir. Integration
User P
rov.S
SO
Federated IDs
Topo
logy
Svc
s.
Sys
tem
s an
d A
pplic
atio
ns M
anag
emen
tJM
X C
onso
leA
SLM
Life
cycl
e M
gmt.
39
PORTAL
Loan Flow Demo
LOAN FLOW BPEL PROCESS
receive
getSSN
invokeinvoke
select
PORTAL
Web
Ser
vice
s In
terf
ace:
XM
L, S
OAP
, W
SDL,
WSI
F
Credit Rating.NET
Oracle eBusinessSuite
Async.Loan Providers
receivereceive
review
United Load Star Loan
end
5-15 min
getRating
Exception Task
Notification Service