Search This Blog

Steps to delete data from MDS ( soa-inrfa ) 11g

In my previous blog I explained how to add content in MDS repository . Removing content is very simple compared with adding.I don't have any idea about how to remove data in MDS ( GUI mode ).


WSLT ( weblogic scripting tool )


$ oracle/Middleware/oracle_common/common/bin

$ wlst.sh

Make a connection to weblogic server .

wls:/offline> connect('weblogic','********','t3://localhost:7001')



already MDS Contains fault-policies.xml

/apps/com/xsd/fault-policies.xml


wls:/offline> deleteMetadata(application='soa-infra',server='AdminServer',docs='/apps/com/xsd/fault-policies.xml')

application -- > soa-infra
server        -->  Adminsever is not mandatory . eg : soa_sever1  ( Managed servers )
docs         -->   /apps    by default , then file location.





wls:/offline> deleteMetadata(application='soa-infra',server='AdminServer',docs='/apps/**')

** will delete all the files, so be careful while using this command

Done ............

Oracle Metadata Services (MDS) repository Oracle SOA-MDS / BPM-MDS 11g


MDS  - Matadata Service.

Why MDS ?

 From Development to Production moving complete code to server from Jdveloper and maintain complete code base version .

Two types of MDS :
     
  1. File system MDS :
                             

 Advantage :  File system MDS are useful in terms of maintain complete xsd,wsdl,xml,etc  in same system .so when ever developers want to change any elements in xsd,wsdl,xml,etc are very frequently.

If I use file system MDS during development time  , then how weblogic server will understand  the local file system reference during run time ???

simple create jar ,then  convert into soa-bundle and deploy to the server. so in adf-config.xml file system MDS URL are not hard coded . I would suggest to use file system MDS.

Dis-advantage :   Multiple developers not able to use during development .


 2. Database MDS :

Advantage :  During development time multiple developers can share the same wsdl,xml,xsd  from Database MDS.


Dis-advantage :  MDS URL hard code in adf-config.xml ,when we generate configuration plan. those MDS URL are not  a part of any reference or as a service.


Example :  Business Analysist  create BPM template and those templates are saved in MDS repository . Developer job to check out the complete template  code and develop the process .

I listed few usage of MDS .



Step to create File system MDS Connection :


 create folder name apps in below location  :

              Jdeveloper11.6\jdeveloper\integration\seed

apps --> place xsd, wsdl, xml , etc ..

Resource Palette - > IDE Connection - > SOA - MDS 



now  make reference to  file system MDS in adf-config.xml . 

ApplicationResource - > Descriptors - > ADF  META-INF - > adf-config.xml 

 <?xml version="1.0" encoding="windows-1252" ?>
<adf-config xmlns="http://xmlns.oracle.com/adf/config"
            xmlns:config="http://xmlns.oracle.com/bc4j/configuration"
            xmlns:adf="http://xmlns.oracle.com/adf/config/properties"
            xmlns:sec="http://xmlns.oracle.com/adf/security/config">
  <adf-adfm-config xmlns="http://xmlns.oracle.com/adfm/config">
    <defaults useBindVarsForViewCriteriaLiterals="true"/>
    <startup>
      <amconfig-overrides>
        <config:Database jbo.locking.mode="optimistic"/>
      </amconfig-overrides>
    </startup>
  </adf-adfm-config>
  <adf:adf-properties-child xmlns="http://xmlns.oracle.com/adf/config/properties">
    <adf-property name="adfAppUID" value="BPELAsResApplication.Krishna"/>
  </adf:adf-properties-child>
  <sec:adf-security-child xmlns="http://xmlns.oracle.com/adf/security/config">
    <CredentialStoreContext credentialStoreClass="oracle.adf.share.security.providers.jps.CSFCredentialStore"
                            credentialStoreLocation="../../src/META-INF/jps-config.xml"/>
  </sec:adf-security-child>
  <adf-mds-config xmlns="http://xmlns.oracle.com/adf/mds/config">
    <mds-config xmlns="http://xmlns.oracle.com/mds/config">
      <persistence-config>
        <metadata-namespaces>
          <namespace metadata-store-usage="mstore-usage_1" path="/soa/shared"/>
          <namespace metadata-store-usage="mstore-usage_2" path="/apps"/>
          </metadata-namespaces>
        <metadata-store-usages>
          <metadata-store-usage id="mstore-usage_1">
            <metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">
              <property value="${oracle.home}/integration"
                        name="metadata-path"/>
              <property value="seed" name="partition-name"/>
            </metadata-store>
          </metadata-store-usage>
          <metadata-store-usage id="mstore-usage_2">
            <metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">
              <property value="${oracle.home}/integration"
                        name="metadata-path"/>
              <property value="seed" name="partition-name"/>
            </metadata-store>
          </metadata-store-usage>
         </metadata-store-usages>
      </persistence-config>
    </mds-config>
  </adf-mds-config>
</adf-config>

as I mentioned earlier  during development time apps folder reference in local system , but when the same deployed in weblogic server. Reference inside adf-config.xml automatically resolve during runtime.


Step to create SOA_Bundle ( MDS weblogic server ) and Database MDS :

yet to define .......

Add custom jars/functions(Java) in Oracle BPM 11g Jdev / SOA Infrastructure




       Add custom jars/functions(Java) in Environment:

A)     Need to build java file and make it as jar.


B)     In Jdeveloper (Local), needs to add jar as follows;
a.      Open Tools  --> Preferences
b.      Select SOA from left side
c.       Click Add button to add jar file.
d.      Restart JDeveloper.
e.      Check by opening any XSL Transformation and click on drop down which appears left, top.

f.        Choose User-Defined from that drop down.
g.      User Defined Functions and Templates will be available.
h.      Click on User-Defined Functions and see your method which available in customized jar.


C)     Need to mention location of the jar in the BpelClasspath

a.      First we need to copy the jar file in the following location 

/opt/Oracle/Middleware/Oracle_SOA1/soa/modules/oracle.soa.ext_11.1.1

b.      Then, In Oracle BPM 11G EM(Enterprise Manager), find SOA Infrastructure Menu
c.       Select  SOA Administration àBPEL Properties
d.      Click on BpelcClasspath tab
e.      In the Value field, specify the classpath where placed jars.
f.        Click Apply and Run.
g.      Restart Server.


Thanks to Nambi .

SOA / BPM 11g Fault Handling Framework ( fault-policies.xml , fault-bindings.xml )

SOA / BPM 11g Fault Handling Framework ( fault-policies.xml , fault-bindings.xml  )


Fault Handling Framework :

" Happy Path " always a big term in BPM World . More than a " Happy Path " , Exception Handling  is important in terms of Real time business.

SOA Fault Handling Framework :

Exception Handling in terms of BPM :

1. Boundary Event --> Each activity level .
2. Event Sub-Process --> Process Level .

Exception Handling in terms of BPEL :

1. Catch.
2.Catch All.
3. Rethrow.


How to archive Exception Handling in Application level  ?????????????

SCA is very important in terms of SOA Application ( Composite.xml )

Composite.xml :

Add following piece of code inside composite.xml


 <property name="oracle.composite.faultPolicyFile">fault-policies.xml</property>
 <property name="oracle.composite.faultBindingFile">fault-bindings.xml</property>


Fault Handlining :

1. Fault-bindings.xml


<?xml version="1.0" encoding="UTF-8" ?>
<faultPolicyBindings version="2.0.1" xmlns="http://schemas.oracle.com/bpel/faultpolicy"
xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance">
<composite faultPolicy="KrishnaFaults"/>
</faultPolicyBindings>


2. Fault-policies.xml

<?xml version="1.0" encoding="UTF-8" ?>
<faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy">
  <faultPolicy version="2.0.1" id="KrishnaFaults"
               xmlns:env="http://schemas.xmlsoap.org/ soap/envelope/"
               xmlns:xs="http://www.w3.org/2001/XMLSchema"
               xmlns="http://schemas.oracle.com/bpel/faultpolicy"
               xmlns:xsi="http://www.w3.org/2001/ XMLSchema-instance">
   

 <Conditions>
          <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
                 name="bpelx:remoteFault">
        <condition>
          <action ref="ora-retry"/>
        </condition>
      </faultName>
    </Conditions>


    <Actions>
      <Action id="my-java-handler">
        <javaAction className="soatraining.faulthandling. MyFaultHandler"
                    defaultAction="ora-terminate" propertySet="myProps">
          <returnValue value="OK" ref="ora-rethrow-fault"/>
        </javaAction>
      </Action>

      <!-- Retry -->
      <Action id="ora-retry">
        <retry>
          <retryCount>4</retryCount>
          <retryInterval>2</retryInterval>
          <exponentialBackoff/>
        </retry>
      </Action>

      <!-- Rethrow action -->
      <Action id="ora-rethrow-fault">
        <rethrowFault/>
      </Action>
      <!-- Human Intervention -->
      <Action id="ora-human-intervention">
        <humanIntervention/>
      </Action>
      <!-- Terminate -->
      <Action id="ora-terminate">
        <abort/>
      </Action>
    </Actions>
    <Properties>
      <propertySet name="myProps">
        <property name="logFileName">myfaulthandler.log</property>
        <property name="logFileDir">c:\temp</property>
      </propertySet>
    </Properties>
  </faultPolicy>
</faultPolicies>




Conditions and Action are very important in Fault-policies.xml.