Sie sind auf Seite 1von 49

Getting Started with Oracle SoA Oracle SOA Fault Handling in BPEL Process Lab#8

Description BISP is committed to provide BEST learning material to the beginners and advance learners. In the same series, we have prepared a complete end-to end Hands-on Beginners G ide !or "racle So#. The doc ment !oc ses on $a lt Handling in a BPE% process. &oin o r pro!essional training program and learn !rom e'perts.

Histor() *ersion -.. -..

+escription ,hange Initial +ra!t 2eview3.

# thor Shiva /ant Pande( #mit Sharma

P blish +ate 0.st 1ov 0-.0 04th 1ov 0-.0

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page .

!ontents
.................................................................................................................................................... 0 ,ontents....................................................................................................................................... 0 56 7hat is !a lt handling in BPE% process 8..............................................................................9 B siness !a lts) ........................................................................................................................ 9 2 ntime !a lts) ......................................................................................................................... 9 Selection !ail re) 7rong :-Path e'pression res lts selection !ail re !a lt ...............................; ,reate database connection in reso rce palette ) ...................................................................< ,reate mds =meta data store 6 connection in reso rce palette )..............................................> Pro?ect on r ntime !a lts).......................................................................................................... 4 Topper st dent pro?ect with !a lt handling =remote !a lt6).......................................................-

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page 0

$a lt Handling in a BPE% process Q) What is fault handling in BPEL process ? #6 $a lt handling allows a BPE% process to handle error messages or e'ceptions ret ned b( o tside web services @ to generate error messages in response to b siness or r ntime !a lts.

Business faults:
B siness !a lts are application -speci!ic !a lts that are generated within the BPE% process These are also called c stom !a lts Aan !act red b( developer Bcatch !a lt1ameCDns.)!a lt1ameD !a lt*ariableCDvar1ameDE

Runtime faults:
2 ntime !a lts are the res lt o! problems within the r nning o! the BPE% process service component or web service .These !a lts are not ser-de!ined, and are thrown b( the s(stem . Binding !a lt) 7hen server is p @ Service is down then this !a lt is Fnown as binding !a lt. 2emote !a lt) 7hen third part( service is down or invocation !ailed then this !a lt is Fnown as remote !a lt .

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page 9

Selection failure: Wrong X-Path e pression results selection failure fault !


1"TE ) Be!ore going thro gh !orward we have to create oracle mds =meta data store6 @ database in reso rce palette @ nder I+E connections which is located in le!t pane or =ctrl Gshi!tGo6 .

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page ;

"reate data#ase connection in resource palette :


S"EP # Hse ctrlGshi!tGo to view 2eso rce Palette on le!t pane as shown below )

S"EP $) ,licF on

new icon ---E 1ew ,onnection ----E +atabase

S"EP %) Edit +atabase ,onnection , $ill all reI ired blanFs !ields as it is !illed in pict re shown below P t radio b tton on I+E ,onnections ,onnection 1ame) devJmds www.bispsol tions.com www.bisptrainigs.com www.h(periong r .com Page <

,onnection t(pe ) "racle=&+B,6 Hsername ) devJmds =as on choice6 Password ) welcome. =as on choice6 clicF on save password +river ) thin Host 1ame) localhost &+B, Port ) .<0. SI+ ) :E

S"EP &) ,licF ---E Test ,onnection @ then clicF "/.

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page K

1ow s ccess! ll( +atabase connection is created in reso rce palette.

"reate mds $meta data store ) connection in resource palette :


S"EP #) Hse ctrlGshi!tGo to view 2eso rce Palette on le!t pane

S"EP $) ,licF on

new icon ---E 1ew ,onnection ----E S"#-A+S

S"EP %) Edit S"#-A+S ,onnection , $ill all reI ired blanFs !ields as it is !illed in pict re shown below

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page >

,onnection 1ame ) dev mds conn ,onnect String ) ?dbc)oracle)thin)Llocalhost).<0.):E Hsername ) +E*JA+S Hsername ) +E*JA+S Select A+S partition ) soa-in!ra

S"EP &) ,licF ---E Test ,onnection @ then clicF "/.

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page M

S"EP ' 1ow right clicF

