Interpreting Empty Element Tags in XML Instance Document

27 Best Practices for Designing and Building End-to-End Integration Flows 27-1 27 Best Practices for Designing and Building End-to-End Integration Flows This chapter discusses best practices and recommendations for designing and building end-to-end integration flows. This chapter includes the following sections: ■ Section 27.1, General Guidelines for Design, Development, and Management of AIA Processes ■ Section 27.2, Building Efficient BPEL Processes

27.1 General Guidelines for Design, Development, and Management of AIA Processes

This section includes the following topics: ■ Section 27.1.1, Interpreting Empty Element Tags in XML Instance Document ■ Section 27.1.2, Purging the Completed Composite Instances ■ Section 27.1.3, Syntactic Functional Validation of XML Messages ■ Section 27.1.4, Provide Provision for Throttling Capability ■ Section 27.1.5, Artifacts Centralization ■ Section 27.1.6, Separation of Concerns ■ Section 27.1.7, Adapters Inside ABCS Composite OR as Separate Composite ■ Section 27.1.8, AIA Governance ■ Section 27.1.9, Using AIA Service Constructor

27.1.1 Interpreting Empty Element Tags in XML Instance Document

The XML Instance document should have empty element tags only when the sender intends to have the consumer nullify the values for the elements. Otherwise, these tags should not be present. Having these nonsignificant tags can have a huge impact on memory consumption and hence scalability of the application. AIA recommends that Enterprise Business Messages EBMs have only significant elements. Some applications can inspect the content and produce an XML document having only the significant tags, whereas the rest do not. Because the ABCS is intimate with the application, it can choose the appropriate style based on the applications behavior. In 27-2 Developers Guide for Oracle Application Integration Architecture Foundation Pack situations in which the applications produce Application Business Messages ABM containing all of the elements regardless of whether the elements underwent change or not, the requester connector services should assume that the empty elements in ABM are not significant; and should ignore them when producing EBM. The first code example shown in Example 27–1 illustrates how this could be done. In situations in which ABMs contain only elements that underwent a change in value, the connector services should treat the presence of an empty element as the senders intent to have the consumer nullify the values for that element. Example 27–2 illustrates this use case. With service requesters producing EBM in the preceding manner, the job of the consumer becomes straightforward. It can assume that every element is a significant one-hence, the ABCS consuming the EBM should not skip the empty element. Example 27–3 illustrates how a message containing significant elements can be processed. Use the construct in Example 27–1 when the source applications ABM contains all the elements defined in its schema regardless of whether or not all those elements underwent any change in value. In this situation, in the interest of conserving memory, we make the assumption that an empty element is NOT a significant element and we ignore them. Example 27–1 ABM - EBM Transformation ~-- xsl:if test=ABMSourceElementtext EBMTargetElement xsl:value-of select=ABMSourceElement EBMTargetElement xsl:if Use the construct in Example 27–2 when the source applications ABM contains only those elements that underwent a change in value. In this situation, the presence of an empty element can be considered significant and so we do not ignore it. Example 27–2 ABM - EBM transformation ~-- xsl:if test=ABMSourceElementtext EBMTargetElement xsl:value-of select=ABMSourceElement EBMTargetElement xsl:if If the above rules have been followed, then we can assume that any empty element in the EBM is a significant one, and therefore should not be ignored when transforming from EBM to ABM. So use the construct in Example 27–3 . Example 27–3 EBM - ABM Transformation ~-- xsl:if test=EBMSourceElement ABMTargetElement xsl:value-of select=EBMSourceElement ABMTargetElement xsl:if

27.1.2 Purging the Completed Composite Instances