SOA Suite 10g Developer Guide

download SOA Suite 10g Developer Guide

of 47

Transcript of SOA Suite 10g Developer Guide

  • 8/12/2019 SOA Suite 10g Developer Guide

    1/47

    SOA Suite 10g

    Developers Guide

  • 8/12/2019 SOA Suite 10g Developer Guide

    2/47

    SOA Suite 10g Developers Guide

    Table of Contents

    1 Purpose ......................................................................................................... 1 2 SOA Environment .......................................................................................... 13 SOA Use Cases ............................................................................................. 1

    3.1 Invoke a Synchronous Service Use Case ............................................... 13.2 Invoke an Asynchronous Service Use Case ........................................... 23.3 Audit BPEL instance execution Use Case .............................................. 23.4 Audit ESB instance execution Use Case ................................................ 23.5 Registry Server Lookup Use Case ......................................................... 23.6 WSDL Reference Use Case ................................................................... 3

    4 CVSStructure ................................................................................................. 35 Multi-user development ................................................................................. 4

    5.1 BPEL PM ................................................................................................ 55.2 ESB ........................................................................................................ 55.3 OWSM .................................................................................................... 55.4 Oracle Registry ....................................................................................... 55.5 Oracle Rules ........................................................................................... 5

    6 Versioning SUPPORT for runtime components ............................................. 66.1

    BPEL PM ................................................................................................ 6

    6.2 ESB ........................................................................................................ 76.3 OWSM .................................................................................................... 76.4 Oracle Service Registry .......................................................................... 76.5 Oracle Rules ........................................................................................... 7

    7 Version controlling of source code ................................................................. 78 Modify SOA system (Procedure / Guidelines) .............................................. 79 Lifecycle (Dev to Test to Prod) ....................................................................... 8

    9.1 Dev environment .................................................................................... 89.2 DEV Log Files and Configuration files: ................................................. 109.3 Test environment .................................................................................. 119.4 TST Log Files and Configuration files: .................................................. 139.5 How to promote .................................................................................... 149.6 Utilities .................................................................................................. 15

  • 8/12/2019 SOA Suite 10g Developer Guide

    3/47

    SOA Suite 10g Developers Guide

    9.7 Utility Services ...................................................................................... 1510 Monitoring ................................................................................................ 1611 How to increase Logging level for BPEL/ESB/OWSM debugging purpose 16

    11.1 BPEL Logging: ...................................................................................... 1611.2 ESB logging: ......................................................................................... 1611.3 OWSM Logging: ................................................................................... 17

    12 OPMN(Oracle Process Notification and Management) ............................ 1913 Applying Oracle Interim Patch .................................................................. 2014 How to perform Snapshot of nightly/weekly when files on a server getscorrupted/removed. ............................................................................................. 2115 Developer jdev setup ............................................................................... 21

    15.1 Steps for Installing and Starting JDeveloper on Windows .................... 2215.2 Starting JDeveloper on Windows .......................................................... 2215.3 Below snapshot shows step by step explanation for jdeveloper usage.22

    15.3.1 Create BPEL process .................................................................... 2215.3.2 Deploy BPEL process .................................................................... 2915.3.3 Test BPEL process ........................................................................ 37

    16 Appendix A: Command cheat sheet ......................................................... 4317 Appendix B: Resources ............................................................................ 44

  • 8/12/2019 SOA Suite 10g Developer Guide

    4/47

    SOA Suite 10g Developers Guide

    - 1 -

    1 Purpose

    The purpose of the document is help on boarding new developers in using newSOA setup.

    2 SOA Environment

    3 SOA Use Cases

    The following SOA use cases represent the core functionality of the SOAenvironment. These use cases aim to highlight the order of operations andaccess paths during process execution and administration.

    3.1 Invoke a Synchronous Service Use Case

    1. Client makes HTTP request via load balancer.2. Load balancer makes HTTP request to OHS on round-robin basis.3. OHS makes AJP request to SOA Suite OC4J instance on round-robin

    basis.4. OC4J instance makes JDBC calls to SOA database for dehydration and

    metadata.

  • 8/12/2019 SOA Suite 10g Developer Guide

    5/47

    SOA Suite 10g Developers Guide

    - 2 -

    5. Response is returned from OC4J to OHS over AJP.6. Response is returned to load balancer and client over HTTP.

    3.2 Invoke an Asynchronous Service Use Case

    1. Client makes HTTP request via load balancer.2. Load balancer makes HTTP request to OHS on round-robin basis.3. OHS makes AJP request to SOA Suite OC4J instance on round-robin

    basis.4. SOA suite instance places request in request queue.5. SOA suites instances alternate de-queueing of requests between SOA

    instances.6. OC4J instance makes JDBC calls to SOA database for dehydration and

    metadata when the instance is serviced.7. Response is returned from OC4J to OHS over AJP.8. Response is returned to load balancer and client over HTTP.

    3.3 Audit BPEL instance execution Use Case

    1. Client makes request to OHS from browser over HTTP.2. OHS makes AJP request to SOA Suite OC4J instance on round-robin

    basis.3. OC4J handles user login using JAZN-XML.4. OC4J instance makes JDBC calls to SOA database for instance metadata

    information.5. Response is returned from OC4J to OHS over AJP.6. Response is returned to client over HTTP.

    3.4 Audit ESB instance execution Use Case1. Client makes request to OHS from browser over HTTP.2. OHS makes AJP request to SOA Suite OC4J instance on round-robin

    basis.3. OC4J handles user login using JAZN-XML.4. OC4J instance makes JDBC calls to SOA database for instance metadata

    information.5. Response is returned from OC4J to OHS over AJP.6. Response is returned to client over HTTP.

    3.5 Registry Server Lookup Use Case

    1. Client makes request for service endpoint via load balancer.2. Load balancer makes HTTP request to OHS on round-robin basis.3. OHS makes AJP request to Oracle Registry Server (UDDI) instance on

    round-robin basis.4. UDDI returns target service endpoint location for request.

  • 8/12/2019 SOA Suite 10g Developer Guide

    6/47

  • 8/12/2019 SOA Suite 10g Developer Guide

    7/47

    SOA Suite 10g Developers Guide

    - 4 -

    build

    build.xml

    build.properties

    conf

    project.properties

    build.properties.devel

    build.properties.test

    db

    lib

    doc

    README.txt

    ReleseNote_XXX.txt

    ProjectXYZ

    UtilityServices

    schemas

    xslt

    5 Multi-user development

    This section specifies a set of guidelines to enable multi-user development in theSOA environment. The goal is to allow multiple users to design, develop, deployand test in one environment at the same time without stepping on each other.Given the SOA suite comprises of a varied set of products, the guidelines andsteps to enable multi-user development are different in each of them. These arespelt out in detail in the below sections.

  • 8/12/2019 SOA Suite 10g Developer Guide

    8/47

    SOA Suite 10g Developers Guide

    - 5 -

    5.1 BPEL PM

    Following are the steps to perform to provision a new user on the BPEL PM side:

    1. Create user2. Create domain3. Create role to access the domain4. Assign role from step #3 to user from step #15. Assign role from step #3 to BPMSystemAdmin

    At this point, the new user should be able to create a App Server and IntegrationServer connections from within JDeveloper and also be able to access theOracle BPEL Control using his/her account.

    5.2 ESB

    There isnt any explicit support for multiple users provided out of the box. So, theproposed mechanism is to allow for multiple users to have a cooperative modelwhere each user is cordoned off from others using the notion of ESB System. Fora given user, there will be an ESB System that is created explicitly and all ESBflows that the user models should be deployed into his/her System. One canadditionally create Service Groups if he/she wants to create a hierarchy ofservices within this System for further categorization or organization.

    5.3 OWSM

    A user account will be created at the App Server level with the necessaryprivileges to secure services using the gateway. This account will be used to

    perform all necessary OWSM related operations on the gateway by thecorresponding user.

    5.4 Oracle Registry

    A user account will be created via the Oracle Service Registry Control with thenecessary privileges to publish a service. Once a given service is in a stablestate and ready to be consumed by others, the owner of service can publish it tothe Service Registry in a well defined location. The registry will be set up suchthat a given user can access the registry in a READ ONLY mode while havingWRITE privileges to the services he/she has published.

    5.5 Oracle Rules

    Each user will have an app server account (will be the same one as created forBPEL PM in section 7.1.1) and a dictionary exclusively created for his/herconsumption. A given user will have to create all rules in his/her dictionary andwill not have access to others dictionaries.

  • 8/12/2019 SOA Suite 10g Developer Guide

    9/47

    SOA Suite 10g Developers Guide

    - 6 -

    6 Versioning SUPPORT for runtime components

    As true with any enterprise development environment, there is an inherent needto have versioning support. Most of the time, this is more of an implicitrequirement as opposed to being an explicit one. One naturally expects to beable to roll out better and improved flavors of an existing system over a period oftime with an ability to roll back to a previous flavor in case some of the existingfunctionality is broken. In the following sections we will go over this requirementin the context of the various SOA component stack:

    6.1 BPEL PM

    This SOA component has fairly rich versioning support out of the box. However,most of the versioning support is more of deployment/runtime kind; meaning,there is no explicit versioning support into the design time tooling itself. Thedevelopment lifecycle comprises of creating a process, deploying a process,

    updating the process, deploying the process, updating the process, deploying theprocess and so on. As far as the process definition itself goes, there is noversioning being done and captured inside of the source code by the design timetooling. One gets to specify a new version number every time he/she deploys thebusiness process; at this time, the onus is on the user to use a version controlsystem to check-in the same process and keep track of the version numbers.One easy way would be to tag the version checked in with the version # that isbeing used at deployment time. That way, if you ever need to revert back to anearlier version, all one has to do is look for all files tagged with the previousversion and redeploy the same. Note that this assumes support for tagging in theunderlying version control system. For example, this is supported by Subversion

    will need to check if CVSsupports it as well.

    Deployment in the BPEL world comprises of various steps: pre-compile, compile,validate, deploy. At the end of the compile and validate steps, there is asuitcase (a jar file) comprising of all artifacts ready to be deployed. Deploy stepconsists of shipping the suitcase across to the server side. It is recommended tocheck-in this suitcase along with the version info into source code control just sowe have the exact bits that were actually deployed (this is same as keeping trackof the executable shipped as part of any product release in spite of having thecorresponding versioned source code bits).

    The above can be accomplished by the same script that is responsible forcommand line deployment.

  • 8/12/2019 SOA Suite 10g Developer Guide

    10/47

    SOA Suite 10g Developers Guide

    - 7 -

    6.2 ESB

    There is no in-built versioning support available out of the box with the ESBcomponent. So, this will have to be custom built as part of the SOA FoundationLayer.

    As per Oracle, most of the ESB flows are short lived at runtime as opposed toBPEL processes which could be long running and hence the need forversioning in BPEL and not as much in ESB. Regardless, as cited before, thereis an implicit need for versioning to be able to rollback to an earlier set of bits ifneed be. And this can be achieved by version the design time artifacts essentially the JDeveloper project in conjunction with the zip file that is created atdeployment time.

    6.3 OWSM

    Use Perforce to version control the OWSM metadata (policies, services)configured for a given gateway.

    6.4 Oracle Service Registry

    Use Perforce to version control the Oracle Service Registry metadata (take adatabase dump of the ORAUDDI schema).

    6.5 Oracle Rules

    Use Perforce to version the Oracle Rules dictionary (which is WEBDAV basedrepository).

    7 Version controlling of source code

    This section will have detailed guidelines for our internal version control systemPerforce. This will be used to manage our code based on various pattern like anew project, fix, multiple fixes, release labeling, multiple projects etc.

    Our development IDE JDeveloper will be tested for a direct integration withCVSserver and would allow multiple developers to work on a centralizedmanaged code global code repository.

    8 Modify SOA system (Procedure / Guidelines)

    When there is a need to modified any SOA system setup, the following stepsneed to be executed:

    Developer creates incident ticket in remedy with the detail

  • 8/12/2019 SOA Suite 10g Developer Guide

    11/47

    SOA Suite 10g Developers Guide

    - 8 -

    Ops team creates QC accordingly and assign to the developer who createthe incident ticket

    Send email to dl-eis and Anujit. If no concern voiced within 24 hours,consider approved. Changes can be proceeded.

    If changes is intended to be made in a text file, please add comment linesbefore and after the change spots like: lines that are changed.

    CVSthe files that are changed so we have history. name of person, QCticket number, date/time should be part of comment when checking in.

    1. If changes need to be migrated to all environments, follow currentrelease process

    9 Lifecycle (Dev to Test to Prod)

    9.1 Dev environment

    This environment will be used by all developers to develop business process /flows using BPEL PM or ESB, secure and publish once they are unit and sanitytested in their local sandbox environment. Subsequently, all the correspondingdesign time artifacts will be checked in to Perforce along with the relevant unittests as well. There will be an automated continuous build set up in the Devenvironment which will kick off nightly builds of all of the processes, deploy thesame and run the complete sanity test suite. This sanity test suite will compriseof all of the unit tests checked in by the developers plus additional testsdesignated by the QA team. The idea is to ensure that all processes and flowschecked in are up to par all the time and nothing gets broken; over time thesanity test suite will be enhanced to include more tests, thus improving thequality over time.

    Note that most of these processes and flows will depend on third partyapplications like PeopleSoft, Oracle ERP, Seibel CRM etc. which may or may notbe always up and running. The test framework will be such that there will beprovision to run a test in two flavors one with the connection to the real systemand one with a stubbed out flavor which will simulate the third party connectionbut not necessarily exercise it. Even though the connection itself is stubbed out,

    all of the process is still exercised in completeness; so if there is a flaw in thebusiness logic itself, it should still be caught by the test suite.

    Once the process/flow is developed, the developer will have the option ofdeploying either via JDeveloper or via command line using an ant based script.Although one has both these options, it is recommended that the command line

  • 8/12/2019 SOA Suite 10g Developer Guide

    12/47

    SOA Suite 10g Developers Guide

    - 9 -

    option be exercised and tested before the code is checked into perforce. Thiswill ensure that the route taken by the nightly build scripts is exercised as well.

    DEV1 Environment specific details:

    BPEL Console:http://sunsoapps1-dev:8888/BPELConsole/ ESB:http://sunsoapps1-dev: 8888/esb/ Enterprise Manager:http://sunsoapps1-dev: 8888/em

    Username/Pwd:oc4jadmin/youAreWelcome

    OWSM:http://sunsoapps1-dev:8888/ccore/ Username:admin/youAreWelcome

    #ESB ParamtersesbHostname="sunsoapps1-dev.corp.myOrg.com"esbHttpPort="8888"esbUsername="oc4jadmin"esbInstanceName="oc4j_soa"

    #BPEL ParametersbpelHostname="sunsoapps1-dev.corp.myOrg.com"bpelHttpPort="8888"bpelOpmnPort="6004"bpelUsername="oc4jadmin"bpelInstanceName="oc4j_soa"

    DEV2 Environment specific details:

    BPEL Console:http://sunsoapps2-dev:8888/BPELConsole/

    ESB:http://sunsoapps2-dev: 8888/esb/ Enterprise Manager:http://sunsoapps2-dev: 8888/em

    Username/Pwd:oc4jadmin/youAreWelcome

    OWSM:http://sunsoapps2-dev:8888/ccore/

    Username:admin/youAreWelcome

    #ESB ParamtersesbHostname="sunsoapps2-dev.corp.myOrg.com"esbHttpPort="8888"esbUsername="oc4jadmin"esbInstanceName="oc4j_soa"

  • 8/12/2019 SOA Suite 10g Developer Guide

    13/47

    SOA Suite 10g Developers Guide

    - 10 -

    #BPEL ParametersbpelHostname="sunsoapps2-dev.corp.myOrg.com"bpelHttpPort="8888"

    bpelOpmnPort="6004"bpelUsername="oc4jadmin"bpelInstanceName="oc4j_soa"

    Below are the Database specific details for BPEL/ESB/OWSM:

    Host: svlsoadb1-tst.corp.myOrg.com

    DB Instance: dsoa.corp.myOrg.com

    Port: 2020

    The above details are common across different schemas. Use below

    credentials to connect to ORABPEL/ORAESB/ORAWSM

    DB Schemas:

    UserName/Password:ORABPEL/soafndbpel1$

    UserName/Password: ORAESB/soafndesb1$

    UserName/Password: ORAWSM/soafndwsm1$

    9.2 DEV Log Files and Configuration files: Apache logs:

    Web Tier primarily comprises of the Apache HTTP Server. OHS is anOracle wrapper around Apache to aid in monitoring, load balancing anddirecting requests only to nodes that are up and have a runningapplication. Logs are present at below location.

    /oracle/product/102_dapp/102_app/Apache/Apache/logs/acess_log.xxxxxxxx

    /oracle/product/102_dapp/102_app/Apache/Apache/logs/error_log.xxxxxx

    xx data-sources.xml:

    /oracle/product/102_dapp/102_app1/j2ee/oc4j_soa/config/

    oc4j-ra.xml: contains deployment configurations for deploying resourceadapters to OC4J. It contains EIS connection information as specified inthe deployment descriptor of the resource adapter (ra.xml), JNDI name to

  • 8/12/2019 SOA Suite 10g Developer Guide

    14/47

    SOA Suite 10g Developers Guide

    - 11 -

    be used, connection pooling parameters, and resource principal mappings(security-config element)

    /oracle/product/102_dapp/102_app1/j2ee/oc4j_soa/application-deployments/default/DbAdapter

    /oracle/product/102_dapp/102_app1/j2ee/oc4j_soa/application-deployments/default/JmsAdapter

    ns_emails.xml:

    Before using email activity, you must set up configuration details for emailaccounts in the ns_emails.xml.It is present at below location

    /oracle/product/102_dapp/102_app1/bpel/system/services/config

    domain.log:BPEL domain logs

    /oracle/product/102_dapp/102_app1/bpel/domains//logs

    log.xml:(ESB RT Logs) ESB runtime, responsible for executing all of theESB flows deployed into the ESB cluster.Logs are present at belowlocation.

    /oracle/product/102_dapp/102_app1/j2ee/oc4j_soa/log/oc4j_soa_default_group_1/oc4j

    log.xml:(ESB DT Logs)ESB design time responsible for all of thecommunication of the ESB flows via the repository.

    /oracle/product/102_dapp/102_app1/j2ee/oc4j_esbdt/log/oc4j_esbdt_default_group_1/oc4j

    opmn.log:

    /oracle/product/102_dapp/102_app1/opmn/logs

    gateway.log: OWSM gateway logs

    /oracle/product/102_dapp/102_app1/j2ee/oc4j_wsm/log

    9.3 Test environment

    The test environment is similar to the Development environment, except that thiswill be cluster enabled as well. The primary difference is how processes orflows are deployed into this environment when compared to Dev. Unlike Dev,where processes/flows are deployed by the developers while they are beingdesigned and developed, only checked-in code (processes/flows existing inPerforce) will be deployed into Test environment. It is mostly QA team, whichwill work and develop tests in this environment. Any tests, which are deemed

  • 8/12/2019 SOA Suite 10g Developer Guide

    15/47

    SOA Suite 10g Developers Guide

    - 12 -

    basic, will be migrated over to the dev environment and made part of the devsanity test suite.

    Similar to the dev environment, the test environment will have a night build aswell which will comprise of a much larger test suite (dev sanity test suite + all ofthe tests developed by the QA team, most of which will span multipleprocesses/flows). Unlike dev, most of the tests here will run by exercising all ofthe third party connections as well (as this is the final stop on way beforeprocesses/flows are promoted to prod). The same ant based command linescripts used in dev environment will suffice for test environment as well.

    TEST Environment specific details:

    BPEL Console:http://soa-test.corp.myOrg.com/BPELConsole/ ESB:http://soa-test.corp.myOrg.com/esb Enterprise Manager:http://soa-test.corp.myOrg.com/em

    Username/Pwd:oc4jadmin/youAreWelcome

    OWSM:http://soa-test.corp.myOrg.com/ccore/ Username: admin/oracle

    #ESB Paramtersexport set esbHostname="soa-test.corp.myOrg.com"export set esbHttpPort="80"

    export set esbUsername="oc4jadmin"

    #BPEL Parametersexport set bpelHostname="sunsoapps1-tst"export set bpelJ2EEHostname="sunsoapps1-tst"export set bpelHttpPort="8888"export set bpelOpmnPort="6003"export set bpelUsername="oc4jadmin"export set bpelInstanceName="oc4j_soa"export set clusterBpel="true"

    export set SCHEMAS_BASE=/u/soatst/integration/schemasexport set MAPS_BASE=/u/soatst/integration/maps/

    Note:Schemas/Maps which are related to projects are being placed underuser soatst (soatst/ T5y6u7i*)and the soft links/symbolic links are cratedunder OHS,location

    >>cd /oracle/product/102_app/Apache/Apache/htdocs/maps/PSFT_SOA

  • 8/12/2019 SOA Suite 10g Developer Guide

    16/47

    SOA Suite 10g Developers Guide

    - 13 -

    maps -> /u/soatst/integration/maps

    >>/oracle/product/102_app/Apache/Apache/htdocs/schemas/PSFT_SOAschemas -> /u/soatst/integration/schemas

    Siimilarly we need to place the javakeystore files under /u/soatst/integration/jksand can be used for encryption/decryption step in owsm

    Below are the Database specific details for BPEL/ESB/OWSM:

    Host: svlsoadb1-tst.corp.myOrg.com

    DB Instance: tsoa.corp.myOrg.com

    Port: 2040

    The above details are common across different schemas. Use belowcredentials to connect to ORABPEL/ORAESB/ORAWSM

    DB Schemas:

    UserName/Password:ORABPEL/soafndbpel1$

    UserName/Password: ORAESB/soafndesb1$

    UserName/Password: ORAWSM/soafndwsm1$

    9.4 TST Log Files and Configuration files:

    Apache logs:

    /oracle/product/102_app/Apache/Apache/logs/acess_log.xxxxxxxx

    /oracle/product/102_app/Apache/Apache/logs/error_log.xxxxxxxx

    data-sources.xml:

    /oracle/product/102_app1/j2ee/oc4j_soa/config/

    oc4j-ra.xml

    /oracle/product/102_app1/j2ee/soa/application-

    deployments/default/DbAdapter /oracle/product/102_app1/j2ee/soa/application-

    deployments/default/JmsAdapter

    ns_emails.xml:

    /oracle/product/102_app1/bpel/system/services/config

    domain.log:

  • 8/12/2019 SOA Suite 10g Developer Guide

    17/47

    SOA Suite 10g Developers Guide

    - 14 -

    /oracle/product/102_app1/bpel/domains//logs

    log.xml:(ESB RT Logs)

    /oracle/product/102_app1/j2ee/oc4j_soa/log/oc4j_soa_soa_group_1/oc

    4j log.xml:(ESB DT Logs)

    /oracle/product/102_app1/j2ee/oc4j_esbdt/log/oc4j_esbdt_esbdt_group_1/oc4j

    opmn.log:

    /oracle/product/102_app1/opmn/logs

    gateway.log:

    /oracle/product/102_app2/j2ee/oc4j_gtwy/log

    9.5 How to promote

    Promotion to test will involve the following steps:

    1. Design/develop the process or flow in dev environment.2. Unit test the same.3. Check in process/flow into perforce.4. Process/flow tested as part of the dev nightly build.5. Deploy the same to test environment using the ant based command line

    scripts.

    Promotion to prod will involve the following steps:1. More thorough testing of the process/flow via more unit tests, tests

    spanning multiple processes/flows, end to end tests.2. Checking in all of the above tests into perforce.3. Process/flow tested as part of the test nightly build.4. Deploy the same to prod environment using the ant based command line

    scripts.5. Check in of all the binaries (from step #4) into perforce for tracking and

    release management purposes.

    Promotion of environment specific global variables

    1. Domain MAP will have the environment specific global variables andproperties.

    2. Domain map is multi-dimention spreadsheet like sheet in ESB3. Domain MAPs can be somple exported and imported into ESB container

  • 8/12/2019 SOA Suite 10g Developer Guide

    18/47

    SOA Suite 10g Developers Guide

    - 15 -

    9.6 Utilities

    Following are the utilities that will be checked in to perforce for all developers touse in dev, test, and prod environments. All of these will be ant based scripts tomake them platform independent.

    1. Check in script for a specified directory it will check in all of thenecessary artifacts (excluding any temporary files etc.). The idea is to hidethe detail and not bother users/developers about what needs to bechecked in Vs what not. There will be one for BPEL processes and one forESB flows.

    2. Deployment script for a specified directory/project and environment, thisscript will deploy process/flow to the respective environment. Additionally,this script will have an option to enable tracking of the binaries/bits beingdeployed to the respective environment (this is primarily for tracking ofreleases/versions of code that is rolled out into production).

    3. Release/patch generation script script to generate a release or a patchwhich can then be used to do promotion to either test or prod. This scriptwill do the necessary tagging or labeling in perforce to keep track ofrelease/version info.

    4. Template scripts script to create/check in a template for either a processor flow; script to check out and create a project based on a template.

    9.7 Utility Services

    This section contains all Utility services which are of horizontal nature meaning they will be re-used across by all services not just by one specific

    service or application. We do not mean to mention the utility services availableout of the box like say Notification service.

    1. Transformation service this service will be responsible for taking in aninput document and an XSLT map and returning the transformeddocument.

    2. Notification service this service will be sending the email / pagernotification in case of a business or technical error.

    Following patterns will be considered for designing this service

    i) Maximum no. of notification for a predefined time interval

    ii) Escalation of business critical failuresiii) XSLT based E-Mail bodyiv) E-mail recipients managementv) Connectivity with Oracle BAM if neededvi) Action and steps to restore the process

  • 8/12/2019 SOA Suite 10g Developer Guide

    19/47

    SOA Suite 10g Developers Guide

    - 16 -

    10 Monitoring

    A complete monitoring system will be designed for Monitor the SOAinfrastructure.

    This section will have a detailed analysis of following endpoints

    1. Machine level monitoring We would consider existing tools like Tivoli,hawk etc.

    2. Monitor Error JMS topics3. JMX monitoring - Each container will be running one or more JVM. Need

    to analyse a JMX based monitoring and management system for ourdistributed apps.

    11 How to increase Logging level for BPEL/ESB/OWSM debugging

    purpose

    11.1 BPEL Logging:

    Login to BPELConsole http://sunsoapps1-dev:8888/BPELAdminusing

    oc4jadmin/youAreWelcome

    Select logging tab->change the levels and select apply.

    Log4j by default can log messages with five priority levels

    debug- debugging messages which should not be printed when theapplication is in production.

    info- for messages similar to the "verbose" mode of many applications.

    warn- for warning messages which are logged to some log but theapplication is able to carry on without a problem.

    error- for application error messages which are also logged to some logbut, still, the application can hobble along. Such as when someadministrator-supplied configuration parameter is incorrect and you fallback to using some hard-coded default value.

    fatal- for critical messages, after logging of which the application quits

    abnormally.

    11.2 ESB logging:

    Logger levels are modified by navigating through the Application Server Control,or directly via; http://sunsoapps1-dev: 8888/em/

  • 8/12/2019 SOA Suite 10g Developer Guide

    20/47

    SOA Suite 10g Developers Guide

    - 17 -

    NOTE: you may need to select the oc4j_soa j2ee container; otherwise by defaultthis url may point to the 'home' container.

    You can navigate to the logger section via the following steps from within ;

    http://sunsoapps1-dev:8888/em/Cluster Topology > Application Server: soadev.sunsoapps1-dev > OC4J:oc4j_esbdt >

    click on administration > under Administration Tasks / Properties - click on loggerconfiguration. The following information now applies;

    Any log level set to NULL will inherit the parent log level for that logger.The log levels are NULL (default), SEVERE, WARNING, INFO, CONFIG, FINE,FINER, FINEST.

    You can enter 'esb'into the 'Search by Logger Name' to show all ESB loggers.For debugging problems, the 'FINEST' setting is recommended. Remember tostop and start the oc4j container for this modification to take effect. And also toreset the logger back to the prior value once you have completed your debugging

    11.3 OWSM Logging:

    The out-of-box log level is INFO for all OWSM applications. For debuggingpurposes, you may want to bump this log level to get further details on theproblem. Following instructions will allow you to achieve this.

    OWSM Gateway

    Make sure that OC4J application server is running.Open /oracle/product/102_app2/owsm/config/gateway/logging.xml and replaceall INFO with ALL.Go to /oracle/product/102_app2/owsm/bin directory, and run the followingcommandwsmadmin deploy OC4J_ADMIN_PASSWORD gateway

    The changed log level for the gateway application is in effect now. Look for thedetailed logs in /oracle/product/102_dapp/102_app1/j2ee/oc4j_wsm/log

    OWSM Control

    Make sure that OC4J application server is running.Open /oracle/product/102_app2/owsm/config/ccore/logging.xml and replace allINFO with ALL.

  • 8/12/2019 SOA Suite 10g Developer Guide

    21/47

    SOA Suite 10g Developers Guide

    - 18 -

    Go to /oracle/product/102_app2/owsm/bin directory, and run the followingcommandwsmadmin deploy OC4J_ADMIN_PASSWORD controlThe changed log level for the gateway application is in effect now. Look for the

    detailed logs in /oracle/product/102_app2/j2ee/OC4J_Instance/log/ccore.log

    OWSM Policy Manager

    Make sure that OC4J application server is running.Open /oracle/product/102_app2/owsm/config/policymanager/logging.xml andreplace all INFO with ALL.Go to /oracle/product/102_app2/owsm/bin directory, and run the followingcommandwsmadmin deploy OC4J_ADMIN_PASSWORD policymanager

    The changed log level for the gateway application is in effect now. Look for thedetailed logs in/oracle/product/102_app2/j2ee/OC4J_Instance/log/policymanager.log

    OWSM Monitor

    Make sure that OC4J application server is running.Open /oracle/product/102_app2/owsm/config/coreman/logging.xml and replaceall INFO with ALL.Go to /oracle/product/102_app2/owsm/bin directory, and run the followingcommand

    wsmadmin deploy OC4J_ADMIN_PASSWORD monitor

    The changed log level for the gateway application is in effect now. Look for thedetailed logs in /oracle/product/102_app2/j2ee/OC4J_Instance/log/coreman.logOWSM Agents on OC4J

    Server Agent or J2EE Client Agent

    Make sure that OC4J application server is running.Open

    /oracle/product/102_app2/owsm/config/interceptors/componentId/config/clientagent or serveragent/logging.xml and replace all INFO with ALL.Restart the application.The changed log level for the serveragent application is in effect now. Look forthe detailed logs in

    /oracle/product/102_app2/j2ee/OC4J_Instance/log/serveragent.log forserveragent (and clientagent.log for client agents).

  • 8/12/2019 SOA Suite 10g Developer Guide

    22/47

    SOA Suite 10g Developers Guide

    - 19 -

    12 OPMN(Oracle Process Notification and Management)

    Use the Oracle Process Notification and Management daemon (opmnctl) to start,stop and poll the SOA OC4J instances and Oracle HTTP ServerTo check the status of all OPMN processes in the cluster, execute the followingcommand:opmnctl status @cluster

    >>StartTo start all OC4J instances, execute the following command on each clusterinstance:

    >> opmnctl startall

    To start an OC4J instance, execute the following command on a specific node:

    >> opmnctl startproc process-type=

    The following are valid process names:>>soa>>esbdt>>esbrt>>ohs

    >>Stop

    To stop all OC4J instances and shutdown the OPMN daemon, execute thefollowing command on each cluster instance:>>[ soauser@sunsoapps1-tst config]$ opmnctl shutdown

    or

    >>[ soauser@sunsoapps1-tst config]$ opmnctl stopall

    To stop an OC4J instance, execute the following command on a specific node:

    >> opmnctl stopproc process-type=

    The following are valid process names:>>soa>>esbdt>>esbrt>>ohs

  • 8/12/2019 SOA Suite 10g Developer Guide

    23/47

    SOA Suite 10g Developers Guide

    - 20 -

    eg:[ soauser@sunsoapps1-tst config]$ opmnctl stopproc process-type=soa

    >>Restart

    To Restart an OC4J instance, execute the following command on a specificnode:

    [soauser@sunsoapps1-tst config]$ opmnctl restartproc process-type=soa

    >>shutdown

    - Shutdown opmn & all managed processessoauser@sunsoapps1-tst config]$opmnctl shutdown

    13 Applying Oracle Interim Patch

    At times we may need to apply Oracle Interim Patch for Base Bug eg: 7576325.We need to get the approval from the SOA Manager (Kailash Randad) beforeapplying any patch.Please follow below steps to apply the patch on all the machines from DEV/TSTLogin to sunsoapps1-dev using your login and take sudo rigths>>su soauser and provide password>>Once you login you are logged as soai.e Logging on to 'SOA Dev (SOA)' environment>>Make sure all instances running under the ORACLE_HOME being patched arecleanly shutdown before installing this patch. Also ensure that the tool used to

    terminate the instance(s) has exited cleanly.>>opmnctl stopallMake sure all the instances are down and check status using>>opmnctl statusBefore applying the patch it has to be saved from metalink .oracle.com to ashared directory eg: /u/soauser/soa_downloads/soa_patches/7576325/>>cd /u/soauser/soa_downloads/soa_patches/7576325/Now you are in /u/soauser/soa_downloads/soa_patches/7576325/ directoryPlease check using pwd command as we need to make sure before we applypatchThen run the opatch from the patch directory after setting the PATH correctly as

    follows:>>setenv PATH ${PATH}:${ORACLE_HOME}/OPatch>>opatch lsinventory>>opatch apply>>Now start the instances using>>opmnctl startall>>opmnctl status(check if it is Alive or not)

  • 8/12/2019 SOA Suite 10g Developer Guide

    24/47

    SOA Suite 10g Developers Guide

    - 21 -

    >>Repeat the steps on sunsoapps2-dev and perform the same as to apply thepatchOnce you are done applying patch and tested successfully. We may need toapply the same on sunsoapps1-tst and sunsoapps2-tst14 How to perform Snapshot of nightly/weekly when files on a server gets

    corrupted/removed.

    At times (very rare) because of environment issues we may face the files gettingcorrupted/deleted from the server and we may need to have the snapshots of thehourly/Weekly .In such scenarios before performing snapshot we need to raise aticket to Unix ops for which it caused the files getting removed from the server.Next we need to get the approval from the SOA Manager (Kailash Randad).

    Please follow below steps to get the snapshot of the hourly/Weekly

    >> Login to the particular server eg: sunsoapps1-dev for which we have the

    issue and we need to take the snapshot.>> All the hourly/Weekly snapshots are stored under .snapshot folder and its ispresent under /oracle/product/.snapshot/

    >>Under /oracle/product/.snapshot/nightly.1 you may find the snapshot folder of102_app1 where you need to replace with the corrupted ones.

    >>Before performing the snapshots make sure all the services are bought downusing opmnct stopall and check the status using opmnctl status

    >>Next move the corrupted folder using move command

    cd /oracle/product

    mv 102_app1 102_app1.23JUL.ISSUE

    >>Now copy the nightly 102_app1 to /oracle/product using below command

    cp Rf /oracle/product/.snapshot/nightly.1/102_app1 /oracle/product/

    Once you are done with the copy bring up the services using opmnctl startall andcheck the status using opmnctl status.

    15 Developer jdev setup

    Oracle JDeveloper 10g is a complete and integrated development environmentfor standards-based SOA applications. The Oracle JDeveloper 10g Release 3(10.1.3) version adds many new features including a new look and feel, a greatlyimproved coding environment with extensive refactoring options, support for thelatest Java standards (J2SE 5.0, J2EE 1.4, EJB 3.0), and visual JSFdevelopment. A visual and declarative approach and the improved OracleApplication Development Framework (Oracle ADF) work together to simplifyapplication development and reduce mundane coding tasks, offering developers

  • 8/12/2019 SOA Suite 10g Developer Guide

    25/47

    SOA Suite 10g Developers Guide

    - 22 -

    unparalleled productivity regardless of their choice of technology stacks anddeployment platforms.

    Note:Currently we are using 10.1.3.3 for order management and Peoplesoftprojects

    15.1 Steps for Installing and Starting JDeveloper on Windows

    The complete installation (jdevstudio10133.zip) includes the Windows version ofJDK 5.0 Update 6 and the JDeveloper documentation.

    To install JDeveloper from jdevstudio10133.zip, unzip jdevstudio10133.zip in thedirectory you want to install JDeveloper. Ensure that this directory does notcontain spaces. For example, do not use C:\Program Files as the installationdirectory.

    Note:to represent the directory location in which JDeveloper was

    installed. For example, if JDeveloper was unzipped in c:\jdeveloper, thedirectory would be c:\jdeveloper.

    15.2 Starting JDeveloper on Windows

    To start JDeveloper on Windows, run any of the following files:

    \jdev\bin\jdevw.exe

    \jdev\bin\jdev.exe (to display a console window for internaldiagnostic information)

    \jdeveloper.exe

    Refer Jdeveloper documentation from below URLhttp://www.oracle.com/technology/documentation/jdev.html

    15.3 Below snapshot shows step by step explanation for jdeveloper usage.

    15.3.1 Create BPEL process

    a. Launch Jdev

    C:\jdevstudio10133\jdeveloper.exe

    b. Create a Jdev application

    Use menu option: File -> New

    Specify application name: HelloWorld

    On the last screen of the wizard Create Project hit Cancel

  • 8/12/2019 SOA Suite 10g Developer Guide

    26/47

    SOA Suite 10g Developers Guide

    - 23 -

  • 8/12/2019 SOA Suite 10g Developer Guide

    27/47

    SOA Suite 10g Developers Guide

    - 24 -

    c. Create a BPEL project inside the above application

    Use menu option: File -> New, see screenshot to pick BPEL

    Process Project

    Specify process name as: HelloWorldSync

    Specify process type as: Synchronous BPEL Process

    Last screen of the wizard Input/Output Elements go with

    Defaults, click Next.

  • 8/12/2019 SOA Suite 10g Developer Guide

    28/47

  • 8/12/2019 SOA Suite 10g Developer Guide

    29/47

    SOA Suite 10g Developers Guide

    - 26 -

    d. Update the BPEL process that is generated out of the box

    Insert an assign activity to copy the string from input variable

    to output variable

    This process returns the same string that is specified to

    initiate itself in other words, it is more of an echo process

    Screenshots below tell you how to create this assign activity

  • 8/12/2019 SOA Suite 10g Developer Guide

    30/47

    SOA Suite 10g Developers Guide

    - 27 -

  • 8/12/2019 SOA Suite 10g Developer Guide

    31/47

    SOA Suite 10g Developers Guide

    - 28 -

  • 8/12/2019 SOA Suite 10g Developer Guide

    32/47

    SOA Suite 10g Developers Guide

    - 29 -

    15.3.2 Deploy BPEL process

    e. Create App server connection (Dev)

    Step 1:Specify name: Dev_AppServer, type: Oracle

    Application Server 10g 10.1.3

    Step 2: Specify password: welcome1

    Step 3: Specify hostname: sunsoapps1-dev, port: 6004,

    instance name: oc4j_soa

    Step 4: Click on Test Connection to validate this connection

  • 8/12/2019 SOA Suite 10g Developer Guide

    33/47

    SOA Suite 10g Developers Guide

    - 30 -

    f. Create App server connection (Test)

    Step 1:Specify name: Test_AppServer, type: Oracle

    Application Server 10g 10.1.3

    Step 2: Specify password: welcome1

    Step 3: Specify hostname: sunsoapps1-tst, port: 6003,

    instance name: oc4j_soa

    Step 4: Click on Test Connection to validate this connection

  • 8/12/2019 SOA Suite 10g Developer Guide

    34/47

    SOA Suite 10g Developers Guide

    - 31 -

  • 8/12/2019 SOA Suite 10g Developer Guide

    35/47

    SOA Suite 10g Developers Guide

    - 32 -

    g. Create Integration server connection (Dev)

  • 8/12/2019 SOA Suite 10g Developer Guide

    36/47

    SOA Suite 10g Developers Guide

    - 33 -

    See screenshot below to see how to launch this wizard

    Step 1: Specify connection name as: Dev_BPEL

    Step 2: verify that Dev_AppServer is picked for app serverconnection, hostname: sunsoapps1-dev, port: 8888, also

    check the proxy exception checkbox

    Step 3: Test this integration server connection

    h. Create Integration server connection (Test)

    See screenshot below to see how to launch this wizard

    Step 1: Specify connection name as: Test_BPEL

    Step 2: verify that Test_AppServer is picked for app server

    connection, hostname: sunsoapps1-tst, port: 8888, also

    check the proxy exception checkbox

    Step 3: Test this integration server connection

  • 8/12/2019 SOA Suite 10g Developer Guide

    37/47

  • 8/12/2019 SOA Suite 10g Developer Guide

    38/47

    SOA Suite 10g Developers Guide

    - 35 -

    i. Deploy BPEL process using the integration server connection

    Use the screenshot below to refresh the BPEL connection to

    show the domains

    Then deploy to the default domain under Dev_BPEL (for dev

    environment), Test_BPEL (for test environment)

    Go with the default version 1.0 for the process

    Confirm per the last screenshot in this section to make sure

    that the deployment is successful

  • 8/12/2019 SOA Suite 10g Developer Guide

    39/47

    SOA Suite 10g Developers Guide

    - 36 -

  • 8/12/2019 SOA Suite 10g Developer Guide

    40/47

    SOA Suite 10g Developers Guide

    - 37 -

    15.3.3 Test BPEL processj. Launch the BPEL console

    Go to the BPEL console URL: http://sunsoapps1-

    dev:8888/BPELConsole

    Login using oc4jadmin/youAreWelcome

  • 8/12/2019 SOA Suite 10g Developer Guide

    41/47

    SOA Suite 10g Developers Guide

    - 38 -

  • 8/12/2019 SOA Suite 10g Developer Guide

    42/47

    SOA Suite 10g Developers Guide

    - 39 -

    k. Initiate an instance of the above deployed process

    By clicking on the process HelloWorldSync in the above

    screenshot

    Specify any string for input in the Initiate Instance page

    Click on Post XML Message to initiate an instance of this

    BPEL process

    l. Verify that the process is working

    You should see the same string that you specified as input

    as the output of this process

    See screenshot below

  • 8/12/2019 SOA Suite 10g Developer Guide

    43/47

    SOA Suite 10g Developers Guide

    - 40 -

    This folder contains instructions to patch the client Jdeveloper install to enablebpel process deployment from command line.

    This piece of functionality does not work out of the box. It needs to be patchedusing the below instructions. Below are the changes that need to be made to the

    following files residing in $JDEV_HOME/integration/bpel/utilities directory.

    Once the below changes are made to JDev installation, one should be able torun the following command from the jdev project directory to deploy the bpelprocess.

  • 8/12/2019 SOA Suite 10g Developer Guide

    44/47

    SOA Suite 10g Developers Guide

    - 41 -

    $ ant [-Doracle.home=] [-Dhostname=sunsoapps1-dev] [-Dhttp.port=8888]

    1. "oracle.home" corresponds to the root directory for Jdev installation; forexample: C:/Jdev. This parameter does not need to be specified ifORACLE_HOME environment variable is set to the same directory or if you havefollowed Tip #1 below.

    2. "hostname" and "http.port" are optional properties which are picked up from${oracle.home}.

    Below are the changes that you need to make in detail. One easy way to patchthese files is by overwriting the following three files from this directory into

    $JDEV_HOME/integration/bpel/utilities directory.

    1. ant-orabpel.properties

    2. ant-orabpel.xml

    3. bpel_build_template.xml

    ant-orabpel.properties

    ======================

    15c15

    < hostname = localhost

    ---

    > hostname = sunsoapps1-dev.corp.myOrg.com

    17c17

    < http.port = 9700

    ---

    > http.port = 8888

    ant-orabpel.xml

    ===============

    7,10c7,10

    <

  • 8/12/2019 SOA Suite 10g Developer Guide

    45/47

  • 8/12/2019 SOA Suite 10g Developer Guide

    46/47

    SOA Suite 10g Developers Guide

    - 43 -

    ---

    > rev="${rev}" classpath="${orabpel.tasks.class.path}"home="${bpel.home}"/>

    Tip #1: In the above change "20a21" to bpel_build_template.xml, the assumptionis that ORACLE_HOME environment variable will be set to the root Jdevdirectory in the shell that will be used for performing ant based deployment. Youcould instead specify the jdev root directory as the value of "oracle.home"attribute, given you are not going to move around your Jdev installation.

    16 Appendix A: Command cheat sheet

    Following are some of the commonly used commands on the Oracle App Servermid-tier:

    1) Start all componentsa) opmnctl startall

    2) Stop all componentsa) opmnctl stopall

    3) Show statusa) opmnctl status (basic containers)b) opmnctl status l (detailed containers)c) opmnctl status app (basic applications)d) opmnctl status app l (detailed applications)

    4) Deploy BPEL process (specified version) to specific host/port

    a) ant -Doracle.home=C:/Programs/JDev Drev=2.0 -Dhostname=web-devel3.corp.myOrg.com -Dhttp.port=8888

    5) Deploy ESB project to dev: ant -Dparam.target.env=dev DeployESBProjecta) Replace dev with test or prod appropriately

    6) Create a new container called dummya) createinstance -instanceName dummy -protocol ajp

    7) Restart a specific container say esbdeva) opmnctl restartproc process-type=esbdev

    8) Redeploy a specific applicationa) $ORACLE_HOME/jdk/bin/java -jar admin_client.jar

    deployer:oc4j:opmn://localhost:6005/esbdev oc4jadmin welcome1 -deploy

    -file ../../integration/esb/lib/oraesb-rt.ear -deploymentName esb-rt

  • 8/12/2019 SOA Suite 10g Developer Guide

    47/47

    SOA Suite 10g Developers Guide

    17 Appendix B: Resources

    Below is a list of useful resources for Oracle SOA stack based development:

    1. BPEL Foruma. http://forums.oracle.com/forums/forum.jspa?forumID=212

    2. SOA Foruma. http://forums.oracle.com/forums/forum.jspa?forumID=320

    3. Oracle SOA Suite Documentation (Manuals)a. http://download-

    east.oracle.com/docs/cd/B31017_01/nav/docindex.htm4. Oracle AS Adapters (Tutorials)

    a. http://www.oracle.com/technology/products/integration/adapters/dev_support.html

    5. http://www.sslshopper.com/article-most-common-java-keytool-keystore-commands.html