Monday, September 16, 2019

12c SOA sensors

Introduction:
  • Sensor feature provides the ability to define track-able fields on messages and enables us to find a specific composite instance by searching for a field or fields within a message. For example, a sensor could be defined for an Employee Id within a message, thus allowing us to search and find the instance where the employee id in question is found.
  • While this functionality is not new within Oracle SOA Suite 12c, there are some improved capabilities that have been included in this release.
  • When we create sensors in a composite it will creates following 2 files:
    1. sensor.xml: Contains the sensor definitions of a BPEL process
    2. sensorAction.xml: Contains the sensor action definitions of a BPEL process
  • Composite sensors can be defined within a SOA composite application in several components:
    1. Service component (exposed service)
    2. Reference component (external reference)
    3. Mediator or BPEL component that have subscribed to a business event (publishing an event cannot have a sensor)
Service Component level:







Reference Component level:








Deploy and test:







Mediator subscribed to business event level:








In BPEL, We can also have 3 types of sensors.
  • Activity sensors⇾Activity sensors are used to monitor the execution of activities within a BPEL process. For example, they can monitor the execution time of an invoke activity or how long it takes to complete a scope. Along with the activity sensor, you can also monitor variables of the activity.
  • Variable sensors⇾ Variable sensors are used to monitor variables (or parts of a variable) of a BPEL process. For example, variable sensors can monitor the input and output data of a BPEL process.
  • Fault sensors⇾Fault sensors are used to monitor BPEL faults.


12c SOA - Domain value Map (DVM)

Introduction:
  • DVM enables you to map from one vocabulary used in a given domain to another vocabulary used in a different domain. For example, one domain may represent a Country with a long name (INDIA), while another domain may represent a Country with a short name (IN). In such cases, you can directly map the values by using domain value maps. 
  • Domain value map values are static. You specify the domain value map values at design time using Oracle JDeveloper, and then at runtime, the domain value map columns are looked up for values. 
  • We can also add/modify the DVM values from SOA composer.
Note: To use dynamic value mapping, XREF(Cross Reference) is used.

Here we will show the mapping from Country codes to Country names using DVM.

Implementation steps:
Step1: Create an empty project and a XSD for input and output of the service.







XSD used:
<?xml version="1.0" encoding="windows-1252" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.emp.text"
            targetNamespace="http://www.emp.text" elementFormDefault="qualified">
  <xsd:element name="EmployeeInput">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="EmpId" type="xsd:string"/>
        <xsd:element name="EmpName" type="xsd:string"/>
        <xsd:element name="EmpCountryCode" type="xsd:string"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="EmployeeOutput">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="EmpId" type="xsd:string"/>
        <xsd:element name="EmpName" type="xsd:string"/>
        <xsd:element name="EmpCountryName" type="xsd:string"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>

Step2: Create a DVM for mapping from Country codes to Country Names.




Step3: Create Synchronous BPEL Process and use the DVM function in assign activity to map to the response,





Format :
dvm:lookupValue(dvmMetadataURI as string, SourceColumnName as string,SourceValue as string, TargetColumnName as string, DefaultValue as string) as string. 

It expects dvm to be used, source column name and source column value to be looked for in dvm and target column name whose corresponding value will be derived from DVM and a default value if nothing matched from the DVM.
Note: Here I have imported the created DVM in SOA MDS and then used the oramds path.

Step4: Deploy and test.



Thursday, September 12, 2019

12c SOA Weblogic - EDNTopic - Quota blocking time exceeded and no quota available

Error details:
Caused by: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: file://wsdl/eis/wls/EDNxaDurableTopic-OUTBOUND.wsdl [ eis/wls/EDNxaDurableTopic-OUTBOUND::enqueue(part,part) ] - WSIF JCA Execute of operation 'enqueue' failed due to: ERRJMS_PROVIDER_ERR.
ERRJMS_PROVIDER_ERR.
Unable to produce message due to JMS provider internal error.
; nested exception is:
BINDING.JCA-12165
ERRJMS_PROVIDER_ERR.
ERRJMS_PROVIDER_ERR.
Unable to produce message due to JMS provider internal error.
Please examine the log file to determine the problem.
Caused by: javax.jms.ResourceAllocationException: weblogic.messaging.kernel.QuotaException: Quota blocking time exceeded and no quota available
at weblogic.messaging.dispatcher.Request.getResult(Request.java:522)
at weblogic.jms.dispatcher.Request.getResult(Request.java:64)
... 66 more

