Sunday, October 14, 2012

AIA Configuration and Dynamic Partnerlink Lookup in 11g

All AIA functions are documented at : http://docs.oracle.com/cd/E23549_01/doc.1111/e17364/apndxxpaths.htm, however to deal with AIA config file, I think three functions comes most handy:  

  • aia:getSystemProperty 
  • aia:getSystemModuleProperty 
  • aia:getServiceProperty  
Properties in AIA Configuration file are modularized at three levels and there are three separate functions to retrieve those properties. Below is example:


Preference can be stored at System, System Module or Service level. Endpoint URLs for specific composite are usually stored at Service level, however it can be stored at Module or System Module level for a specific use case.

Here is BPEL code to read the configuration:

    <assign name="Demo_Assign_AIAConfig">
      <copy>
        <from>aia:getSystemProperty('Routing.ActiveRuleset',true())</from>
        <to>$SystemProperty</to>
      </copy>
      <copy>
        <from>aia:getSystemModuleProperty('ErrorHandler','COMMON.ERRORHANDLER.IMPL',true())</from>
        <to>$SystemModuleProperty</to>
      </copy>
      <copy>
        <from>aia:getServiceProperty('{http://xmlns.oracle.com/TestApplication/AIAConfigurationPOC/AIAConfigurationProcess}AIAConfigurationProcess','MyServiceProperty',true())</from>
        <to>$ServiceProperty</to>
      </copy>
    </assign>


For Dynamic Partnerlink Lookup:

    <assign name="Assign_EndpointURI">
      <copy>
        <from>aia:getServiceProperty('{http://xmlns.oracle.com/TestApplication/AIAConfigurationPOC/AIAConfigurationProcess}AIAConfigurationProcess','Routing.helloWorld.EndpointURI',true())</from>
        <to>$helloWorldEndPointURI</to>
      </copy>
    </assign>
    <invoke name="InvokeHelloWorld"
            partnerLink="HelloWorld" portType="ns1:SyncBPELProcess"
            operation="process" inputVariable="HelloWorldInput"
            outputVariable="HelloWorldOutput" bpelx:invokeAsDetail="no">
      <bpelx:toProperties>
        <bpelx:toProperty name="endpointURI" variable="helloWorldEndPointURI"/>
      </bpelx:toProperties>
    </invoke>



To update the value in AIAConfigurationProperties.xml:
  • update the value and upload to MDS using usual script 
  • login to http://host:port/AIA -> Setup -> AIA Configuration -> Reload 

No comments: