Release 10.1A: OpenEdge Development:
AppBuilder

> ## Creating a document-routing package

> If your customer’s business practices allow, you can create a system that processes incoming documents in batch mode, without human intervention.

> To do this, you would create separate containers to perform the document routing and the document handling. At run time, you start the routing package in batch mode and allow it to call the document-handling packages as documents arrive for processing. For information about creating document-handling packages, see the "Creating a document-handling package" section.

> This example assumes that you will use the invisible simple SmartContainer as the organizer. If you require a user interface, use the SmartWindow instead.

> | To create a document-routing package:

> 1. Choose File New and select the simple SmartContainer. A workspace of that type appears:

> 2. Place a SmartConsumer object and configure it to monitor the appropriate inbound queue or topic. See the "Creating and placing a SmartConsumer instance" section and the "Configuring a SmartConsumer instance" section for details.

> 3. Click the SmartRouter tool icon:

> 4. Place the instance in the workspace. An Advisor will appear and offer to create a SmartLink of type `ROUTER` from the SmartConsumer. Accept the offer.

> 5. Click the Menu button and choose Instance Properties. The dialog box opens:

> 6. Click the Add button. This makes the External Reference field editable. Enter the URL of the schema file for some document type this `router` link must recognize. Note that the filename of the schema must be the same locally as it appears in the URL, though the paths to them will probably be very different.

> 7. Click the corresponding Internal Reference field to activate it. Enter the `PROPATH`-relative path to the corresponding map file. Thus, if the full path is `d:\abc\def\mapfile.xmc` and `PROPATH` contains `d:\abc`, you should enter `def\mapfile.xmc` here.

> 8. If you are satisfied with this entry, click the Save button to write the entry out to disk. Otherwise, click Reset to clear the fields, or Cancel to clear the fields and leave edit mode.

> 9. Repeat Step 6 through Step 8 until you have created entries for each document type this Router instance must recognize. Click OK to close this dialog box. Now, when run, this Router will be able to recognize and appropriately distribute those document types.

> 10. Save the package using a distinctive filename. Note that filenames for simple SmartContainers conventionally begin with `c`.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095