Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Appendix A SDK Programming Guidelines : MBusinessDocument and MAdvisoryDocument

MBusinessDocument and MAdvisoryDocument
MBusinessDocument is a predefined schema that provides context attributes. It allows a custom adapter to describe a business event in a standard format.
When a custom adapter sends a message to another application, it could send pure data. In many cases, however, it is useful to include context for the data. The context allows the receiving and sending application to share information that is not necessarily part of the data.
Typically, the custom adapter itself defines the context, that means each sending and receiving application need to agree on the format for the context. The MBusinessDocument class encapsulates a specification of such a context, which can be used to provide uniformity, for example, in integration scenarios where several adapters work together.
The MBusinessDocument architecture provides a flexible way to create user-defined attributes, without imposing a rigid structure. See the online API Reference documentation for details, including the methods for accessing and setting the attributes of MBusinessDocument.
The MAdvisoryDocument class is useful for providing context to debugging and performance analysis data. Whereas MBusinessDocument is useful for providing context to application data itself.
In TIBCO Designer, MBusinessDocument is defined under AESchemas/ae/baseDocument.
The predefined MBusinessDocument, MDataSection, and MAdvisoryDocument class schema are available for backward compatibility and should not be used for new development.
New development that would like to take advantage of MBusinessDocument should create custom class schema definition and specify baseBusinessDocument as the superclass. So, any subclass of baseBusinessDocument will inherit the predefined properties provided by baseBusinessDocument.
The same subclass use applies to MAdvisoryDocument.
Example
<class name="OrderBusinessDocument"
                                superclass="baseBusinessDocument">
<attribute name="OrderId" type="String"/>
<attribute name="Item" type="OrderLine" />
</class>
 
MInstance *pInstance =             MDataFactory::createInstance("OrderBusinessDocument");
MBusinessDocument *pDoc = new MBusinessDocument(pInstance);

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved