Anda di halaman 1dari 80

Getting Started with Oracle SoA Oracle SOA Working with Fault Policies Lab#10

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 Pro$ect on !a lt policies. %oin o r pro!essional training program and learn !rom e&perts.

Histor'( )ersion ,.,.-

*escription +hange Initial *ra!t 0eview1-

# thor Shiva .ant Pande' #mit Sharma

P blish *ate /-st # g /,-/ /2th # g /,-/

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page -

!ontents
+ontents....................................................................................................................................... / Pro$ect on !a lt policies................................................................................................................ 3 Stepwise proced re to st d' !a ltpolicies !ile (............................................................................4 Step wise proced re o! pro$ect on topper st dent pro$ect with !a lt handling 5!a lt policies6(...-.................................................................................................................................................. 7,

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page /

Pro"ect on #ault policies


O$er$iew The p rpose o! the 8a lt 9anagement 8ramewor: is to provide error handling that is e&ternal to S"# and does not impact the S"#;BPE< design or r ntime. The !ramewor: is implemented sing policies de!ined in =9<. These policies are re sable across composites;components and can catch both r ntime and b siness !a lts. "nce a !a lt is ca ght, the polic' de!ines actions that can be sed !or the S"# instance s ch as retr', h man intervention, repla' scope, rethrow !a lt, abort, and c stom %ava actions. >hen h man intervention comes into pla', the Enterprise 9anager provides a G?I !or managing the !a lted instance. >hen the policies have been de!ined and bo nd to composites and;or components, the !ramewor: will intercept the !a lt be!ore the standard !a lt handler comes into pla'. 8or e&ample( i! a BPE< process has de!ined standard BPE< !a lt handling and a !a lt polic' has been de!ined;bo nd to the BPE< process, when a !a lt occ rs the !ramewor: will intercept the !a lt allowing an' o! the s pported actions to be applied to the instance(

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page 3

Stepwise procedure to stud% #aultpolicies #ile


Step 1( *ownload @ install AotepadBB set p to edit !iles .

Step &( "pen !older containing !a lt-binding @ 8a lt-Polic' !iles

Step '( "pen 8a lt-Polic'.&ml with Te&t Editor

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page 4

Step ( "bserve !a ltPolicies is the root node @ it is register with namespace &mlnsCDhttp(;;schema.oracle.com;bpel;!a ltpolic'D

Step )( Aow !a lt Policies consists o! man' !a ltpolic' b t here we have ta:en DTest8a ltPolic'D as e&ample !or simpli!ication

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page E

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page F

Step *( Ever' !a lt polic' is a set o! +onditions 5>hen to act pon 6 #ctions 5>hat to do 6

These conditions consists o! vario s s'stem !a ltAames with their namespaces @ pre!i& as shown below(

Aow #ctions consists o! vario s t'pes o! action to be per!orm.E&ample o! some action idGs ora-h man-intervention ora-rethrow-!a lt ora-retr'

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page H

Step +( Aow ever' !a ltAame consists o! set o! condition associated with action .

Step , E&plore ne&t !a ltAame with name binding !a lt has set o! condition @ action , now this action is de!ined in #ctions e&ample ora-retr' is action !or condition o! binding !a lt @ hence ora-retr' is de!ined in #ctions.

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page 7

Step -( E&plore actions one b' one @ see how these actions are de!ined

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page 2

Similarl' write !or rethrow actions

Step 10( "bserve how ora-retr' action is de!ined inside I0etr'J I; 0etr' J

0etr' co nt is !ive H it can be varied retr' interval is the interval between two s ccessive retries in seconds e&ponentialbac:o!! is the time wait e&ample /K, , /K- , /K/ ..... @ so on .

retr' !ail re action that is i! this retr' completes all its co nts @ !a lt !or that action is still not recovered then !inall' it will call the !ail re action re!erred to ora-h manintervention to invo:e the admin.>e can also re!erenced here an action !or s ccess! l retr' action . www.bisptrainigs.com www.h'periong r .com Page -,

www.bispsol tions.com

So in this wa' we can develop !a lt policies .

Step wise procedure o# pro"ect on topper student pro"ect with #ault handling .#ault policies/
Step 1( +reate new pro$ect Aew ---J#ll Technologies---JS"# Tier ---JS"# pro$ect ---J". ---J Pro$ect Aame 5TopperSt dent"ne>a'Pro$ect6 ---J #*8 B siness +omponent---J S"#---JAe&t --J+omposite with BPE< Process6---J 8inish.

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page --

Step & ( 8ill all its blan: spaces Aame 5TopperSt dent"ne>a'Process6 ----JAameSpace 5<eave as it is6---JTemplate5Select "ne >a' BPE< process6----J Service Aame5TopperSt dent"ne>a' Service6----J mar: E&pose as a S"#P service ---J+lic: ":

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page -/

Step '( "pen +omposite.&ml @ observe BPE< Process

Step (( +lic: on TopperSt dent"newa'Process.&sd @ it is a tomaticall' generated &sd !or one wa' bpel process .

Step )( Go to Home ---J open $developer ---J m' wor: ----J S"##pplication ---J TopperSt dentpro$ect---J &sd----J cop' LError.&sd, St dent.&sd,St dent<ist.&sdM

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page -3

Step *( Paste all &sdGs inside ph'sical location o! TopperSt dent"ne>a' Pro$ect &sd .

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page -4

Step +( "bserve all three pasted &sd .

Step ,( +lic: on 0e!resh icon two three times @ observe all three copied is displa'ing inside TopperSt dent"ne>a' &sd.

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page -E

Step -( "pen TopperSt dent"ne>a'. &sd @ 0ight +lic: on target namespace @ clic: import

Step 10( +lic: on so rce mode @ Import St dent<ist.&sd @ also register it as shown below (

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page -F

Step 11( +lic: on design mode @ observe imported &sd .

Step 1&( +lic: on Process Element @ rename it as TopperSt dent"newa'0eN est as shown below(

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page -H

Step 1'( E&pand TopperSt dent"ne>a'0eN est @ rename Inp t Element as St dent<ist @ give slob$( St dent<istT'pe as its T'pe .

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page -7

Step 1( "pen TopperSt dent"ne>a'Process.wsdl @ observe error since we have renamed it in &sd b t it is still present in wsdl

Step 1)( 0ename Process as topperSt dent"ne>a'0eN est as shown below(

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page -2

Step 1*( "pen its bpel process

Step 1+ +reate variables , clic: (x)---> B

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page /,

Step 1,( +reate +o nt)ar , Inde&)ar, Top9ar:s all assigned as integer T'pe then clic: ".

Step 1-

*rag @ *rop #ssign #ctivit' @ rename it as #ssignTemp)ar @ clic: to edit it .

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page /-

Step &0( ( To assign +o nt)ar clic: on e&pression *rag @ *rop on +o nt)ar as shown below(

Step &1( E&plore 8 nctions ----J BPE< =Path E&tension 8 nctions ----J +o ntAodes---JInsert Into E&pression---Jselect St dent nder Inp t )ariable---J Insert into e&pression .*elete bpws(get)ariabledata which is shown b' green bo&

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page //

Step &&( Aow &path e&pression is set !or co nt)ar , +lic: ".

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page /3

Step &'( *rag @ drop E&ression into Inde&)ar

Step &( #ssign - !or Inde&)ar

Step &)( *rag @ drop E&ression into Top9ar:s

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page /4

Step &*( #ssign , !or Top9ar:s .

Step &+ +lic: "..

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page /E

Step &,( *rag @ drop >hile #ctivit' @ clic: on it to set while condition

Step &-( +lic: on E&pression

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page /F

Step '0 #ssign looping condition here +lic: Inde&)ar ---J insert into e&pression ---J <ess eN als --J insert into e&pression ---J +o nt)ar---J insert into e&pression---J +lic: ":

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page /H

0O12 Since we want to invo:e third part' web service 5ProcessSt dentService6 so we need to cop' concreate wsdl o! ProcessSt dentProcess.wsdl !rom Topperst dentPro$ect.

Step '1( +op' concreate ProcessSt dentProcess.wsdl !rom TopperSt dentPro$ect as shown below

Step '&( Paste it inside TopperSt dent"ne>a'Pro$ect

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page /7

Step '' +lic: re!resh b tton @

can see r copied wsdl inside TopperSt dent"newa'pro$ect

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page /2

Step '(( "pen bpel process @right clic: an'where on partner lin: portion ,select +reate Partner<in:

Step ')( 8ill all reN ired !ield as shown below @ clic: ".

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page 3,

Step '* +reated Partner <in: S ccess! ll'

Step '+(Here observe that the wiring between Topperst dent"ne>a'Process @ ProcessSt dent0e!erence

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page 3-

Step ',( *rag @ *rop Invo:e #ctivit' Inside >hile #ctivit' @ clic: on it to edit

Step '-( 8ill all reN ired Blan:s as shown below (

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page 3/

Step (0 *rag @ drop #ssign #ctivit' @ rename it as below (

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page 33

Step (1( #ssign Invo:e Inp t !rom inp t variables to ProcessSt dent0e!erenceOInp t)ariables as shown below (

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page 34

Step (&( #lso ma:e changes on TopperSt dent"ne>a'Process.bpel in so rce mode @ add LPInde&)arM a!ter St dent ever'where as shown below (

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page 3E

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page 3F

step ('( *rag @ drop Switch activit' !rom component palette@ clic: on +ondition

step ((( +lic: on 8 nction icon to set switch condition

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page 3H

Step () Browse nder BPE< )ariables ProcessSt dent0e!enceO" tp t)ariable ---J e&pand it @ select Total ---JInsert Into E&pression ----J Browse nder 8 nctions--J#dvanced8 nctions ---J <ogical 8 nctions---J greater eN als ----J Insert Into E&pression----J Browse nder BPE< )ariables Top9ar:s---J Insert Into E&pression----J+lic: o:

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page 37

Step (*( +lic: ". .

Step (+ *rag @ *rop #ssign #ctivit' @ rename it as #ssignTop9ar:s @ clic: to edit it . www.bispsol tions.com www.bisptrainigs.com www.h'periong r .com Page 32

Step (,( #ssign !rom ProcessSt dent0e!erenceO" tp t)ariable then clic: ".

Total

To Top9ar:s @

Step (-( +lic: on TopperSt dent"ne>a'Process.&sd in so rce mode @ register St dent namespace as shown below (

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page 4,

Step )0( In design mode create TopperSt dent Element as stdob$( St dent0es ltT'pe

Step )1( "pen bpel process @ clic: on , +reate )ariable TopperSt dent ----J mar: on Element radio @ browse b' clic:ing on browse icon

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page 4-

Step )& Select TopperSt dent nder Pro$ect Schema 8iles @ clic: ":

Step )'( +reated TopperSt dent variable

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page 4/

Step )(( +lic: again on assign Top9ar:s @ edit it

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page 43

Step ))( #ssign o tp t inside Topper St dent !rom ProcessSt dent0e!erenceO" tp t)ariable to TopperSt dent as shown below (

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page 44

Step )*( *rag @ drop Empt' #ctivit' @ rename it as *onothing

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page 4E

Step )+ *rag @ *rop #ssign #ctivit' @ rename it as #ssignIncrementInde& @ clic: to edit it .

Step ), *rag @ drop e&pression into Inde&)ar

Step )-( Increment it b' -

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page 4F

Step *0( *rag @ *rop Email #ctivit' @ rename it as EmailTopperSt dent @ clic: to edit it .

Step *1 +lic: !& icon !or DToD

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page 4H

Step *& Select Email nder TopperSt dent @ +lic: insert into E&pression

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page 47

Step *' Similarl' browse !or S b$ect @ select Aame nder TopperSt dent @ +lic: insert into E&pression

Step *( Similarl' browse !or Bod' @ select client(Topperst dent nder TopperSt dent @ +lic:

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page 42

insert into E&pression

Step *)( *iagnosis reN ired inp t data @ clic: o:

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page E,

Step **( +lic: on compile

Step *+ B ild s ccess! l .

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page E-

+ompilation s ccess! l with , errors @ , warnings .

Step *, +reate a new !ile !or !a ltpolic' , 0ight clic: on des:top ---J Empt' !ile

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page E/

A"TE( >e can also se notepad as te&t editor @ save !ile as .&ml to ma:e it &ml !ile .

Step *- "pen this !ile in Te&t Editor

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page E3

Step +0 >rite 8a lt policies as e&plained earlier

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page E4

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page EE

Step +1( +lic: on !ile @ Save #s

Step +&( Save as !a ltpolic'.&ml 5.&ml e&tension 6 ---J clic: save

Step +' Aow !a ltpolic'.&ml !ile is s ccess! ll' saved on des:top .

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page EF

Step +( Similarl' write 8a ltPolic'Bindings

Step +)( +lic: on !ile @ Save #s

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page EH

Step +*( Save as !a ltbindings.&ml 5.&ml e&tension 6 ---J clic: save

Step ++ Aow !a ltbindings.&ml !ile is s ccess! ll' saved on des:top .

Step +, +op' both the !iles

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page E7

Step +- Paste these !iles inside TopperSt dent"ne>a' Pro$ect

Step ,0( "bserve 'o r recentl' pasted !iles inside TopperSt dent"ne>a'Pro$ect

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page E2

Step ,1 0e!resh twice or thrice , loo: !a ltbinding.&ml @ 8a ltpolic'.&ml inside TopperSt dent"ne>a'Pro$ect .

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page F,

Step ,& See !a ltbinding.&ml in so rce mode inside $ developer

Step ,'( ( See !a ltPolic'.&ml in so rce mode inside $ developer

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page F-

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page F/

Step ,(

*eplo' pro$ect b' clic:ing TopperSt dent"ne>a'Pro$ect to devsoa

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page F3

Step ,) B ild s ccess! ll

*eplo'ed !inished

Step ,* ( +lic: on Browser icon shown below(

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page F4

Step ,+( Start 'o r enterprise manager b' writing rl http( ;;localhost(H,,-;em;

Aote ( Here localhost is application server @ H,,- is a port in which enterprise manager is r nning. Step ,, <ogin sing credentials ?ser Aame (weblogic Password ( welcomeclic: on login

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page FE

Step ,- >e have s ccess! ll' login inside Enterprise manager --g 58armOdevOsoa6 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 . Aow In le!t pane o! window nder 8armOdevOsoa clic: on S"# radio b tton now again e&pand @ nder de!a lt we can easil' see all the deplo'ed pro$ects. +lic: on ProcessSt dent

Step -0 Sh tdown ProcessSt dent b' clic:ing sh tdown tab .

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page FF

Step -1 +lic: 'es

Step -&("pen TopperSt dent"ne>a' composite @ +lic: on test b tton

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page FH

Step -' 8ill all the reN ired !ields @ clic: Test >ebService

Step -(( Since there is remote !a lt 5s'stem !a lt6 hence bpel process catches !a lts @ displa'ing here as shown below (

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page F7

Step -)( "pen 8low trace @ chec: that the !a lt is recoverable or not

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page F2

Step -*( +ome bac: to the instances @ +lic: show details on BPE< 9essage 0ecover' 0eN ired >arning @ cop' the E+I* code @ clic: o: .

Step -+( Go to the composite @ same warning is available there so clic: on D Go T" BPE< 0ecover' +onsole D also $ dge that the instance is in r nning state. It means !a lt policies are wor:ing and s'stem is retr'ing to recover !a lt .

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page H,

Step -,( +lic: on 0ecover' @ set d ration #ll times ,+omponentAame BPE< , E+I* then clic: below +onversation I* to select component then clic: on 0ecover

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page H-

Step --

It will as: to contin e clic: QES

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page H/

Step 100 !ive

+ome to the Instances window @ observe that total n mber o! service retries are

Step 101 +lic: on *eplo'ed +omposites @ see how man' composites @ services are p So since here Process St dent Process composite is down so !or this reason it showing remote !a lt . +lic: on ProcessSt dentProcess

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page H3

Step 10& +lic: on Start ?p .

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page H4

Step 10'( +lic: QES

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page HE

Step 10(( +lic: again on TopperSt dent"ne>a'Pro$ect @ +lic: on Test

Step 10)( ( 8ill all the reN ired !ields @ clic: Test >ebService

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page HF

Step 10* Since ProcessSt dentProcess +omposite is p @ hence remote !a lt is recovered a!ter !ive retries now all the instance are in completed state with no !a lts .

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page HH

Step 10+ "pen 8low Trace H now there are no !a lt !o nd .

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page H7

Step 10,( See the noti!ication send thro gh email activit' a!ter !ive retries @ then retries !ail re invo:es admin thro gh !a lt policies

Step 10-

Sh t *own the Topper St dent "ne >a' Pro$ect +omposite

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page H2

Step 110( Sh t *own +on!irmation

www.bispsol tions.com

www.bisptrainigs.com

www.h'periong r .com

Page 7,

Anda mungkin juga menyukai