Getting started-with-oracle-so a-vi

826 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
826
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
83
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Getting started-with-oracle-so a-vi

  1. 1. Getting Started with Oracle SoA Lab#6 CREATING PROJECT PROCESS STUDENT 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 Beginner’s Guide for Oracle SoA. The document detailed step by step way to create complete Oracle SOA Student Project. Join our professional training program and learn from experts. History: Version Description Change Author Publish Date 0.1 Initial Draft Shiva Kant Pandey 21st Aug 2012 0.1 Review#1 Amit Sharma 29th Aug 2012 www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 1
  2. 2. Contents Contents....................................................................................................................................... 2 SCA Architecture ......................................................................................................................4 BUSINESS PROCESS EXECUTION LANGUAGE (BPEL)..................................................................6 The Role of BPEL....................................................................................................................8 Why Do I Need BPEL...............................................................................................................8 STEP WISE PROCEDURE “PROCESS STUDENT PROJECT”...........................................................8 www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 2
  3. 3. SCA Architecture , BPEL PROCESS & Project on Process Student Service-component architecture (SCA) : It is a group of specifications intended for the development of applications based on service-oriented architecture (SOA), which defines how computing entities interact to perform work for each other. SCA is based on the notion that all the functions in an enterprise should exist in the form of services that are combined into composites to address specific business requirements. SCA encompasses diverse technologies, programming languages, frameworks and platforms for Web service components and for the methods used to connect them. SCA can be broken down into four major parts or models: • The Assembly Model : which defines how components are combined, linked and packaged as services independent of the programming language.  The Implementation Model : which defines how services are packaged and accessed for specific programming languages.  The Policy Model : which defines service policies independent of the programming code.  The bindings model : which defines how components are accessed independent of the programming code  The specifications specify that an application designed with SCA should have the following advantages:  Decoupling of application business logic from the details of its invoked service calls  Target services in a multitude of languages including C++, Java, COBOL, and PHP as well as XML, BPEL, and XSLT  The ability to seamlessly work with various communications constructs including One- Way, Asynchronous, Call-Return, and Notification  The ability to "Bind" to legacy components or services , accessed normally by technologies such as Web Services, EJB, JMS, JCA, RMI, RPC, CORBA & others.  The ability to declare (outside of business logic) the Quality of Service requirements, such as Security, Transactions and the use of Reliable Messaging  Data could be represented in Service Data Objects The value proposition of SCA, therefore, is to offer the flexibility for true composite applications, flexibly incorporating reusable components in an SOA programming style. The overhead of business logic programmer concerns regarding platforms, infrastructure, plumbing, policies and protocols are removed, enabling a high degree of programmer productivity SCA is said to provide interoperability through an approach called "Activation". It is the method that provides the highest degree of component autonomy, compared to older "mediation" (e.g. JBI) or "Invocation" method used in JCA, www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 3
  4. 4. SCA Architecture The SCA Assembly Model consists of a series of artifacts, which are defined by elements contained in XML files. An SCA runtime may have other non-standard representations of the artifacts represented by these XML files, and may allow for the configuration of systems to be modified dynamically. However, the XML files define the portable representation of the SCA artifacts. The basic artifact is the Composite, which is the unit of deployment for SCA and which holds Services which can be accessed remotely. A composite contains one or more Components, which contain the business function provided by the module. Components offer their function as services, which can either be used by other components within the same module or which can be made available for use outside the module through Entry Points. Components may also depend on services provided by other components — these dependencies are called References. References can either be linked to services provided by other components in the same module, or references can be linked to services provided outside the module, which can be provided by other modules. References to services provided outside the module, including services provided by other modules, are defined by External Services in the module. Also contained in the module are the linkages between references and services, represented by Wires. A Component consists of a configured Implementation, where an implementation is the piece of program code implementing business functions. The component configures the implementation with specific values for settable Properties declared by the implementation. The component can also configure the implementation with wiring of references declared by the implementation to specific target services. Composites are deployed within an SCA System. An SCA System represents a set of services providing an area of business functionality that is controlled by a single organization. As an www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 4
  5. 5. example, for the accounts department in a business, the SCA System might cover all financial- related functions, and it might contain a series of modules dealing with specific areas of accounting, with one for customer accounts and another dealing with accounts payable. To help build and configure the SCA System, Composites can be used as component implementations, in the same way as Java classes or BPEL processes. In other words, SCA allows a hierarchy of composites that is arbitrarily deep - such a nested model is termed recursive. The capture and expression of non-functional requirements, such as security, is an important aspect of service definition, and has an impact on SCA throughout the lifecycle of components and compositions. SCA provides the Policy Framework to support specification of constraints, capabilities and Quality of Service (QoS) expectations, from component design through to concrete deployment. Binding components establish a connection between a SOA composite and the external world. There are two types of binding components: • Services provide the outside world with an entry point to the SOA composite application. The WSDL file of the service advertises its capabilities to external applications. These capabilities are used for contacting the SOA composite application components. The binding connectivity of the service describes the protocols that can communicate with the service, for example, SOAP/HTTP or a JCA adapter. • References enable messages to be sent from the SOA composite application to external services in the outside world. Wires enable you to graphically connect the following components in a single SOA composite application for message communication:  Services to service components  Service components to other service components  Service components to references When properly implemented, SCA can help an enterprise to minimize the workload on its developers, shorten learning curves, facilitate reuse of services and update policies without having to modify the programming. SCA also facilitates control over access methods and the implementation of security-related countermeasures. www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 5
  6. 6. BUSINESS PROCESS EXECUTION LANGUAGE (BPEL) • It is service component of Oracle SOA • It is meant for the orchestration of the services & executes the services in a systematic order • It is again a programming language similar to any other & has activities like Switch, While, Sequence, Scope, invoke, Receive & Reply etc. Introduction BPEL stands for Business Process Execution Language, and comes from a standards consortium consisting of BEA Systems, IBM, and Microsoft, BPEL combines and replaces IBM's Web Services Flow Language (WSFL) and Microsoft's XLANG specification. BPEL provides an “orchestration engine” for describing exchanges of information internally or externally. BPEL deals explicitly with the functional aspects of business processes: control flow (branch, loop, parallel), asynchronous conversations and correlation, long running nested units of work, faults and compensation. BPEL directly addresses these business process challenges: coordinating asynchronous communication between services, correlating message exchanges between parties, implementing parallel processing of activities, manipulating data between partner interactions, supporting long running business transactions and activities, and providing consistent exception handling. www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 6
  7. 7. BPEL is a XML-based workflow definition language that allows businesses to describe inter or intra enterprise business processes that are connected via Web services. BPEL becomes the “glue” to bind Web services into a cohesive business solution, facilitating their orchestrated interaction both within and between enterprises. A Business Process using BPEL can compose multiple Web services, effectively creating a completely new business application with its own public interface to end users (internal or external). BPEL opens a completely new way or at least enhanced way, for software development for mainstream business applications to allow a programmer to describe a business process that will take place across the Internet. BPEL provides an XML-based grammar for describing the logic to control and coordinate Web services participating in a process flow. This grammar can be interpreted and executed by a BPEL orchestration engine, which is controlled by one of the participating business parties. The engine coordinates all of the activities in the process, and controls the system's corrective activities when exceptions occur. BPEL builds on and extends XML and Web Services specifications www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 7
  8. 8. The Role of BPEL The BPEL specification defines the syntax and semantics of the BPEL language, which contains a variety of process flow constructs. It allows for conditional branching, parallel process flows, nested sub-processes, process joins, and other related features. BPEL is defined in an XML format. Just as today's software development tools include Web services in their development capabilities, there also exist easy-to-use tools to create and manage business processes using BPEL Why Do I Need BPEL Traditional methods for integration and business process automation typically involve embedded logic inside of applications designed to meet a specific business need such as ERP, supply chain, or CRM. The development, testing, and deployment efforts required to change these applications make integration and process changes both costly and complex. To address these issues, proprietary EAI and static BPM products emerged to abstract integration and process automation into a new layer of software tools. These software products liberated integration and process tasks from the underlying business systems so they could be more effectively changed, managed, and optimized. BPEL and Web services now provide a standardized integration interface and a standardized language for integration and process automation. BPEL, in effect, has the potential to commoditize the capabilities provided by proprietary EAI and BPM solutions. As often occurs in a commodity market, the resulting prices for products and services are certain to fall. STEP WISE PROCEDURE “PROCESS STUDENT PROJECT” Step 1: Create new project New --->All Technologies--->SOA Tier --->SOA project --->OK ---> Project Name (ProcessStudent) ---> ADF Business Component---> SOA--->Next --> Empty Composite ---> Finish. Now you can see your project on left pane with all its contents so as we need to start our project with XSD . www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 8
  9. 9. Step 2: Create a new xsd file under project Right click on xsd--> file name(Student.xsd) --> Target Namespace(http://www.bispsolutions.com/training/soa/schema/Student)-->prefix (stdobj) -->ok now created successfully Student.xsd Step 3: Design xsd as according to SCA i.e with the help of components or in design mode : www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 9
  10. 10. Click on element & rename it as Student & press Enter key. www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 10
  11. 11. Step 4: Right Click on target namespace & click complex type Step 5: Click on complex Type1 & rename it as StudentType & hit Enter. Step 6: Right click on StudentType ---> insert inside complex Type-->sequence www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 11
  12. 12. Step 7: Right Click on sequence --->insert inside sequence--->element Step 8: Click on element1 & rename it as Name & hit Enter Step 9: similarly click on sequence & select element then click on element2 & rename it as Number & press enter & so on ... for Email, Lang1Marks, Lang2Marks, Lang3Marks . www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 12
  13. 13. Step 10: click on Name & and write its type as xsd:string in Property inspector located in right pane & hit enter . Similarly for Number element. Step 11: : click on Email & and write its type as xsd:string in Property inspector located in right pane & hit enter www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 13
  14. 14. Step 12: click on Lang1marks & and write its type as xsd:integer in Property inspector located in right pane & hit enter likewise define their type for all other elements www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 14
  15. 15. Step 13 : Click on Student & write its type as stdobj:StudentType in Property inspector located in right pane & hit enter Step 14: Expand Student & observe design Step 15: Right Click on target namespace & click complex type www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 15
  16. 16. Step 16: click on complex Type1 & rename it as StudentResultType & hit Enter Step 17: Right click on sequence of StudentType & copy Step 18: Right click on StudentResultType & click on paste www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 16
  17. 17. Step 19: Now add three more elements (Result , Total, Average) by right clicking on its sequence ---> insert inside sequence---> element Then click on elements & rename them & set their types as on earlier discussion . Step 20 : Right Click on target namespace & click insert inside schema---> element so select two elements & rename element1 as ProcessStudentRequest & rename element2 as ProcessStudentResponse as shown below : www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 17
  18. 18. Step 21: Click on ProcessStudentRequest & write its type as stdobj:StudentType in Property inspector located in right pane & hit enter Step 22: Right click on ProcessStudentResponse -->insert inside element -->sequence. Then Right Click on sequence --->insert inside sequence--->element Click on element & rename it as Student & press Enter key. finally Click on ProcessStudentResponse & write its type as stdobj:StudentResultType in Property inspector located in right pane & hit enter www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 18
  19. 19. Step 23: Now click on source mode & view xsd . Step 24: Right click on Composite.xml & click on open www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 19
  20. 20. Step 25: Create BPEL Process This composite .xml is partitioned into three sections 1. Exposed Services 2. Components 3. External refrences Now right click on component section and choose BPEL Process Step 26: Fill all its blank spaces Name (ProcessStudentProcess) ---->NameSpace (Leave as it is)--->Template(Select Synchronous BPEL process)----> Service Name(ProcessStudentService)----> mark Expose as a SOAP service ----> Transaction (required) ----> Click on Input Browse to select input of wsdl -----> & then Click on Output Browse to select Output of wsdl On clicking input browse u can see as shown below www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 20
  21. 21. select ProcessStudentRequest On clicking Output browse u can see as shown below select ProcessStudentResponse Step 27: Now we have created BPEL Process as shown below www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 21
  22. 22. Step 28 : Click on Source mode Step 29: Click on ProcessStudentProcess.wsdl in left hand pane (This wsdl is automatically generated in Synchronous BPEL Process) www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 22
  23. 23. Step 30: On clicking ProcessStudentProcess.wsdl we can see automatic generated wsdl file Scroll Down www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 23
  24. 24. Step 31: Click on Design Mode & design of service is shown below: Step 32: Since we have already created BPEL Process click on Composite on left pane To create ProcessStudentProcess.bpel click on ProcessStudentProcess www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 24
  25. 25. On Clicking we can see the following Step 33 Click on Variable icon & create new variables to store Total, Average, Result. Step 34: Click on Green Plus 7 new create variable window appears Name (ResultVar)--->select type by clicking browse icon www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 25
  26. 26. www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 26
  27. 27. Step 35: Select string & click ok Step 36: Click Ok Step 37: Similarly create TotalVar & Choose Type as Integer. www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 27
  28. 28. Step 38: Similarly create AverageVar & Choose Type as decimal. Step 39: Observe successfully created Variables now click ok. Step40: Drag assign activity From Component Palette located at Right Pane of window & keep it in between receive Input & replyOutput www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 28
  29. 29. Step 41: Right click on assign-->Edit --->General ----> Name(AssignCalculation) Step 42: Click on Copy Rules Click Expression Drag it & keep it in TotalVar under Variables Step 43: Click Lang1Marks ---> insert into expression ---> plus sign(+)--> Lang2Marks---> insert into expression ---> plus sign(+)--> Lang3Marks---> insert into expression---> Click Ok www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 29
  30. 30. Step 44: Click Expression Drag it & keep it in AverageVar under Variables www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 30
  31. 31. Step 45: Click TotalVar under BPEL Variables---> insert into expression ---> Select Mathematical Function choose Divide ---> insert into expression ---> 3.0(Since number of subjects are three )---> OK Step 46: Click Ok www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 31
  32. 32. Step 47: Drag Switch activity From Component Palette located at Right Pane of window & keep it in between Assigncalculation & replyOutput www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 32
  33. 33. Switch Activity : Switch activity is as similar as if else condition in other programming language example c. This activity consists of an ordered list of one or more conditional branchesdefined in a case branch, followed optionally by an otherwise branch. Thebranches are considered in the order in which they appear. The first branch whose condition is true is taken and provides the activity performed for the switch. If condition is false, then the otherwise branch is taken. If the otherwise branch is not explicitly specified, then an otherwise branch with an empty activity is assumed to be available. The switch activity is complete when the activity of the selected branch completes Step 48: Click on Condition Step 49: Click on Xpath Expression builder to set condition Step 50: Click Lang1Marks ---> insert into expression ---> greater equals 35--> Lang2Marks--- > insert into expression ---> greater equals 35--> Lang3Marks---> insert into expression---> greater equals 35--> Click Ok www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 33
  34. 34. Step 51 : Click ok Step 52: Drag & Drop Assign activity under true condition as shown below www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 34
  35. 35. Step 53: : Click on Copy Rules Click Expression Drag it & keep it in ResultVar under Variables Step 54: Write under Expression 'PASS' and click Ok www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 35
  36. 36. Step 55: Click Ok www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 36
  37. 37. Step 56: Drag & Drop Assign activity under true condition & edit is AssignResult as shown below Step 57: Click Expression Drag & drop it in ResultVar under Variables Write under Expression 'FAIL' and click Ok www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 37
  38. 38. Step 58: To assign output drag & drop Assign activity as shown below & edit it as AssignOutput Step 59: Map ProcessStudentResponse as shown in diagram so that we can get output response according to mapping elements then click OK www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 38
  39. 39. Step 60: Assign out put completed & also BPEL process completed Now Click on Complile Icon shown below Successful compilation with 0 errors & 0 warnings www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 39
  40. 40. Build successful Step 61: Deploy project by clicking ProjcessStudent Project. Deployment Finished. www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 40
  41. 41. Note: Before Deployment Start Weblogic Admin Server as discussed in my previous document Oracle Soa Part IV Doc. Step 62 : Click on Browser icon shown below: Step 63: 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 64 : Login using credentials User Name :weblogic Password : welcome1 click on login www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 41
  42. 42. Step 65: 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 ProjcessStudent Project . Step 66: Observe that all information regarding to ProcessStudent Project is given Running instances 0 means that yet we have not tested any instance. Total 0 Project Status Active Now click on Browser tab www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 42
  43. 43. Step 67: Click on WSDL URL Step 68: Now it is a Concrete WSDL , Right click on page & select View Page Source www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 43
  44. 44. Step 69: Copy location address & paste in browser URL & now get the ABSTRACT WSDL & observe it . Abstract wsdl shown below www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 44
  45. 45. Step 70 : Copy location address & paste in browser URL & now get the imported xsd & observe it . XSD shown below : www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 45
  46. 46. Step 71 : Copy soap: address location www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 46
  47. 47. Since binding means package or soap envelope so message is enveloped inside soap binding as shown below in red box : www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 47
  48. 48. Step 72: Click on TEST & create instance Step 73: Scroll down page & Provide required input of a student Click on Xml View : Now observe that the input message is packed inside soap binding Envelope Step 74: Click on Test Web Service www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 48
  49. 49. And get Response shown below: 1) TREE VIEW 2) XML VIEW Observe response in XML view shown below & click on Launch Flow Trace : Step 75: Faults : 0 State : completed www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 49
  50. 50. Double Click ProcessStudentProcess & see the instance. Step 76: Click on Audit Trail shown below Step 77: Click on Flow shown below www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 50
  51. 51. Step 78: Click on Receive input on above diagram : www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 51
  52. 52. NOTE: Use ALT+ TAB to come again in flow diagram & vise versa. Step 79 : Click on assignCalculation on above diagram : Step 80 : Click on assignResult on above diagram : Step 81: Click on assignOutput on above diagram : www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 52
  53. 53. www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 53
  54. 54. www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 54
  55. 55. Step 82: Click on Faults & check it. Step 83: Now again double click on ProcessStudentProject on left pane & observe that after first test it created Instance with its instance id 160004 & instance state completed. Now since we have completed our test & wanted to exit from enterprise manager , Click on ShutDown Tab & then LogOut. www.bispsolutions.com www.bisptrainigs.com www.hyperionguru.com Page 55

×