<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
   <title>Integration with Oracle E-Business Suite</title>
   <link rel="alternate" type="text/html" href="http://blogs.oracle.com/ebusinesssuiteintegration/" />
   <link rel="self" type="application/atom+xml" href="http://blogs.oracle.com/ebusinesssuiteintegration/xml/rss.xml" />
   <id>tag:blogs.oracle.com,2009:/ebusinesssuiteintegration//419</id>
   <updated>2009-11-03T12:23:25Z</updated>
   
   <generator uri="http://www.sixapart.com/movabletype/">Movable Type Enterprise 4.23-en</generator>


<entry>
   <title>Integration Repository Customization</title>
   <link rel="alternate" type="text/html" href="http://blogs.oracle.com/ebusinesssuiteintegration/2009/11/integration_repository_customi.html" />
   <id>tag:blogs.oracle.com,2009:/ebusinesssuiteintegration//419.15326</id>
   
   <published>2009-11-03T11:48:44Z</published>
   <updated>2009-11-03T12:23:25Z</updated>
   
   <summary>Oracle E-Business Suite (EBS) Integrated SOA Gateway (ISG) R12.1.1 supports customization of Integration Repository, allowing custom integration interfaces to be published along with Oracle seeded ones in the Integration Repository where they can be exposed to all users. Users can...</summary>
   <author>
      <name>Abhishek Verma</name>
      
   </author>
   
      <category term="Integration Repository" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://blogs.oracle.com/ebusinesssuiteintegration/">
      <![CDATA[<p><b>Oracle E-Business Suite (EBS) Integrated SOA Gateway (ISG) R12.1.1</b> supports customization of Integration Repository, allowing custom integration interfaces to be published along with Oracle seeded ones in the Integration Repository where they can be exposed to all users.</p><p><br />
Users can create and annotate custom interface definitions based on Integration Repository Annotation Standards. The custom interface metadata compiled in a generated iLDT file can be uploaded to Oracle Integration Repository through backend processing. After the upload, these custom integration interfaces are displayed together with Oracle seeded ones through the Integration Repository user interface based on the interface type they belong to. Integration Repository Administrator performs the same administrative tasks for custom integration interfaces as he does for native integration interfaces. These tasks include creating security grants, generating and deploying Web services.</p>

<p>Details on Integration Repository Customization can be found at <a href="http://blogs.oracle.com/integration_repository_customization">blog</a><br />
</p><div><br /></div>]]>
      
   </content>
</entry>

