Professional Documents
Culture Documents
Getting Started With Oracle SoA VIII
Getting Started With Oracle SoA VIII
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 Guide for Oracle SoA. The document focuses on various fault handling techniques in BPEL process. Join our professional training program and learn from experts.
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 1
Contents
Contents....................................................................................................................................... 2 Fault Handling in BPEL Process ................................................................................................... 3 BUSINESS FAULTS: ................................................................................................................... 3 RUNTIME FAULTS : .................................................................................................................... 3 Creating database connection in resource palette ..................................................................4 Create mds (meta data store ) connection in resource palette :..............................................6 Project on runtime faults:........................................................................................................ 10
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 2
BUSINESS FAULTS:
Business faults are application -specific faults that are generated within the BPEL process These are also called custom faults Manufactured by developer <catch faultName="ns1:faultName" faultVariable="varName">
RUNTIME FAULTS :
Runtime faults are the result of problems within the running of the BPEL process service component or web service .These faults are not user-defined, and are thrown by the system . Binding fault : When server is up & Service is down then this fault is known as binding fault. Remote fault : When third party service is down or invocation failed then this fault is known as remote fault .
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 3
NOTE : BEFORE GOING THROUGH FORWARD WE HAVE TO CREATE ORACLE MDS (META DATA STORE) & DATABASE IN RESOURCE PALETTE & UNDER IDE CONNECTIONS WHICH IS LOCATED IN LEFT PANE OR (CTRL +SHIFT+O) .
STEP 2: Click on
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 4
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 5
STEP 3: Edit Database Connection , Fill all required blanks fields as it is filled in picture shown below
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 6
STEP 2: Click on
STEP 3: Edit SOA-MDS Connection , Fill all required blanks fields as it is filled in picture shown below
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 7
Expand IDE connection under Resource Palette & observe that u have successfully created SOA-MDS . NOTE : Now as it is a meta data store & so it contains all deployed composites under dev_mds_conn as shown below .
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 8
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 9
Deployment Finished.
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 10
Note: Before Deployment Start Weblogic Admin Server as discussed in my previous document Oracle Soa Part IV Doc. Step 2 : Click on Browser icon shown below:
Note : Here localhost is application server & 7001 is a port in which enterprise manager is running. Step 4 : Login using credentials User Name :weblogic Password : welcome1 click on login
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 11
Step 5: We have successfully login inside Enterprise manager 11g (Farm_dev_soa) we can clearly observe here that admin server is up & all deployment status is also up it means that our admin server is running . Now In left pane of window under Farm_dev_soa click on SOA radio button now again expand & under default we can easily see all the deployed projects.
Now observe here that status of all composites are up here . Step 6: Click twice on ProcessStudent on left pane of window.
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 12
Step 7: Shut down the composite ProcessStudent & see the confirmation on screen as shown below:
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 13
Step 8: Observe red Arrow pointing down ward means that this composite is shutdown & also see confirmation below red arrow .
Step 10: Provide Count number & fill all empty required fields
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 14
Step 13: Observe Web service invocation failed warning it means remote fault because third party service is unable to provide service as process student composite is shut down
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 15
Step 14: double click on TopperStudentProject & see that the first instance is created but & its instance state is completed but faulted & that's why we rare unable to get response since system is faulted & hence there are error messages shown below & click on instance shown in green box.
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 16
Step 15: On clicking instance we come on Fault Trace Window observe here there are four Faults & all type of instances state are faulted .
Step 16: Click on Flow & see the flow diagram & notice that the invoke process is faulted here
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 17
Step 17: Click on Faults & see remote fault Error Message .
So till here we have seen that since ProcessStudent status is down we find error messages as remote fault & unable to get topper as response . So from here idea of Fault handling arises i.e how to handle such faults & notify these faults to admin so that he can agai start the process student composite or up the down server . Step 18: Create Error.xsd under ProcessStudent /xsd . design first Error Element then complex type error & elements of complex type of error is shown below
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 18
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 19
Step 21: Since Error xsd is created then open ProcessStudentPhysical location & click xsd folder
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 20
Step 22: Copy Error.xsd file from ProcessStudent & paste inside physical location of TopperStudentProject--->xsd folder
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 21
Step 23: Click on refresh & see that we have successfully imported the error .xsd inside TopperStudentProject .
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 22
Step 24: Open StudentList.xsd in design mode & right click on target namespace & click on import
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 23
Step 26: Write namespace & schema location of the imported error xsd as shown below:
Step 27: Register Error xsd namespace inside xsd schema with its prefix "errobj "
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 24
Step 28: Click on design mode & see that importing error xsd in StudentList.xsd is complete .
Step 29: Now design two elements inside StudentListResultType & rename first as FaultData .
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 25
Edit as shown below in red box , here we are referring Error xsd
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 26
Step 31: click on design mode & see referenced error element
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 27
Step 33:Now see complete StudentList xsd in design mode in which TopperStudentResponse contains FaultData
Step 34: Open TopperStudentProcess.bpel & click on catch activity to catch remote faults
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 28
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 29
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 30
Step 39 : Drag & drop Reply Activity & click twice on it as shown below:
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 31
Step 41: Drag & drop Assign Activity & Rename It as AssignFaultOutput & then Click it twice :
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 32
Step 42: To assign fault output click on expression Drag it Drop it on faultCode as shown below
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 33
Step 45: Select Date Functions & under it select current-date-Time then insert into Expression then click ok
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 34
Step 46: For Detail click Advanced functions ----> getFaultAs string then insert into Expression
Step 47: For CompositeName click Advanced functions ----> getCompositenName then insert into Expression
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 35
Step 48: For ComponentName click Advanced functions ----> getComponentName then insert into Expression
Step 49: For CompositeInstanceId click Advanced functions ----> getCompositeInstanceId then insert into Expression
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 36
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 37
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 38
Deployment Finished.
Note: Before Deployment Start Weblogic Admin Server as discussed in my previous document Oracle Soa Part IV Doc. Step 54 : Click on Browser icon shown below:
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 39
Step 55: Start your enterprise manager by writing url http: //localhost:7001/em/ Note : Here localhost is application server & 7001 is a port in which enterprise manager is running.
Step 56 : Login using credentials User Name :weblogic Password : welcome1 click on login
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 40
Step 57: We have successfully login inside Enterprise manager 11g (Farm_dev_soa) we can clearly observe here that admin server is up & all deployment status is also up it means that our admin server is running . Now In left pane of window under Farm_dev_soa click on SOA radio button now again expand & under default we can easily see all the deployed projects. Click twice on TopperStudentProject .
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 41
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 42
Step 60: Scroll down page & Provide required input of a students
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 43
Step 62: Explore topper student & find all blank spaces due to fault so explore FaultData
Step 63: Now we can see that catch activity catch the fault & replied to the client as Faultdata Response .
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 44
Step 64 : Now Logout enterprise manager & stop weblogic admin server .
www.bispsolutions.com
www.bisptrainigs.com
www.hyperionguru.com
Page 45