Solution:
You're facing is a high count of EDN messages, a quota on the EDN topic and that somehow not all messages get deleted. Each EDN Quota has a limit setup the number of messages it can store in a destination. Whenever that message quota limit reached, the associated destination is unable to store more messages and gets failed.

Following way you can handle it.
  • Increasing the Quota message limit size
Increasing the Quota message limit size:

Step1: First check what the EDNQuota is set. by default it is set as 50000.
Steps to check EDNQuota from admin console:




Steps to check EDNQuota from EM console:




Step2: Check the current Persistent sores(used in the EDNTopic) read count



Step3: Change the EDN Quota Maximum messages to the expected message limit.
If  persistent store message read count > maximum EDNQuota messges, change the EDN Quota to the optimum needed level.

Go to Admin console⇾Services⇾Messaging⇾ JMS Module⇾ SOAJMSModule⇾ EDNQuota ⇾Messages Maximum.
In my case persistent store message read count=50090 > maximum EDNQuota messges(50000), so I changed it to 60000.

Note: There is another solution to this issue. We can use Time-To-Live Override parameter of the Topic as in expiry mode by setting the Time-To-live value to a sensible value, greater than 0. It's in mili seconds. I would say, regarding the meaning/purpose of EDN, that an event should be processed within 15 minutes. So a value of 900000 would be sensible in most cases. But the TTL parameter is in effect for new events. Existing events/messages in your store aren't affected.


12c SOA - Advance Queue - what is Dequeue Condition and how to configure it.

What is Dequeue Condition:
  • Dequeue Condition allows to filter the messages that a Message Consumer will receive.
  • When a dequeue is performed from a multi consumer queue, it is sometimes necessary to screen the messages and accept only those that meet certain conditions. These conditions can be based on payload or queue header values and is specified using DequeueCondition property of the AQ adapter. 
How to configure Dequeue Condition :
When configuring the Dequeue AQ in jdeveloper, you will find the below screen where you will provide correlation id and dequeue condition.
Enter a Boolean expression similar to the WHERE clause of a SQL query. This expression can include conditions on message properties, user data properties (object payloads only), and PL/SQL or SQL functions.

Dequeue Condition
The format for the condition to use:
tab.user_data.field_name = 'some value to be matched'

In JCA file condition looks like below:
<property name="DequeueCondition" value="tab.user_data.ITEM_PUBLISHER = 'ABP'"/>

Following the object type used and based on the field ITEM_PUBLISHER, I want to filter and dequeue the messages.
CREATE OR REPLACE TYPE ITEM_TYPE AS OBJECT (
ITEM_ID NUMBER(4),
ITEM_NAME VARCHAR2(30),
ITEM_PUBLISHER VARCHAR2(30)
);

If you want to know how to create AQ adapter enqueue and dequeue step by step, click here oracle-12c-aq-adapter-enqueue-and-dequeue.



Monday, September 9, 2019

12c Jdeveloper - Disable "Build After Save"

When we are developing a project and intermediately we need to save the project and to proceed further with the development, we see the project gets to build phase after each save which takes unnecessary time to complete the project development. Instead, we can disable the "Build after Save" option and continue development without any interruption and whenever we want, we can make/build it.

Step1: Go To Tools->Preferences->Code Editor->Save Actions


Step2: Remove "Build Project After Save" action


12c Jdeveloper - Application is disabled and not able to create new SOA or OSB projects

Sometimes you face that application is disabled and are not able to create any soa/ osb projects. There are several reasons of getting this issue:
  • Suppose you have opened the Java Developer / other preferences by mistake while opening the Jdeveloper.
  • The cause of this problem is that you once had other (non-SOA Suite 12c) JDeveloper installation and by default, both use the same user dir.
New Application disabled

In order to run SOA's JDeveloper correctly, you need to set the correct ide.user.dir path. 

Follow the steps:
Step1: Re-install the Jdeveloper in different location and go to Jdeveloper Oracle_Home/Jdeveloper/Jdev/bin folder and open the Jdev.boot file.
C:\Oracle\Middleware\Oracle_Home\jdeveloper\jdev\bin

Step2: Add ide.user.dir path where Jdeveloper has been installed.

ide.user.dir = C:/Oracle/Middleware/Oracle_Home/jdeveloper/system

Step3: Now open the Jdeveloper.exe 




Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...