Monday, May 30, 2011

Overload leads to timeout errors

Sometimes integration scenarios can receive a bulk load from an application, especially when the source application uses batches as the trigger for sending out messages. This load can lead to the following non-retryable SOAP errors in the ESB:
Fault message:
Failed to enqueue deferred event "oracle.tip.esb.server.dispatch.QueueHandlerException:
Context lookup failed "[CONFIGURATION ERROR] Invalid Destination "Topics/ESB_JAVA_DEFERRED" :
javax.jms.InvalidDestinationException: Looking up java:comp/resource/esbRP/Topics/ESB_JAVA_DEFERRED:
javax.naming.NameNotFoundException: No resource named 'esbRP/Topics/ESB_JAVA_DEFERRED'found.
Please verify configuration of adminobject or the lookup string."
Make sure the topic is mapped to a jndi tree"


This behaviour is described in an Oracle note [ref: note ID 1173584.1] with the following solution: increase the timeout settings. Together with two other Oracle notes describing how to avoid BPEL errors due to adapters response time and what timeout settings in SOA can impact AIA [ref: note ID 1074227.1 and 885114.1] this leads to the following timeout settings:

  • xa_timeout in $SOA_HOME/integration/esb/config/esb_config.ini
    Default: 60; recommended setting: 3600
  • jms_receive_timeout in $SOA_HOME/integration/esb/config/esb_config.ini
    Default: 30; recommended setting: 300
  • Also according to another Oracle note [ref: note ID 752385.1] you might want to set PingCount and PingInterval to 30 in $SOA_HOME/integration/esb/config/esb_config.ini
  • syncMaxWaitTime in $SOA_HOME/bpel/domains/default/config/domain.xml
    Default: 45; recommended setting: 600
  • transaction-timeout in $SOA_HOME/j2ee/oc4j_soa/application-deployments/orabpel/ejb_ob_engine/orion-ejb-jar.xml (change this value for all 6 occurences of transaction-timeout in this file)
    Default: up to 3000; recommended setting: 3600
  • transaction-timeout in $SOA_HOME/j2ee/[container]/config/transaction-manager.xml (change this value for all containers: e.g. home, designtime and runtime [oc4j_soa])
    Default: from 300 to 3600; recommended setting: 7200
  • Timeout in $SOA_HOME/Apache/Apache/conf/httpd.conf
    Default: 300; recommended setting: 300, this option specifies the amount of time Apache will wait for a GET, POST, PUT request and ACKs on transmissions. The default is 300 (seconds) however this may need to be increased.

The settings in the $ORACLE_HOME/integration/esb/config/esb_config.ini file apply to all ESB instances in the Oracle Home. One small bonus feature: if you have many BPEL processes deployed and you experience long waiting times in the ESB Console: put a lazyLoad property in the esb_config.ini file and the waiting time is gone [ref: Bug 7720420].
esb.console.services.lazyLoad.Allowed=true
It's a little confusing regarding the file orion-application.xml, different notes say different things, one note mentions the location in application-deployments which overrides esb_config.ini, another note mentions the location under applications which overrides esb_config.ini. Just to be safe and consistent check the orion-application.xml file in the following locations and if they are present and not commented out apply the values mentioned above for the xa_timeout, jms_receive_timeout, PingCount and PingInterval:
$SOA_HOME/j2ee/[ESB_RUNTIME_CONTAINER]/application-deployments/esb-rt/orion-application.xml
$SOA_HOME/j2ee/[ESB_RUNTIME_CONTAINER]/applications/esb-rt/META-INF/orion-application.xml
$SOA_HOME/j2ee/[ESB_DESIGNTIME_CONTAINER]/application-deployments/esb-dt/orion-application.xml
$SOA_HOME/j2ee/[ESB_DESIGNTIME_CONTAINER]/applications/esb-dt/META-INF/orion-application.xml


The above changes also take care of the following errors in the container logfile from $SOA_HOME/opmn/logs:
ORABPEL-05002
ORABPEL-02182
JTA transaction is not present the transaction is not in active state
Message handle error


Instead of increasing the timeout settings for the BPEL processes a more durable solution would be to throtte the inbound flow. There is an activation agent (bpel.xml) property (since 10.1.3.1), which can be used to control the speed at which the adapter posts messages to BPEL [ref: note ID 1178163.1 or Oracle® SOA Suite Best Practices Guide 10g Release 3 (10.1.3.3.0) E10971-01 December 2007]
...
    <activationAgents>
      <activationAgent partnerLink="JmsDequeuePL" ... >
          <property name="minimumDelayBetweenMessages">1000</property>
      </activationAgent>
    </activationAgents>
  </BPELProcess>
</BPELSuitcase>

This setting ensures that there at least will be 1000 milliseconds delay between two consecutive messages being posted to this BPEL process.

Actually this last best practices guide provides many valuable tips, like
  • Performance tuning guidelines.
  • Answers to frequently asked questions about threading.
  • Answers to frequently asked questions about transactions.
  • How to optimize the JVM heap. The heap size controls the amount of memory the JVM can use.
  • How to relieve the dehydration store by making BPEL processes synchronous.
  • Description of performance persistence parameters in bpel.xml.
  • WSIF binding (localhost) and EJB binding optimization.
  • The relationship among some performance settings
  • The objectives and best practices for creating the BPEL cluster.
  • Increasing the instanceKeyBlockSize to 100,000. Doing so decreases the frequency at which Oracle BPEL Server visits the dehydration store.

Some best practices should be considered during design and development time, like the BPEL parameters that are configured per BPEL component, whether a BPEL process should be synchronous or asynchronous and whether it should participate in a transaction or not. Other best practices are SOA Suite wide and should be part of the overall configuration, like the start-up memory settings.

Updated June 6, 2011 with LazyLoad, PingCount and PingInterval, another location of the orion-application.xml file and jms_receive_timeout to 300.

Monday, May 23, 2011

Instance wide XML manipulations

If the input file is a plain xml file without namespaces declared the following error occurs (at least when xml validation is set to 'strict'):
<invalidVariables xmlns="http://schemas.oracle.com/bpel/extension"><part name="code">
<code>9710</code></part><part name="summary">
<summary>Invalid xml document.
According to the xml schemas, the xml document is invalid. The reason is: Error::cvc-elt.1: Cannot find the declaration of element 'TestXSD'.
Please make sure that the xml document is valid against your schemas.</summary></part></invalidVariables>


Solution: create in the consumer routing service (the component after the file-reader, postfixed with _RS) the following transformation, first check if the wanted namespace is included in the namespace declarations, otherwise map one field to get all the namespaces declared. Then add the following code in the xsl:
<xsl:stylesheet version="1.0" xmlns:test="http://www.mydomain.com/TestXSD">
<xsl:template match="*">
  <xsl:element name="test:{local-name()}" namespace="http://www.mydomain.com/TestXSD">
    <xsl:apply-templates select="@*|node()"/>
  </xsl:element>
</xl:template>


This code is based on the "identity" template, which was introduced with an example in the XSLT Recommendation itself [ref: www.w3.org]:
<xsl:template match="@*|node()">
  <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
  </xsl:copy>
</xsl:template>


Some explanation here: "node()" is shorthand for child::node(). That is node() matches all nodes (element, text, comment, processing-instruction) being children of other nodes but not attributes since they are not considered children of their parent element. To find all nodes in order to copy them, we need to match both nodes being children of other nodes, node(), and attributes, @*, that is: match="@*|node()".

This template copies everything recursive from source to target, all the attributes and nodes. Copying everything in itself is no fun but becomes very useful when we add exceptions or conditions to the copying. Here two transformations that copy all the nodes and attributes if:
  • They have content: RemoveEmptyNodes.xsl
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:template match="@*|node()">
        <xsl:if test=". != ''">
          <xsl:copy>
            <xsl:apply-templates select="@*|node()"/>
          </xsl:copy>
        </xsl:if>
      </xsl:template>
    </xsl:stylesheet>
  • They have content or the node contains an attribute with content: RemoveEmptyNodesKeepAttributes.xsl
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:template match="@*|node()">
        <xsl:if test=". != '' or ./@* != ''">
          <xsl:copy>
            <xsl:apply-templates select="@*|node()"/>
          </xsl:copy>
        </xsl:if>
      </xsl:template>
    </xsl:stylesheet>

These templates can replace one of Oracle's best practices [ref: Oracle® Application Integration Architecture - Foundation Pack 2.5: Integration Developer's Guide Release 2.5 Part No. E16465-01 December 2009], adding the RemoveEmptyNodes transformation after the main mapping fulfills:
Transformation logic and XPath should be designed with the possibility of missing or empty elements
<xsl:if test="normalize-space(Line3/text())">
  <Line3>
    <xsl:value-of select="Line3/text()"/>
  </Line3>
</xsl:if>

The above templates can save you the time-consuming conditional mapping per element. Just don't forget if the mapping contains empty placeholders (like EBMHeader/EBMTracking/ExecutionUnitID) then fill these first with an assign before calling the RemoveEmptyNodes. Also the element EBMHeader/DataArea/[verb] is a required field. This can be solved with both templates:
  • RemoveEmptyNodes.xsl: include in the template an exclusion of this element (the [verb] is Create here):
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:corecom="http://xmlns.oracle.com/EnterpriseObjects/Core/Common/V2">
      <xsl:template match="@*|node()">
        <xsl:if test=". != ''">
          <xsl:copy>
            <xsl:apply-templates select="@*|node()"/>
          </xsl:copy>
        </xsl:if>
      </xsl:template>
      <xsl:template match="corecom:Create">
        <xsl:copy-of select="."/>
      </xsl:template>
    </xsl:stylesheet>
  • RemoveEmptyNodesKeepAttributes.xsl: fill an optional attribute of this field, although not the most elegant solution...

Wednesday, May 18, 2011

Cloud Forum 2011

The Cloud Forum 2011 Spring Edition in Media Plaza, Utrecht was not really what I hoped for. My expectations were to learn about the cloud and SOA, but what I learned at the forum was mostly about the technical infrastructure. Then again, when you're consuming services from the cloud you have already a SOA (Service Oriented Architecture) in place, so the focus should change from SOA integration to SOA governance and SOA security. Unfortunately my curiosity about SOA governance and SOA security was not satisfied, maybe next year?

One session from Mike Chung was interesting, he placed the cloud hype back in perspective. To identify a cloud Mike gave us the following mnemonic 0 - 1 - ∞:
0 - zero investments
1 - one version
- unlimited scalability

Mike also wrote, together with John Hermans, the KPMG Cloud advisory [ref: From Hype to Future (pdf)]. It's a nice read, this cloud computing survey of 2010.

Cloud computing offers services on various IT layers. When it is at the software layer it is also known as Software-as-a-Service (SaaS). Gmail is an example of SaaS. Platform-as-a-Service (PaaS) delivers IT services on the platform layer such as an operating system or an application framework. Additional software must be developed or installed by the customer. Infrastructure-as-a-Service (IaaS) delivers technical infrastructure components such as storage, memory, CPU and network. Additional platforms and software must be installed by the customer.

The cloud computing market is dominated by very few vendors as the 'Big Four': Amazon, Google, Microsoft and Salesforce.com
SaaS (Software + Platform + Infrastructur): Salesforce.com, Microsoft BPOS, Gmail
PaaS (Platform + Infrastructur): GoogleApps, Force.com, 3tera AppLogic, Azure
IaaS (Infrastructur): Amazon EC2, AppNexus, Citrix Cloud

Basically cloud is the new hype-in-progress and fast-evolving. Yet there is a lack of vendors/standards/certifications, a good initiative can be found in the U.S. with FedRAMP [ref: FedRAMP]:
The Federal Risk and Authorization Management Program has been established to provide a standard approach to Assessing and Authorizing (A&A) cloud computing services and products. FedRAMP allows joint authorizations and continuous security monitoring services for Government and Commercial cloud computing systems intended for multi-agency use.

When will Europe follow?

Still today I learned a nice quote from a head of architecture of a firm in the industrial markets sector:
"We are still using our locally installed ESB and BPM software. Cloud computing is great for relatively simple services such as e-mail and CRM. When it comes to complex architectures such as SOA, a cloud is pretty much useless."

What do terms like AIA, EBO, EBS, etc. mean?

Oracle has it's own guide to explain all the AIA terms, the AIA Concepts and Technologies Guide [ref: Oracle® Application Integration Architecture -Foundation Pack 2.5: Concepts and Technologies Guide Release 2.5 Part No. E15762-01 October 2009]. Here a overview of the terms AIA, EBO, EBM, ABO, ABM, EBS, EBF, ABCS, BSR, CAVS, PIP, SOA, ESB and BPEL with their explanation:

AIA - Application Integration Architecture
Oracle Application Integration Architecture Foundation Pack provides Oracle's best-practice methodology and reference architecture, which are based on a profound service-oriented foundation running on Oracle's best-in-class middleware suites. Application Integration Architecture defines a common vocabulary across applications and industries. EBOs are the key elements in this context. They canonically describe standard business entities such as an order or an invoice. Based on these generic business entities, Application Integration Architecture delivers other artifacts such as EBSs, EBMs, EBFs, and ABCSs.
Basically AIA delivers you the integration framework including a canonical model.

EBO - Enterprise Business Object
You can think of EBOs as canonical, application-agnostic representations of frequently used business entities. The architecture starts with the concept of Enterprise Business Objects (EBOs). EBOs can be considered as application-independent representations of key business entities.
Basically EBOs are the objects moving between applications.

EBM - Enterprise Business Message
An EBM is the message format that is specific to the input or output of an EBS operation. Enterprise Business Service operations require specific message formats called Enterprise Business Messages (EBMs) for service requests and responses.
Basically EBMs are the envelopes containing the EBOs.

ABO/ABM - Application Business Objects/Messages
The Oracle AIA canonical model exists of the EBOs and EBMs. Outside the canonical domain are the application-specific formats, these can be objects and messages, respectively ABOs and ABMs. Every application has it's own set of ABOs and ABMs.
Basically ABOs and ABMs are application specific objects and envelopes.

EBS - Enterprise Business Service
An EBS provides the generic operations that an EBO should have. Enterprise Business Services (EBSs) are the centerpiece of the AIA Reference Architecture. They implement the required operations on EBOs in the right coarse-grained granularity that SOAs demand. For every EBO, Application Integration Architecture also ships generic service definitions to cover standard operations such as create, update, query, delete, and sync.
Basically EBSs are the routing services.

EBF - Enterprise Business Flow
An EBF orchestrates a number of EBSs to implement a complex integration flow. Sometimes, the integration scenario is not just a simple requester-provider relationship. In those cases, an Enterprise Business Flow (EBF) orchestrates any number of EBSs required to implement a specific business flow. The EBF completely controls the business logic and calls the appropriate EBS methods.
Basically EBFs are the orchestrations spanning multiple EBO's and/or applications.

ABCS - Application Business Connector Service
An ABCS implements a particular service operation in the context of a specific application. To enable applications to integrate into these generic, application-independent structures, you can implement Application Business Connector Services (ABCSs). Such an ABCS calls or is called by the appropriate EBS, depending on whether the application is in the requestor or provider role in a particular scenario. The main responsibilities of ABCSs include: conversion between the generic EBO and the application-specific format (ABO), cross-referencing of key attributes and message validation, and conversation with the specific application.
Basically ABCSs are the application-specific services per EBM.

BSR - Business Service Registry
The BSR stores and provides information about the objects, messages, and services that compose the integration scenarios in your Oracle AIA ecosystem. An integration scenario refers to the end-to-end (requester participating application-to-provider participating application) flow of a message. The BSR presents the components of your integration scenarios in a centrally managed and searchable repository, enabling it to become the system of record for your business services.
Basically BSR stores services, test-definitions and application-information.

CAVS - Composite Application Validation System
The CAVS enables you to test integration web services without the deployed participating applications in place. Using a framework that includes initiators to simulate calls to participating applications and simulators to simulate responses from participating applications, CAVS provides a system that can test integrations while also eliminating the need to set up deployments of all participating applications that are involved in the integration. The CAVS provides a test repository, an execution engine, and a user interface.
Basically CAVS is a testing framework.

PIP - Process Integration Pack
Prebuilt process integration packs (PIPs) from Oracle use the Oracle AIA to deliver composite industry processes for specific industries, using software assets from Oracle's portfolio of applications. Most of these solutions encompass orchestrated process flows, as well as prebuilt data integration scenarios that are meant to seamlessly connect the systems.
Basically PIPs are off-the-shelf integrations.

SOA - Service Oriented Architecture
Oracle AIA relies upon a SOA for integrations. SOA is an approach for defining an architecture based on the concept of a service. SOA applications are integrated at the service specification point, not at the application interface. This allows application complexities to be separated from the services interface, and diminishes the impacts of back-end interface and application changes. Service-oriented integration leverages messages to communicate between consumers and providers and uses XML schemas and transports such as SOAP to transport messages.
Basically SOA is integrating using (web)services.

ESB - Enterprise Service Bus
In integrations where it makes sense, Oracle AIA also relies on ESB. An ESB is the underlying infrastructure for delivering SOA. Oracle AIA uses Oracle Enterprise Service Bus as the foundation for services using SOA. It enables interaction through services that encapsulate business functions and supports service routing and the substitution and translation of transport protocols.
Basically ESB and BPEL are the engines driving Oracle SOA Suite. ESB is used for application adapters and routing rules (EBSs).

BPEL - Business Process Execution Language
Business Process Execution Language (BPEL), short for Web Services Business Process Execution Language (WS-BPEL) is an OASIS standard executable language for specifying actions within business processes with web services. Processes in Business Process Execution Language export and import information by using web service interfaces exclusively.
Basically BPEL and ESB are the engines of the Oracle SOA Suite. BPEL is used for transformations (ABCSs) and orchestrations (EBFs).

Tuesday, May 17, 2011

Sending an email from BPEL

Sending an email message from a BPEL Component is described in the Oracle BPEL guide [ref. Oracle® BPEL Process Manager Developer’s Guide 10g (10.1.3.1.0) B28981-03 January 2007]. But here are two different methods described: sending an email with a body and sending an email with two attachments. How to send an email with both a body and an attachment? The solution here is to use the second method (two attachments) and empty the BodyPartName of the first attachment, this attachment will then become the body of the email:
xmlns:notifsrvc="http://xmlns.oracle.com/ias/pcbpel/NotificationService"

<partnerLinks>
  <partnerLink name="NotificationService" partnerRole="NotificationServiceProvider" partnerLinkType="notifsrvc:NotificationServiceLink"/>
</partnerLinks>

... (population of varNotificationReq/EmailPayload)

<assign name="Remove_BodyPartName">
  <copy>
    <from expression="string('')"/>
    <to variable="varNotificationReq" part="EmailPayload" query="/EmailPayload/notifsrvc:Content/notifsrvc:ContentBody/notifsrvc:MultiPart/notifsrvc:BodyPart[1]/notifsrvc:BodyPartName"/>
  </copy>
</assign>

<invoke name="InvokeNotificationService" partnerLink="NotificationService" portType="notifsrvc:NotificationService" operation="sendEmailNotification" inputVariable="varNotificationReq" outputVariable="varNotificationResponse"/>

EBO customizations

Sometimes the EBO does not contain the elements for the information you have as part of this business object. For this case Oracle offers customization xsd's for each EBO and generic customization xsd's for common components to extend the EBO with needed elements and dataypes.

When you are going to extend an EBO, first try to find an existing common component to use for your attributes. Example when extending the EBO with street and housenumber, use the address datatype from common components. Sometimes the datatype of the used element is not known in the custom xsd, for this you have to add an import as well, for example if a common component is needed in CustomCommonComponents.xsd:
<xsd:import namespace="http://xmlns.oracle.com/EnterpriseObjects/Core/Common/V2" schemaLocation="../../../Common/V2/CommonComponents.xsd"/>

Also determine whether the information is new/updated or a reference to information already known by the systems. Example when sending a new or updated address information use AddressDatatype, when sending a reference to a known address then use AddressReference as referenceType.

If the addition is a just one element then choose the datatype from one of the Infrastructure datatypes (\EnterpriseObjects\Infrastructure\V1\DataTypes.xsd). Example when an element is needed to indicate whether something is fragile, add a fragileIndicator of datatype IndicatorType from this DataTypes list.

In order to maintain backwards compatibility always make customizations optional (minOccurs='0') to avoid validation errors in current messages. Check similar EBOs for consistency.

Besides the good practice to document the customizations in the custom xsd itself (as a comment in the header), it is very useful to have a spreadsheet with all the customizations documented. For example with the following columns: Filename of EBO, Type extended, Name of element added, User added and Date added. To keep track of removals the following two columns can be added as well: User removed and Date removed, just be careful when removing customizations as they can be used by other projects already.

Monday, May 16, 2011

AIA configuration properties

AIA brings us a very nice solution for maintaining variables in one global AIAConfigurationProperties.xml file (kind of ini-file) which are used at runtime. This is the perfect place for e.g. the systemID (application system id) which is used in the code to identify the application for DVM and XRef translations. Also is this systemID used to populate the EBMHeader Sender segment with information from the BSR (Business Service Repository) when the EBM is created in the BPEL RequesterABCSImpl component.

All the aia functions are described and explained in the AIA Development Guide [ref: Oracle® Application Integration Architecture - Foundation Pack 2.5: Integration Developer's Guide Release 2.5 Part No. E16465-01 December 2009].

Creation of the EBM Header in the transformation xsl file:
<xsl:variable name="serviceName" select="'{http://xmlns.oracle.com/ABCSImpl/[Application]/Core/[ABCSName]/V1}[ABCSName]'"/>
<xsl:variable name="systemID" select="aia:getServiceProperty($serviceName,'Default.SystemID',true())"/>
<xsl:variable name="senderNodeVariable" select="aia:getEBMHeaderSenderSystemNode($systemID,'')"/>
<xsl:variable name="messageIdVariable" select="orcl:generate-guid()"/>

<corecom:EBMHeader>
<corecom:EBMID>
 <xsl:value-of select="$messageIdVariable"/>
</corecom:EBMID>
<corecom:EBMName>
 <xsl:text disable-output-escaping="no">{http://xmlns.oracle.com/EnterpriseObjects/Core/EBO/Object/V1}SyncObjectListEBM</xsl:text>
</corecom:EBMName>
<corecom:EBOName>
 <xsl:text disable-output-escaping="no">{http://xmlns.oracle.com/EnterpriseObjects/Core/EBO/Object/V1}ObjectEBO</xsl:text>
</corecom:EBOName>
<corecom:CreationDateTime>
 <xsl:value-of select="xp20:current-dateTime()"/>
</corecom:CreationDateTime>
<corecom:VerbCode>
 <xsl:text disable-output-escaping="no">Sync</xsl:text>
</corecom:VerbCode>
<corecom:Sender>
 <corecom:ID>
  <xsl:value-of select="$senderNodeVariable/ID"/>
 </corecom:ID>
 <corecom:Description>
  <xsl:value-of select="$senderNodeVariable/Description"/>
 </corecom:Description>
 <corecom:IPAddress>
  <xsl:value-of select="$senderNodeVariable/IPAddress"/>
 </corecom:IPAddress>
 <corecom:Application>
  <corecom:ID>
   <xsl:value-of select="$senderNodeVariable/Application/ID"/>
  </corecom:ID>
  <corecom:Version>
   <xsl:value-of select="$senderNodeVariable/Application/Version"/>
  </corecom:Version>
 </corecom:Application>
 <corecom:ContactName>
  <xsl:value-of select="$senderNodeVariable/ContactName"/>
 </corecom:ContactName>
 <corecom:ContactEmail>
  <xsl:value-of select="$senderNodeVariable/ContactEmail"/>
 </corecom:ContactEmail>
 <corecom:ContactPhoneNumber>
  <xsl:value-of select="$senderNodeVariable/ContactPhone"/>
 </corecom:ContactPhoneNumber>
</corecom:Sender>


The configuration properties can also be used to retrieve the service-endpoints, pretty convenient when you'll have to deploy the code to other environments with different endpoints. When the CAVS framework is not used in your organization you can remove the whole CAVS endpoint javacode in the BPEL sourcecode which was generated by the ABCS Service Constructor. Set a webservice endpoint as follows:
<variable name="EndpointReference" element="wsa:EndpointReference"/>

<assign name="SetServiceEndpoint">
  <copy>
    <from>
      <wsa:EndpointReference xmlns:wsa="http://schemas.xmlsoap.org/ws/2003/03/addressing">
        <wsa:Address/>
      </wsa:EndpointReference>
    </from>
    <to variable="EndpointReference"/>
  </copy>
  <copy>
    <from expression="aia:getServiceProperty('{http://xmlns.oracle.com/ABCSImpl/[Application]/Core/[ABCSName]/V1}[ABCSName]','Routing.[PartnerLinkName].EndpointURI',true())"/>
    <to variable="EndpointReference" query="/wsa:EndpointReference/wsa:Address"/>
  </copy>
  <copy>
    <from variable="EndpointReference"/>
    <to partnerLink="[PartnerLinkName]"/>
  </copy>
</assign>


Besides populating the BSR with the application information to populate the EBM Sender elements, by logging into the /AIA site, go to Setup and then tab System, the key field here is System Code = systemID. The properties mentioned above have to be configured in the AIA file before lookup:
$AIA_HOME/config/AIAConfigurationProperties.xml, just above the </AIAConfiguration> tag:
<!-- [ABCSName] -->
<ServiceConfiguration serviceName="{http://xmlns.oracle.com/ABCSImpl/[Application]/Core/[ABCSName]/V1}[ABCSName]">
 <Property name="Default.SystemID">APPLICATION_01</Property>
 <Property name="Routing.[PartnerLinkName].EndpointURI">http://[HTTP_HOST]:[HTTP_PORT]/webserviceaddress</Property>
</ServiceConfiguration>

In the transformation source code (xsl) only the serviceName has to be specified, not the systemID (APPLICATION_01). This systemID gets retrieved from the AIAConfigurationProperties xml file. After editing this file don't forget to reload the AIA Configuration properties: log in the /AIA site, go to setup, go to configuration and after scrolling down you'll find the Reload button.

It's worth to mention that this AIA Configuration Properties file contains environment-specific properties, like partnerlink endpoints. Use the same procedure here as you have for managing connection pools and other physical endpoints/jdbc urls/id's per application per environment.