<entry>
   <title>Primer on Integration Repository</title>
   <link rel="alternate" type="text/html" href="http://blogs.oracle.com/ebusinesssuiteintegration/2009/10/primer_on_integration_reposito.html" />
   <id>tag:blogs.oracle.com,2009:/ebusinesssuiteintegration//419.14965</id>
   
   <published>2009-10-13T10:32:00Z</published>
   <updated>2009-10-13T12:20:04Z</updated>
   
   <summary>What is Integration Repository? Integration Repository is a catalog of Publicly defined annotated interfaces available in Oracle E-Business Suite applications.&#160;&#160; These interfaces are used by partners, consultants and developers for integration with any system, application, or business partner. These interfaces...</summary>
   <author>
      <name>Veshaal Singh</name>
      
   </author>
   
      <category term="Integration Repository" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://blogs.oracle.com/ebusinesssuiteintegration/">
      <![CDATA[<h4><strong>What is Integration Repository?</strong></h4>  <p align="justify">Integration Repository is a catalog of Publicly defined annotated interfaces available in Oracle E-Business Suite applications.&#160;&#160; These interfaces are used by partners, consultants and developers for integration with any system, application, or business partner.</p>  <p align="justify">These interfaces are classified by Product Family or Interface type. But what is an Interface Type? An Interface type is nothing but the underlying integration technology being used by the E-Business Suite to define public integration points e.g. PL/SQL api’s, Open Interface Tables, XML Gateway Map, EDI gateway Map, Java api etc.</p>  <h4><strong>How to Browse/Search?</strong></h4>  <p align="justify">There are three ways to browse the Integration Repository. Either by Product Family, Standard or Interface type. Here is the snapshot of the classification.</p>  <p>&#160;</p>  <p><a href="http://blogs.oracle.com/ebusinesssuiteintegration/WindowsLiveWriter/PrimeronIntegrationRepository_FA46/image_4.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="392" alt="image" src="http://blogs.oracle.com/ebusinesssuiteintegration/WindowsLiveWriter/PrimeronIntegrationRepository_FA46/image_thumb_1.png" width="522" border="0" /></a></p>  <p>&#160;</p>  <h4><strong>Where can I find Integration Repository?</strong></h4>  <p align="justify">For 11i release, there is a hosted instance available at <a href="http://irep.oracle.com/">irep.oracle.com</a>. </p>  <p align="justify">For release R12, the Integration Repository comes bundled with your Oracle E-Business Suite instance. In 12.0.X releases, Integration Repository is available as a Responsibility. But in 12.1.1 release, it is available under Integrated SOA gateway responsibility. </p>  <p align="justify">There is no hosted instance available for 12.0.X or 12.1.X releases.</p>  <p>In the next blog, I will discuss more on Integration Repository and the frequently asked questions around it.</p>]]>
      
   </content>
</entry>

<entry>
   <title>PLSQL vs Java Business Event System</title>
   <link rel="alternate" type="text/html" href="http://blogs.oracle.com/ebusinesssuiteintegration/2009/07/plsql_vs_java_business_event_s_1.html" />
   <id>tag:blogs.oracle.com,2009:/ebusinesssuiteintegration//419.13598</id>
   
   <published>2009-07-31T14:50:31Z</published>
   <updated>2009-07-31T21:37:44Z</updated>
   
   <summary> Oracle Workflow provides Business Event System implementation within the database and in the middle tier. The implementation is exactly the same in terms of the event subscription processing in both these layers but the only difference is how the...</summary>
   <author>
      <name>vijayakumar.shanmugam</name>
      
   </author>
   
      <category term="Oracle Workflow" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="jbes" label="JBES" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="workflowbusinesseventsystem" label="Workflow Business Event System" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://blogs.oracle.com/ebusinesssuiteintegration/">
      <![CDATA[<p/> Oracle Workflow provides Business Event System implementation within the database and in the middle tier. The implementation is exactly the same in terms of the event subscription processing in both these layers but the only difference is how the Developer wants to leverage Business Event System's capabilities for event processing requirements. With the availability of Business Event System implementation in PLSQL and Java, following subscription processing can be achieved.

<ol>
<li> Execute PLSQL rule function synchronously or asynchronously. Oracle Workflow provides a bunch of default rule functions in WF_RULE package for your use </li>
<li> Execute Java rule function synchronously or asynchronously. Oracle Workflow provides a default rule function oracle.apps.fnd.wf.bes.WebServiceInvokerSubscription to invoke web services. </li>
<li> Launch workflow process </li>
<li> Send event to an agent (AQ) </li>
</ol>

<p/> Workflow Business Events can be raised using one of two following ways.
<ol>
<li> PLSQL API WF_EVENT.Raise </li>
<li> Java method oracle.apps.fnd.wf.BusinessEvent.raise </li>
</ol>

<p/>As long as the call to these APIs does not throw an error, the event is raised successfully. There is a wrong notion among developers and administrators that all the events raised are enqueued to an agent (AQ) such as WF_DEFERRED or WF_JAVA_DEFERRED. No, it is not enqueued to an agent always, but it is driven based on how the subscription is defined. Now how are the event subscriptions dispatched and how to check the status of a subscription execution?

<p/> Subscriptions are either synchronous (phase < 100) or asynchronous (phase >= 100) with respect to the layer it is raised such as either PLSQL or Java and that layer's ability to dispatch the subscriptions. Following table gives an idea about how different subscriptions are dispatched.

<table bgcolor="#6b7f93" cellspacing="1" cellpadding="1" border="0">
<tr bgcolor="#ffffff"><th align="center" valign="top" maxcols="0">Scenario</th><th align="center" valign="top" maxcols="0">Event raised in</th><th align="center" valign="top" maxcols="0">Subscription type</th><th align="center" valign="top" maxcols="0">Subscription phase</th><th align="center" valign="top" maxcols="0">Agent (AQ) </th><th align="center" valign="top" maxcols="0">Dispatched by </th></tr>

<p><tr bgcolor="#ffffff"><td valign="top"> 1 </td><td valign="top"> PLSQL </td><td valign="top"> PLSQL </td><td valign="top"> &gt;=100 </td><td valign="top"> WF_DEFERRED </td><td valign="top">Workflow Deferred Agent Listener</td></tr><br />
<tr bgcolor="#ffffff"><td valign="top"> 2 </td><td valign="top"> PLSQL </td><td valign="top"> PLSQL </td><td valign="top"> &lt;100 </td><td valign="top">None</td><td valign="top"> Same session as WF_EVENT.Raise </td></tr><br />
<tr bgcolor="#ffffff"><td valign="top"> 3 </td><td valign="top"> PLSQL </td><td valign="top"> Java </td><td valign="top"> Any </td><td valign="top"> WF_JAVA_DEFERRED </td><td valign="top">Workflow Java Deferred Agent Listener</td></tr><br />
<tr bgcolor="#ffffff"><td valign="top"> 4 </td><td valign="top"> Java </td><td valign="top"> Java </td><td valign="top"> &gt;=100 </td><td valign="top"> WF_JAVA_DEFERRED </td><td valign="top">Workflow Java Deferred Agent Listener</td></tr></p>

<p><tr bgcolor="#ffffff"><td valign="top"> 5 </td><td valign="top"> Java </td><td valign="top"> Java </td><td valign="top"> &lt;100 </td><td valign="top">None</td><td valign="top"> Same session as BusinessEvent.raise() </td></tr><br />
<tr bgcolor="#ffffff"><td valign="top"> 6 </td><td valign="top"> Java </td><td valign="top"> PLSQL </td><td valign="top"> &gt;=100 </td><td valign="top"> WF_JAVA_DEFERRED </td><td valign="top">Workflow Java Deferred Agent Listener</td></tr></p>

<p><tr bgcolor="#ffffff"><td valign="top"> 7 </td><td valign="top"> Java </td><td valign="top"> PLSQL </td><td valign="top"> &lt;100 </td><td valign="top">None</td><td valign="top"> Same session as BusinessEvent.raise() </td></tr><br />
</table></p>]]>
      
   </content>
</entry>

<entry>
   <title>Invoking Web Service from Oracle Workflow process</title>
   <link rel="alternate" type="text/html" href="http://blogs.oracle.com/ebusinesssuiteintegration/2009/07/invoking_web_service_from_orac_1.html" />
   <id>tag:blogs.oracle.com,2009:/ebusinesssuiteintegration//419.13504</id>
   
   <published>2009-07-27T00:19:59Z</published>
   <updated>2009-07-30T22:10:32Z</updated>
   
   <summary> Introduction Integrated SOA Gateway (ISG) in Oracle EBusiness Suite 12.1 provides Service Invocation Framework (SIF) to natively consume and invoke web services. SIF uses Oracle Workflow Business Event System to provide necessary infrastructure to consume an abstract Web Service...</summary>
   <author>
      <name>vijayakumar.shanmugam</name>
      
   </author>
   
      <category term="Service Invocation Framework" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="soa" label="SOA" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="webserviceinvocation" label="Web Service Invocation" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="workflowbusinesseventsystem" label="Workflow Business Event System" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://blogs.oracle.com/ebusinesssuiteintegration/">
      <![CDATA[<h3><b> Introduction </b></h3>

<p/>Integrated SOA Gateway (ISG) in Oracle EBusiness Suite 12.1 provides Service Invocation Framework (SIF) to natively consume and invoke web services. SIF uses Oracle Workflow Business Event System to provide necessary infrastructure to consume an abstract Web Service and dynamically invoke the Web Service without requiring any design-time code generation. In this blog post we will see a specific use case of how to invoke web services from an Oracle Workflow process that is designed using Oracle Workflow Builder and executed in the database by the Oracle Workflow Engine.

<h3><b> SIF setup </b></h3>

<p/> Please refer to 12.1 ISG Developer Guider topic "Defining Web Service Invocation Metadata" under chapter "Working With Oracle Workflow Business Event System to Invoke Web Services" for detailed information on creating Business Event System meta-data. A summary of the steps are given below. 
<ol>
<li> Create an Invoker Business Event.
<li> Create a Local Subscription of Action Type "Invoke Web Services" to the invoker event.
<li> Create an Error subscription to the invoker event to handle any errors during invocation is also required. 
</ol>

<p/> Once the above Business Event System meta-data is created, raise the invoker Business Event to invoke the web service consumed within the Local event subscription. A Business Event can be raised either using a PLSQL API or a Java API. Hence, it can be assumed that SIF can be used to invoke web services from PLSQL or Java. 

<p/>The PLSQL API is WF_EVENT.Raise and the Java API is oracle.apps.fnd.wf.bes.BusinessEvent.raise. SIF run-time code executes only on Java tier (OACORE or Concurrent Tier). Raising the invoker event using Java API that already runs on middle tier causes the web service to be invoked synchronously and the response available to the caller immediately. Whereas if the invoker event is raised in PLSQL, the web service is invoked asynchronously by Workflow Java Deferred Agent Listener in Concurrent Tier. To receive the web service response back in the database in asynchronous mode following set up is required.
<ol>
<li> Create a callback business event and set it as part of the "Invoke Web Services" Local subscription. 
<li> Specify a callback agent such as WF_JMS_IN to which the callback event can be enqueued. You can create and use any workflow agent to receive the response.
<li> Create an External subscription to the callback event to handle the web service response from WF_JMS_IN.
</ol>

<p/> After successful invocation of the web service, the Java Deferred Agent Listener sets the response to callback event's payload and enqueues to the callback agent. Running event listener on the callback agent executes the External subscription to perform the specified action. With above setup we are now ready to invoke a web service by raising the invoker business event. The invocation can be tested using business event test page.

<h3><b> Invoking from Workflow Process </b></h3>

<p/> Workflow processes include standard event activities such as Raise event and Receive event. Since Workflow processes execute within the database we will use the PLSQL message pattern discussed above to invoke the web service from workflow processes. Following steps are required to successfully invoke web service from workflow process using SIF.

<h4><b>Create Raise Event activity</b></h4>
<p/> Use Raise Event activity to raise the invoker event. A function activity can be used to create input message required for the web service and set to the invoker event payload.

<h4><b>Create a Receive Event activity</b></h4> 
<p/> Use a Receive Event activity to receive the callback event in the workflow process. Callback event is raised after successful invocation of web service by Java Deferred Agent Listener.

<h4><b>Create an External Subscription to the callback event</b></h4>
<p/> Create an External subscription to the callback event with Workflow Type and Workflow Process set to the workflow process waiting to receive the web service response. The External subscription can also be used to simply execute a rule function to process the web service response.

<h3><b> Code Sample </b></h3>

<p/> Above use case is explained using a sample Workflow Process with required Business Event System meta-data. You may <a href="http://blogs.oracle.com/ebusinesssuiteintegration/INVDEMO.zip">download the sample code</a> for testing.

<h4> <b>Files Uploaded </b></h5>
<ol>
<li> WFINVTSTE.wfx - Invoker Event and Callback (Receive) Event</li>
<li> WFINVTSTS.wfx - Local "Invoke Web Service" Subscription to Invoker Event, Error Subscription to Invoker Event, External Subscription to Callback Event </li>
<li> WFINVTST.wft - The Workflow process that raises the Invoker Event and Receives the Callback Event</li>
<li> WFINVTSTS.pls - PLSQL spec for function activities used in above Workflow Process </li>
<li> WFINVTSTB.pls - PLSQL body for function activities used in above Workflow Process </li>
</ol>

<h4><b> Instructions to use sample </b></h4>
<ol>
<li> Upload *.wfx files using Workflow Business Event System loader program oracle.apps.fnd.wf.WFXLoad
<li> Upload *.wft file using Workflow Definitions Loader $FND_TOP/bin/WFLOAD
<li> Compile *.pls files to APPS schema
<li> Verify Workflow Java Deferred Agent Listener is up and running
<li> Launch Workflow using LAUNCH.sql script. The workflow process sends a notification with the web service response to a specified recipient after successful invocation of web service.
<li> Wait until Workflow Java Deferred Agent Listener completes execution of the "Invoke Web Service" subscription and enqueues response to WF_JMS_IN agent.
<li> Configure an Agent Listener to run against WF_JMS_IN or another appropriate Callback Agent that you want to use to listen to callback events. An easy way to run listener is exececute PLSQL API <b>WF_EVENT.Listen</b> from sqlplus connected to APPS schema.
</ol>

<p/> You may also launch the Workflow Process from Developer Studio and monitor the Workflow Process from Status Monitor functions available from Workflow Administrator Web Applications responsibility.]]>
      
   </content>
</entry>

<entry>
   <title>Native Services - EBS R12.1</title>
   <link rel="alternate" type="text/html" href="http://blogs.oracle.com/ebusinesssuiteintegration/2009/06/integrated_soa_gateway.html" />
   <id>tag:blogs.oracle.com,2009:/ebusinesssuiteintegration//419.12855</id>
   
   <published>2009-06-12T11:02:00Z</published>
   <updated>2009-06-12T13:13:11Z</updated>
   
   <summary>Steven Chan posted a blog&#160; which mentioned the presentation done by me and Neeraj.Chauhan in the last OOW’08.Continuing on the same thread, I would like to mention few basic and simple things in this blog. Starting 12.1 release of e-Business...</summary>
   <author>
      <name>Veshaal Singh</name>
      
   </author>
   
      <category term="Integrated SOA Gateway" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="ebs121soa" label="EBS 12.1 SOA" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="integratedsoagateway" label="Integrated SOA Gateway" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="invocation" label="Invocation" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="nativeservices" label="Native Services" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://blogs.oracle.com/ebusinesssuiteintegration/">
      <![CDATA[<p align="justify">Steven Chan posted a <a href="http://blogs.oracle.com/stevenChan/2008/10/native_service-oriented_architecture_in_ebs.html">blog</a>&#160; which mentioned the presentation done by me and Neeraj.Chauhan in the last OOW’08.Continuing on the same thread, I would like to mention few basic and simple things in this blog. </p>  <p align="justify">Starting 12.1 release of e-Business Suite, you not only have Native SOAP based Services available, but also you can invoke external web-services which can be consumed by existing running processes in EBS. Let us go little deeper into this.</p>  <p align="justify"><strong>Native Services from EBS</strong></p>  <p align="justify">From 12.1, Integration Repository allows you to generate and Deploy services for certain interfaces type by a click of a button. The interfaces which are supported on Integration Repository are PL/SQL api’s, XML Messages, Business Service Objects, Concurrent programs etc. </p>  <p align="justify">Here is a slide to explain it architecturally</p>  <p align="justify">&#160;</p>  <p align="justify"><a href="http://blogs.oracle.com/ebusinesssuiteintegration/WindowsLiveWriter/IntegratedSOASuite_E8C0/native_2.png"><img title="native" style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="350" alt="native" src="http://blogs.oracle.com/ebusinesssuiteintegration/WindowsLiveWriter/IntegratedSOASuite_E8C0/native_thumb.png" width="454" border="0" /></a> </p>  <p align="justify">The simple steps are:</p>  <ul>   <li>     <div align="justify">Identify the public PL/SQL api you are interested in exposing as a service by searching in the Integration Repository. </div>   </li>    <li>     <div align="justify">Generate a Service (WSDL) out of it, by pressing the<strong> Generate WSDL</strong> button. </div>   </li>    <li>     <div align="justify">Deploy the Service by pressing <strong>Deploy</strong> button. </div>   </li>    <li>     <div align="justify">Grant the permission as who can access this Service. </div>   </li> </ul>  <p align="justify">You are all set. Use any industry client, and you should be able to invoke EBS PL/SQL api as services from outside.</p>  <p align="justify">Here is a <a href="http://convergence.satpathy.org/2009/05/05/oracle/ebusiness-suite/oracle-e-business-suite-121-native-out-of-the-box-soap-based-web-services/">blog</a> written by my colleague Gautam Satpathy, who also works in the SOA Gateway team. It explains clearly how you can take a simple api like FND_PROFILE as a Web-Service and call it from outside.</p>  <p align="justify"><strong>Invocation of Services</strong></p>  <p align="justify">If you are interested in invoking an external web-service from an existing Workflow process, OA framework page or from a Java program, all you need to do is define a Business Event, and create a Subscription of type “Invoke Web Service”. You can easily pass parameters to the called web-service, and take the output of the web-service back into your calling process. </p>  <p align="justify">Here is a slide to explain it architecturally</p>  <p align="justify"><a href="http://blogs.oracle.com/ebusinesssuiteintegration/WindowsLiveWriter/IntegratedSOASuite_E8C0/invocation_2.png"><img title="invocation" style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="329" alt="invocation" src="http://blogs.oracle.com/ebusinesssuiteintegration/WindowsLiveWriter/IntegratedSOASuite_E8C0/invocation_thumb.png" width="494" border="0" /></a> </p>  <p align="justify">Again thanks to Gautam Satpathy for his <a href="http://convergence.satpathy.org/2009/05/06/oracle/ebusiness-suite/oracle-e-business-suite-r121-integrated-soa-gateway-service-invocation-framework/">blog</a> which takes the previously generated FND_PROFILE api as a web-Service and calls it using the Invocation framework in EBS.</p>]]>
      
   </content>
</entry>

<entry>
   <title><![CDATA[Gathering Stats for Workflow&rsquo;s Queue Tables]]></title>
   <link rel="alternate" type="text/html" href="http://blogs.oracle.com/ebusinesssuiteintegration/2009/04/gathering_stats_for_workflows.html" />
   <id>tag:blogs.oracle.com,2009:/ebusinesssuiteintegration//419.11509</id>
   
   <published>2009-04-24T10:28:00Z</published>
   <updated>2009-04-24T10:37:50Z</updated>
   
   <summary>Statistics gathering is an important activity in order to enable the cost based optimizer to take a decision on the execution plan to choose from the various possible ones with which a particular SQL statement can be run. It is...</summary>
   <author>
      <name>Ajay Verma</name>
      
   </author>
   
      <category term="E-Business Suite (EBS)" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="performance" label="Performance" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="workflow" label="Workflow" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://blogs.oracle.com/ebusinesssuiteintegration/">
      <![CDATA[<p>Statistics gathering is an important activity in order to enable the cost based optimizer to take a decision on the execution plan to choose from the various possible ones with which a particular SQL statement can be run. It is recommended to gather the statistics for an object when it is in steady state, i.e. when the corresponding tables have a fair amount of data giving out statistics which would lead the best execution plan to be picked by CBO.</p>  <p>From 10g onwards , Oracle database introduced Automatic Optimizer Statistics Collection feature in which a scheduled job GATHER_STATS_JOB runs in the nights and gathers stats for tables with either empty or stale statistics using <a href="http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_stats.htm#i1036461" target="_blank">DBMS_STATS</a>&#160; package APIs. This indeed is a great feature but for highly volatile tables such as AQ/Streams tables&#160; it is quite possible that when the stats collection job runs, these tables may not have the data that is representative of their full load period. One scenario can be stats collection on queue tables when they were empty, and the optimizer, as a result, choosing poor execution plans when they have a lot of data in them during normal workload hours.</p>  <p>As a direct fix to tackle the above issue, from 10gR2 database onwards, AQ table stats are getting locked immediately after its creation so that the auto stats collector doesn't change it in the future. This can be confirmed as below:</p>  <table cellspacing="0" cellpadding="0" width="621" bgcolor="#efefef" border="1"><tbody>     <tr>       <td valign="top" width="619">         <blockquote>           <pre>SQL&gt; CREATE TYPE event_msg_type AS OBJECT   
                  (  name            VARCHAR2(10), 
                     current_status  NUMBER(5),  
                     next_status     NUMBER(5)  
                   ); 
Type created.
--Create Queue Table
SQL&gt; EXEC DBMS_AQADM.create_queue_table(
              queue_table=&gt;'test_queue_tab',
              queue_payload_type=&gt;'event_msg_type')
PL/SQL procedure successfully completed. 
--Create Queue
SQL&gt; EXEC DBMS_AQADM.create_queue(queue_name =&gt;'test_queue',
                             queue_table=&gt;'test_queue_tab');
PL/SQL procedure successfully completed.
--Check for locks on stats
SQL&gt; select owner, table_name, stattype_locked
     from dba_tab_statistics
     where stattype_locked is not null
     and owner='APPS' and table_name='TEST_QUEUE_TAB';
OWNER       TABLE_NAME      STAT
---------- ---------------- ----- 
APPS        TEST_QUEUE_TAB   ALL 
--Gather stats
SQL&gt; EXEC dbms_stats.gather_table_stats('APPS','TEST_QUEUE_TAB')
BEGIN dbms_stats.gather_table_stats('APPS','TEST_QUEUE_TAB'); END; 
* 
ERROR at line 1: 
ORA-20005: object statistics are locked (stattype = ALL) 
ORA-06512: at &quot;SYS.DBMS_STATS&quot;, line 18408 
ORA-06512: at &quot;SYS.DBMS_STATS&quot;, line 18429 
ORA-06512: at line 1</pre>
        </blockquote>
      </td>
    </tr>
  </tbody></table>

<p>As we can see above , queue table stats are locked and hence further stats gathering fails. We can still go ahead and use <font face="Courier" color="#004080">force</font> parameter provided in <a href="http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_stats.htm#i1036461" target="_blank">DBMS_STATS</a> package to override any lock on statistics:</p>

<table cellspacing="0" cellpadding="0" width="621" bgcolor="#efefef" border="1"><tbody>
    <tr>
      <td valign="top" width="619">
        <blockquote>
          <pre>SQL&gt;exec dbms_stats.gather_table_stats('APPS','TEST_QUEUE_TAB'
					      ,force=&gt;TRUE)
PL/SQL procedure successfully completed.</pre>
        </blockquote>
      </td>
    </tr>
  </tbody></table>

<p></p>

<p></p>

<p>The recommended use is to gather statistics with a representative queue message load and keep the stats locked to avoid getting picked up by auto stats collector.</p>

<p><strong>What happens in Apps Instance?</strong></p>

<p>From Oracle Apps 11i&#160; (on top of Oracle Database 10gR2) instance onwards, the automatic statistics gathering job GATHER_STATS_JOB is disabled using $APPL_TOP/admin/adstats.sql , as can be confirmed below:</p>

<table cellspacing="0" cellpadding="0" width="621" bgcolor="#efefef" border="1"><tbody>
    <tr>
      <td valign="top" width="619">
        <blockquote>
          <pre> 
SQL&gt; select job_name, enabled from DBA_SCHEDULER_JOBS 
WHERE job_name = 'GATHER_STATS_JOB';
JOB_NAME                       ENABLE
------------------------------ ------
GATHER_STATS_JOB               FALSE	</pre>
        </blockquote>
      </td>
    </tr>
  </tbody></table>

<p></p>

<p>Oracle Apps provides separate concurrent programs which make use of procedures in FND_STATS package to gather statistics for apps database objects. FND_STATS is basically a wrapper around DBMS_STATS and is recommended by Oracle for stats collection in Oracle Apps environment because of the flexibility it provides in identifying the objects with empty and stale stats. The modification threshold ( % of rows used to estimate) is fixed to 10% in DBMS_STATS while it can vary from 0 to 100% incase of FND_STATS.</p>

<p>But FND_STATS doesn't provide the <font face="Courier">force</font> parameter to override any lock on statistics and hence fails while gathering statistics for a queue table whose stats are locked :</p>

<table cellspacing="0" cellpadding="0" width="621" bgcolor="#efefef" border="1"><tbody>
    <tr>
      <td valign="top" width="619">
        <blockquote>
          <pre> 
SQL&gt; select owner, table_name, stattype_locked ,last_analyzed
  2   from dba_tab_statistics where table_name='WF_DEFERRED'
  3  and owner='APPLSYS';
OWNER          TABLE_NAME      STATT LAST_ANAL
-------------- --------------- ----- ---------
APPLSYS        WF_DEFERRED     ALL   23-FEB-09
SQL&gt; exec fnd_stats.gather_table_stats('APPLSYS','WF_DEFERRED');
BEGIN fnd_stats.gather_table_stats('APPLSYS','WF_DEFERRED'); END;
*
ERROR at line 1:
ORA-20005: object statistics are locked (stattype = ALL)
ORA-06512: at &quot;APPS.FND_STATS&quot;, line 1505
ORA-06512: at line 1	</pre>
        </blockquote>
      </td>
    </tr>
  </tbody></table>

<p>The same error is observed on running the Gather Table Statistics concurrent program for such queue tables. Gather Schema Statistics concurrent program in general skips the table incase any error is encountered while gathering its stats and hence the queue tables with locked stats are also skipped.</p>

<p>Hence currently ,&#160; in order to carry out stat collection for Workflow queue tables whose stats are locked,the approach should be to unlock the queue table temporarily using DBMS_STAT’s <a href="http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_stats.htm#i1045149" target="_blank">Unlock</a> APIs when the table have a representative load for the correct stats to be gathered, gather the statistics using FND_STATS and lock it again.</p>

<table cellspacing="0" cellpadding="0" width="621" bgcolor="#efefef" border="1"><tbody>
    <tr>
      <td valign="top" width="619">
        <blockquote>
          <pre>SQL&gt; begin
  2    dbms_stats.unlock_table_stats('APPLSYS','WF_DEFERRED');
  3    fnd_stats.gather_table_stats('APPLSYS','WF_DEFERRED');
  4    dbms_stats.lock_table_stats('APPLSYS','WF_DEFERRED');
  5  end;
  6  /
PL/SQL procedure successfully completed.
SQL&gt; select owner, table_name, stattype_locked ,last_analyzed
  2  from dba_tab_statistics where table_name='WF_DEFERRED'
  3  and owner='APPLSYS';
OWNER            TABLE_NAME       STATT LAST_ANALYZED
---------------- ---------------- ----- -------------
APPLSYS          WF_DEFERRED      ALL   12-APR-09	</pre>
        </blockquote>
      </td>
    </tr>
  </tbody></table>

<p>Another approach can be to unlock the WF queue table stats during the adpatch run itself as Oracle’s automatic stats collection feature is disabled in Apps environments and the stats collection in general occurs through the Apps provided concurrent programs. What say? </p>]]>
      
   </content>
</entry>

<entry>
   <title>Looping within a Workflow Process</title>
   <link rel="alternate" type="text/html" href="http://blogs.oracle.com/ebusinesssuiteintegration/2009/03/looping_within_a_workflow_proc.html" />
   <id>tag:blogs.oracle.com,2009:/ebusinesssuiteintegration//419.10970</id>
   
   <published>2009-03-24T07:12:06Z</published>
   <updated>2009-03-24T12:18:17Z</updated>
   
   <summary>While designing a workflow process there seems to be a general tendency to make the process as granular as possible.Each steps are broken into several simpler steps, which are executed as part of separate workflow activities. It does give a...</summary>
   <author>
      <name>Ajay Verma</name>
      
   </author>
   
      <category term="E-Business Suite (EBS)" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="layman" label="Layman" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="loops" label="Loops" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="workflow" label="Workflow" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://blogs.oracle.com/ebusinesssuiteintegration/">
      <![CDATA[<p>While designing a workflow process there seems to be a general tendency to make the process as granular as possible.Each steps are broken into several simpler steps, which are executed as part of separate workflow activities. It does give a much finer understanding of the business processes to the end user.But sometimes this drive to 'make it simpler' can get us into different kinds of complexities. </p>  <p>Lets see this with one particular example: </p>  <p>Below is a simplified version of a workflow process part we came across recently:</p>  <p><a href="http://blogs.oracle.com/ebusinesssuiteintegration/WindowsLiveWriter/LoopingwithinaWorkflowProcess_1288E/Loop_1.jpg"><img title="Loop" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; margin-left: 0px; margin-right: 0px; border-right-width: 0px" height="206" alt="Loop" src="http://blogs.oracle.com/ebusinesssuiteintegration/WindowsLiveWriter/LoopingwithinaWorkflowProcess_1288E/Loop_thumb_1.jpg" width="177" border="0" /></a> </p>  <p><strong>&#160;&#160;&#160;&#160;&#160; Fig : Process 1</strong></p>  <p>Here, notifications were being sent using workflow looping wherein completion of an activity causes a transition to another activity that has already been completed earlier. ‘Get Recipient’ activity in this particular case was determining the suitable notification recipient based on certain business rules while ‘Send Notification’ activity simply made use of Notification System’s <a href="http://download.oracle.com/docs/cd/B14099_19/integrate.1012/b12163/notapi10.htm#a_send" target="_blank">Send()</a> API to send the notification to the identified recipient. The loop ended when no more eligible recipient were found.</p>  <p>Two issues were observed in this particular set up:</p>  <p>1. The process taking too long a time (&gt;40 hours) to complete when notifications were being sent to around 35K users.</p>  <p>2. The rate at which notifications were being created decreased as the time passed, i.e initially when the process started , around 12-16 notifications(for the respective recipient) got created per second and later this rate got reduced to one notification in 2 minutes.</p>  <p>The issue was reproducible in a separate instance for say 2500 notifications with same observations as mentioned above.It took more than 3 hours for the process to complete and the rate of notification creation did decreased with time.</p>  <p>Now see the below process extract wherein the two activities in Process 1 have been merged into a single activity:</p>  <p><a href="http://blogs.oracle.com/ebusinesssuiteintegration/WindowsLiveWriter/LoopingwithinaWorkflowProcess_1288E/no_loop.jpg"><img title="no_loop" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="88" alt="no_loop" src="http://blogs.oracle.com/ebusinesssuiteintegration/WindowsLiveWriter/LoopingwithinaWorkflowProcess_1288E/no_loop_thumb.jpg" width="176" border="0" /></a>&#160; </p>  <p><strong>&#160;&#160;&#160;&#160;&#160; Fig : Process 2</strong></p>  <p></p>  <p>The activity simply does the job being carried out by those in Process 1 but within a PL/SQL loop rather than the workflow loop:</p>  <p>--------------------------------------------------------------</p>  <p>Loop Starts</p>  <p>&#160;&#160;&#160; Get Recipient Logic</p>  <p>&#160;&#160;&#160; Send Notification to the identified recipient</p>  <p>Loop ends</p>  <p>--------------------------------------------------------------</p>  <p>The process 2 completed for 2500 notifications in less than 2 minutes ! And there was no noticeable performance degradation in the rate at which notifications were created.</p>  <p>So , what made the difference?</p>  <p>In general , internally for each execution of a workflow loop , a number of extra DML statements will run while re-executing the same function activity again and again. And workflow never issue any intermediate commits while executing a given flow until it reaches the end of the flow or a blocking activity. Hence the overall DMLs in Process 1 would result in heavy usage of redo logs and rollback segments until a commit happens. The workflow engine in effect is unnecessarily stressed by the loop here leading to performance deterioration when this long running workflow loop can be easily avoided as done in Process 2.</p>  <p>At the end, from a developer perspective use your own judgement and common sense to decide on how granular your workflow process should be such that it doesn't hits us somewhere else as demonstrated above.</p>]]>
      
   </content>
</entry>

<entry>
   <title>JAAS for e-Business Suite</title>
   <link rel="alternate" type="text/html" href="http://blogs.oracle.com/ebusinesssuiteintegration/2009/02/jaas_for_ebusiness_suite.html" />
   <id>tag:blogs.oracle.com,2009:/ebusinesssuiteintegration//419.10399</id>
   
   <published>2009-02-19T14:44:00Z</published>
   <updated>2009-02-23T19:22:36Z</updated>
   
   <summary>Technorati Tags: e-Business Suite JAAS LoginModule This is an extension to the blog posted by Steven Chan which highlighted my session on Java Authentication and Authorization (JAAS) for e-Business Suite at the OOW&apos;08. Let us look at how does the...</summary>
   <author>
      <name>Veshaal Singh</name>
      
   </author>
   
      <category term="Technology" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="authentication" label="Authentication" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="authorization" label="Authorization" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="jaas" label="JAAS" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="ebusinesssuiteintegration" label="e-Business Suite Integration" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://blogs.oracle.com/ebusinesssuiteintegration/">
      <![CDATA[<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:583cb64a-3209-4e2d-916b-507997ce53cb" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/e-Business+Suite+JAAS+LoginModule" rel="tag">e-Business Suite JAAS LoginModule</a></div>  <p align="justify">This is an extension to the blog posted by Steven Chan which highlighted my session on <a href="http://blogs.oracle.com/stevenChan/2008/10/java_authentication_authorization_services_jaas_for_ebs.html">Java Authentication and Authorization (JAAS) for e-Business Suite</a> at the OOW'08. Let us look at how does the LoginModule helps in doing the Authentication and Authorization with the current architecture of EBS(e-Business Suite).</p>  <p><em><strong><font size="4">Authentication</font></strong></em></p>  <p align="justify">In e-Business Suite , we store the user information mainly at two places. If EBS is single sign on (SSO) enabled, Oracle Internet Directory(OID) stores user credentials. Otherwise FND_USER table stores user credentials. The LoginModule carries out the Authentication transparently without an application having to know as how the EBS instance is configured.</p>  <p><strong><em><font size="4">Authorization</font></em></strong></p>  <p align="justify">In EBS the authorization is done either on Function or on a Role. In a <strong>Function Based Authorization</strong>,each time a user accesses a function, a runtime check is made if the user is granted the function through a responsibility. If yes, the access is permitted, otherwise the access is denied. From&#160; 11.5.10 release onwards, EBS supports Role based access control (RBAC) mechanism through which a given user is granted a set of roles that allows access to a particular resource. In <strong>Role Based Authorization</strong>, the same principle is used in the&#160; implementation of LoginModule. The roles assigned to a given user are used for authorization checks.</p>  <p>Time to take an example and explain in detail. So here we go.</p>  <p><em><strong>Using &amp; Configuring e-Business Suite JAAS LoginModule</strong></em></p>  <p align="justify">Let us configure a simple HelloWorld servlet to use Oracle EBS LoginModule. Assume that you want HelloWorld servlet to be accessed only by valid EBS users having EBS role called 'UMX|HELLOWORLD'. You can download the sample code from internet for HelloWorld servlet. Lets call this instance 'EBS' and assume that HelloWorld servlet is running on an external Application server called 'MYSERVER'. The configuration steps are as follows:</p>  <ol>   <li>     <div align="justify">Apply the ARU patch 7211409 on the EBS instance 'EBS'. This is the same instance against which HelloWorld servlet authenticates and authorizes its users. </div>   </li>    <li>     <div align="justify">Successful patch application on 'EBS' creates a signed jar file called fndext.jar in $FND_TOP/java/jar directory. This is the jar file that contains the JAAS LoginModule implementation. </div>   </li>    <li>     <div align="justify">Download this jar file to 'MYSERVER'. This is the same application server where HelloWorld servlet is running. To download file, you can simply use any FTP tool. </div>   </li>    <li>     <div align="justify">Create a war file consisting WEB-INF/lib/fndext.jar, WEB_INF/classes/helloworld/HelloWorld.class and WEB-INF/web.xml. Sample <a href="http://blogs.oracle.com/ebusinesssuiteintegration/jaas/web.xml">web.xml</a> is provided below for your convenience. </div>   </li>    <li>     <div align="justify">Configure HelloWorld servlet to use EBS Login Module for Authentication and Authorization. The below steps are for OC4J for Oracle Application Server. For other Application Server, please refer to application server specific documentation. </div>      <ul>       <li>         <div align="justify">Open Enterprise Manager's Application Server Control page. </div>       </li>        <li>         <div align="justify">Deploy your application. One of the steps during your application deployment is to specify ‘Security Provider’ . The page is displayed asking for which JAAS login Module Class to use and its parameters. </div>       </li>        <li>         <div align="left">For Login Module Class, you have to specify oracle.apps.fnd.ext.jaas.security.auth.login.AppsLoginModule. This class takes two mandatory parameters: ConnectionMode and ConnectionReference. You have add these two parameters for this class.</div>          <ul>           <li>             <div align="justify">Enter the value for ConnectionMode parameter as ‘datasource’. The value of ‘datasource’ directs AppsLoginModule class to use a datasource object to connect to EBS database. </div>           </li>            <li>             <div align="justify">The JNDI reference to the above datasource is mentioned in the parameter ConnectionReference. Configure a datasource for EBS instance and enter this JNDI reference name for the value of ConnectionReference parameter. For example, ‘jdbc/appsDs’</div>           </li>         </ul>       </li>     </ul>   </li>    <li>     <div align="justify">Create a role called 'UMX|HELLOWORLD' on e-Business Suite instance i.e. EBS. Follow the steps below </div>   </li> </ol>  <ul>   <ul>     <li>       <div align="justify">Login into the connecting E-Business Suite instance EBS as SYSADMIN. This is the instance which you want your application to authenticate and authorize its users. </div>     </li>      <li>       <div align="justify">Navigate to User Management Roles &amp; Role Inheritance. </div>     </li>      <li>       <div align="justify">Click on Create Role button. </div>     </li>      <li>       <div align="justify">Create a role called UMX|HELLOWORLD. </div>     </li>      <li>       <div align="justify">Now, Navigate to User Management users. </div>     </li>      <li>       <div align="justify">Assign the role UMX| HELLOWORLD to all users that you want to have access to your HelloWorld Servlet application. </div>     </li>   </ul> </ul>  <p align="justify">Ready to test!! </p>  <p align="justify">Try accessing your application. You will be authenticated and then allowed access if authorized, i.e., if you are granted the role UMX|HELLOWORLD.</p>]]>
      
   </content>
</entry>

<entry>
   <title>Application Data Source</title>
   <link rel="alternate" type="text/html" href="http://blogs.oracle.com/ebusinesssuiteintegration/2008/11/application_data_source.html" />
   <id>tag:blogs.oracle.com,2008:/ebusinesssuiteintegration//419.8631</id>
   
   <published>2008-11-16T18:41:35Z</published>
   <updated>2008-11-16T19:13:55Z</updated>
   
   <summary>E-business Suite now provides a Standard Data Source (javax.sql.DataSource) which can be used for an e-business database connectivity from J2EE application servers. You can configure this data source the same way as any other standard Data Source in your application...</summary>
   <author>
      <name>Veshaal Singh</name>
      
   </author>
   
      <category term="Best Practices" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="appsadapter" label="Apps Adapter" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="appsdatasource" label="Apps Data Source" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="datasource" label="Data Source" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="ebsadapter" label="EBS Adapter" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://blogs.oracle.com/ebusinesssuiteintegration/">
      <![CDATA[<p>E-business Suite now provides a <strong>Standard Data Source (javax.sql.DataSource)</strong> which can be used for an e-business database connectivity from J2EE application servers. You can configure this data source the same way as any other standard Data Source in your application server. The administrators of both, e-Business Suite instance and the Application Server, needs to configure the data source accordingly.</p>

<p>Let me provide a brief-overview of the steps involved from both administrators.</p>

<p>E-Business Suite Administrator:<br />
1. If you are an 11i customer, please download the following patch 6930112 from <a href="http://metalink.oracle.com">Meta-link</a>. For R12 customers, the patch comes bundled with the <a href="http://updates.oracle.com/ARULink/PatchSearch/process_form?bug=7237006#uage=0&process=Submit">Oracle Applications Technology Update Pack 12.0.6 </a>(Patch 7237006) <br />
2. Create a new Application User and grant the 'UMX|APPS_SCHEMA_CONNECT’ role.<br />
3. Register the Application Server instance as a trusted node by running the AdminDesktop utility on e-Business Suite instance.</p>

<p>Application Server Administrator:<br />
1. Download the fndds.jar from the e-business Suite application tier.<br />
2. Configure OC4J server with fndds.jar as a shared library.<br />
3. Create a new connection pool using the application data source. <br />
4. Provide the credentials of the newly created Application user.<br />
5. Create a Data source using the above connection pool.</p>

<p>Now you are all set to use the new Data Source for database connectivity to an e-business suite instance. For detailed instructions,please refer to the readme in the metalink patches provided above.</p>

<p>Please stay tuned for more on Best Practices for Apps Adapter.</p>]]>
      
   </content>
</entry>

</feed>