icon @ select re!resh . have s ccess! ll( created

E'pand I+E connection nder 2eso rce Palette @ observe that S"#-A+S .

1"TE ) 1ow as it is a meta data store @ so it contains all deplo(ed composites nder devJmdsJconn as shown below .

Pro%ect on runtime faults:


Su((ar) )* 2 ntime !a lts are the res lt o! problems within the r nning o! the BPE% process service component or web service @ when third part( service is down or invocation !ailed then !a lt is Fnown as remote !a lt . So in TopperSt dentPro?ect TopperSt dentService calling third part( web service ProcessSt dentService so that this service done all processing @ ret rn response to calling service so !or this on sh tting down the ProcessSt dent composite inside enterprise manager then it will be nable to repl( response @ hence calling service i.e TopperSt dentService will error o t 2emote !a lt , so o r aim is to handle or catch this remote !a lt or r n time !a lt thro gh catch activit( @ repl( this !a lt to the client or cons mer o! TopperSt dentService also invoFe a new third part( service i.e St dent$%HService !or sending this !a lt b( email noti!ication to the admin*.

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page 4

&opper student pro%ect 'ith fault handling $remote fault):


Step# +eplo( pro?ect b( clicFing TopperSt dentPro?ect.

+eplo(ment $inished.

1ote) Be!ore +eplo(ment Start 7eblogic #dmin Server as disc ssed in m( previo s doc ment "racle Soa Part I* +oc. Step $ ) ,licF on Browser icon shown below)

Step %) Start (o r enterprise manager b( writing rl http) NNlocalhost)>--.NemN www.bispsol tions.com www.bisptrainigs.com www.h(periong r .com Page .-

1ote ) Here localhost is application server @ >--. is a port in which enterprise manager is r nning. Step & %ogin sing credentials Hser 1ame )weblogic Password ) welcome. clicF on login

Step ' 7e have s ccess! ll( login inside Enterprise manager ..g =$armJdevJsoa6 we can clearl( observe here that admin server is p @ all deplo(ment stat s is also p it means that o r admin server is r nning . 1ow In le!t pane o! window nder $armJdevJsoa clicF on S"# radio b tton now again e'pand @ nder de!a lt we can easil( see all the deplo(ed pro?ects.

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page ..

1ow observe here that stat s o! all composites are p here . Step + ,licF twice on ProcessSt dent on le!t pane o! window.

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page .0

Step , Sh t down the composite ProcessSt dent @ see the con!irmation on screen as shown below)

Step 8) "bserve red #rrow pointing down ward means that this composite is sh tdown @ also see con!irmation below red arrow .

Step - ,licF on Test tab shown below

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page .9

Step #.) Provide ,o nt n mber @ !ill all empt( reI ired !ields

Step ## "bserve care! ll( that no !ield le!t empt(

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page .;

Step #$ ,licF on Test 7eb Service

#nd get 2esponse shown below) Step #% "bserve 7eb service invocation !ailed warning it means remote !a lt beca se third part( service is nable to provide service as process st dent composite is sh t down

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page .<

Step #&) do ble clicF on TopperSt dentPro?ect @ see that the !irst instance is created b t @ its instance state is completed b t !a lted @ thatOs wh( we are nable to get response since s(stem is !a lted @ hence there are error messages shown below @ clicF on instance shown in green bo'.

Step #') "n clicFing instance we come on $a lt Trace 7indow observe here there are !o r $a lts @ all t(pe o! instances state are !a lted .

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page .K

Step #+) ,licF on $low @ see the !low diagram @ notice that the invoFe process is !a lted here

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page .>

Step #,) ,licF on $a lts @ see remote !a lt Error Aessage .

So till here we have seen that since ProcessSt dent stat s is down we !ind error messages as remote !a lt @ nable to get topper as response . So !rom here idea o! $a lt handling arises i.e how to handle s ch !a lts @ noti!( these !a lts to admin so that he can agai start the process st dent composite or p the down server .

Step #8) ,reate Error.'sd nder ProcessSt dent N'sd . design !irst Error Elementthen comple' t(pe error @ elements o! comple' t(pe o! error is shown below www.bispsol tions.com www.bisptrainigs.com www.h(periong r .com Page .M

Step

#-) AaFe Error element as Errort(pe.

Step $.) "bserve Error.'sd in design mode www.bispsol tions.com www.bisptrainigs.com www.h(periong r .com Page .4

Step $# Since Error 'sd is created then open ProcessSt dentPh(sical location @ clicF 'sd !older

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page 0-

Step $$ ,op( Error.'sd !ile !rom ProcessSt dent @ paste inside ph(sical location o! TopperSt dentPro?ect---E'sd !older

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page 0.

Step $%) ,licF on re!resh @ see that we have s ccess! ll( imported the error .'sd inside TopperSt dentPro?ect .

Step $& "pen St dent%ist.'sd in design mode @ right clicF on target namespace @ clicF on import www.bispsol tions.com www.bisptrainigs.com www.h(periong r .com Page 00

Step $') 1ow ,licF on so rce mode

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page 09

Step $+ 7rite namespace @ schema location o! the imported error 'sd as shown below)

Step $, 2egister Error 'sd namespace inside 'sd schema with its pre!i' Derrob? D

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page 0;

Step $8

,licF on design mode @ see that importing error 'sd in St dent%ist.'sd is complete .

Step $-) 1ow design two elements inside St dent%ist2es ltT(pe @ rename !irst as $a lt+ata .

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page 0<

Step %.),licF on so rce mode @ edit element.

Edit as shown below in red bo' , here we are re!erring Error 'sd B'sd)element re!CDerrob?)ErrorDNE

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page 0K

Step %# ,licF on design mode @ see re!erenced error element

Step %$) E'pand Error @ observe all s b elements

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page 0>

Step %%)1ow see complete St dent%ist 'sd in design mode in which TopperSt dent2esponse contains $a lt+ata

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page 0M

Step %&) "pen TopperSt dentProcess.bpel @ clicF on catch activit( to catch remote !a lts

Step %') 2ight ,licF on ,atch #ctivit( @ clicF Edit

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page 04

Step %+) ,licF on Browse to select S(stem !a lts

Step %,) Select remote $a lt @ clicF "F

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page 9-

Step %8 ,licF "F

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page 9.

Step %- ) +rag @ drop 2epl( #ctivit( @ clicF twice on it as shown below)

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page 90

Step &. Edit 2epl( as shown below ) 1ame) 2epl($a lt" tp t Interaction T(pe ) Partner %inF Partner %inF ) TopperSt dentService =Browse6 "peration) process *ariable )" tp t*ariable =create b( clicFing on G sign6 ,licF "F

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page 99

Step &#) +rag @ drop #ssign #ctivit( @ 2ename It as #ssign$a lt" tp t @ then ,licF it twice )

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page 9;

Step &$) To assign !a lt o tp t clicF on e'pression +rag it +rop it on !a lt,ode as shown below

Step &% 7rite E'pression i.e !a lt code as /F012...#/

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page 9<

Step && Similarl( severit( as #

Step &') Select +ate $ nctions @ nder it select current2date2"i(e then insert into E'pression then clicF oF

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page 9K

Step &+) $or +etail clicF #dvanced ! nctions ----E get$a lt#s string then insert into E'pression

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page 9>

Step &,) $or ,omposite1ame clicF #dvanced ! nctions ----E get!o(posite3a(e then insert into E'pression

Step &8) $or ,omponent1ame clicF #dvanced ! nctions ----E get,omponent1ame then insert into E'pression

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page 9M

Step &- $or ,ompositeInstanceId clicF #dvanced ! nctions ----E get,ompositeInstanceId then insert into E'pression

Step '. "bserve all assigned val es

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page 94

Step '# ) #ssign TopperSt dent2eI est to 2eI estPa(load since both are o! anon(mo s t(pe.

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page ;-

Step '$ ) ,licF on compile icon to compile the bpel process

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page ;.

Step '% +eplo( pro?ect b( clicFing TopperSt dentPro?ect.

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page ;0

+eplo(ment $inished.

1ote) Be!ore +eplo(ment Start 7eblogic #dmin Server as disc ssed in m( previo s doc ment "racle Soa Part I* +oc. Step '& ) ,licF on Browser icon shown below)

Step '') Start (o r enterprise manager b( writing rl http) NNlocalhost)>--.NemN 1ote ) Here localhost is application server @ >--. is a port in which enterprise manager is r nning.

Step '+ %ogin sing credentials Hser 1ame )weblogic Password ) welcome. www.bispsol tions.com www.bisptrainigs.com www.h(periong r .com Page ;9

clicF on login

Step ', 7e have s ccess! ll( login inside Enterprise manager ..g =$armJdevJsoa6 we can clearl( observe here that admin server is p @ all deplo(ment stat s is also p it means that o r admin server is r nning . 1ow In le!t pane o! window nder $armJdevJsoa clicF on S"# radio b tton now again e'pand @ nder de!a lt we can easil( see all the deplo(ed pro?ects. ,licF twice on TopperSt dentPro?ect .

Step '8 ,licF on TEST @ create instance

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page ;;

Step '-) Inp t St dent arra( siPe C0

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page ;<

Step +. Scroll down page @ Provide reI ired inp t o! a st dents

Step +# ,licF on Test 7eb Service

#nd get 2esponse shown below)

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page ;K

Step +$) E'plore topper st dent @ !ind all blanF spaces d e to !a lt so e'plore $a lt+ata

Step +%) 1ow we can see that catch activit( catch the !a lt @ replied to the client as $a ltdata 2esponse .

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page ;>

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page ;M

Step +& ) 1ow %ogo t enterprise manager @ stop weblogic admin server .

www.bispsol tions.com

www.bisptrainigs.com

www.h(periong r .com

Page ;4

Das könnte Ihnen auch gefallen