Progress
AppBuilder
Developer’s Guide
Handling Multiple Document Types
You can create a complete message-handling system using very few SmartObjects, if your needs are uncomplicated. Figure 6–7 gives a schematic view of such a system.
Figure 6–7: Basic Message-handling Blocks
![]()
The business object would typically be a SmartDataObject or SmartBusinessObject. The SmartB2BObjects could also be a SmartSender/SmartReceiver pair. Regardless, the basic layout is very straightforward when all inbound or outbound messages are handled alike.
In some business situations, however, you might have to handle several different incoming logical-document types—in Figure 6–8, Purchase Order, Sales Enquiry, and Customer Support Form—all packaged identically as XML messages. Since at present each document type is handled by a dedicated SmartB2BObject instance, you would need a way to route them appropriately.
The SmartRouter object provides exactly that service.
Figure 6–8 illustrates how the SmartRouter relates to the SmartConsumer and SmartB2B objects.
Figure 6–8: Message Routing Using SmartRouter
When a new message comes in, the SmartRouter determines which SmartB2BObject should do the transformation and starts that container, if necessary. It then identifies the SmartB2BObject to the SmartConsumer and hands off the message file to the SmartB2BObject. After that, it has nothing more to do with that message. The SmartConsumer and SmartB2BObject communicate directly from that point onward, as they do when a SmartRouter is not involved.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |