KBA-01422: How does the DocTypeConfig | AutoReroute rule work?

Question:

The DocTypeConfig rule group (found on the Rules Maintenance tool on the System Admin Dashboard) includes an AutoReroute rule.  How does that work?

Answer:

When AutoReroute is set to 1 for a Doc type, Spitfire will keep searching for a route using all available document information each time you save, until a route is found.

For example, if your Inspection document has two SubTypes—Safety and Structural—and you want to route the Safety Inspections to the Superintendent and the Structural Inspections to the Project Engineer, the AutoReroute rule option will allow you select the (Sub)Type on the new Inspection document and automatically have the correct route applied when you save.

Here‘s what you need to know:

  • Spitfire always adds the document creator to the route when a document is created.  This does not come from any predefined route.
  • Spitfire always tries to find a predefined route for a document the first time it is saved.  But if the user saves before entering all required information, no route might be found on the first save.
  • If the AutoReroute option is entered for a DocType and the document route has only the Doc Creator in SEQ 1, Spitfire will attempt to find an applicable predefined route based upon information on the document each time the document is saved.  When added information finally matches an predefined route, the route will be applied and AutoReroute ends.

But…

  • As soon as any route for SEQ 2 exists, AutoReroute stops, so:
    • If you manually edit the route, Spitfire will NOT attempt to reset the route.
    • Once a route is applied, Spitfire will not reset the route even if changes to the document would make a new route more appropriate.

To refresh a route is to reapply the same route.  When refreshed, changes to the project team members or responsible parties will be reflected.   To reset the route is to discard the route and search from scratch for a new predefined route.  The same route may be selected again.

If changes to document data require a new route, use the Reset Route command on the Route Options drop-down menu or set AutoReroute to 16 or in rare circumstances 4.

The Auto Reroute option is enabled (1) by default.  The options are:

  • 0  = Disabled. No automatic rerouting.
  • 1  = Continue searching for a route each time the document is saved until any (non-empty) route is found.
  • 2  = Reset the route (i.e., toss out the existing route) and search for a new route if the aggregate document amount changes (used by invoices, payment requests, etc). Replaces the legacy DocTypeConfig | AutoRerouteAmount rule.  Depends on DocFormula rule group to control how the amount is calculated.  Specifically, if DocFormula|CostImpact:Save=0, this option is ignored.
  • 3  = Continue searching until a route is found, but also reset the route if the amount is changed. (This is a combination of 1 and 2.)
  • 4  = Always reset the route and search for a new one (until the document is sent on).  This is extremely expensive, degrades document save performance and should be used sparingly!  Note the new route will replace the old one and may be less applicable.  This option is rarely combined with other options.
  • 16 = Continue refreshing the same route (evaluating all conditions) until the document is sent on.  This option conflicts with 4.
  • 17 = Once a route has been found, continue refreshing that same route. (This is a combination of 1 and 16).
  • 18 = Reset the route and search for a new route if the aggregate document amount changes then continue refreshing this same route until the document is sent on. (This is a combination of 2 and 16.)
  • 19 = Whatever the latest route, keep refreshing it. (This is a combination of 1, 2 and 16.)

Additional Comments:

Some find the rule option name ‘AutoReroute‘ to be misleading.  Sometimes, AutoReroute does not RESET an existing route, but rather keeps searching for a route until one is found.In an effort to improve efficiency, when the system detects there are no other predefined automated routes from which to choose, it turns off all auto reroute options except 16 (refresh route).  This means that creating new predefined routes does not benefit documents that already exist.

See KBA-01423 for information on how the routees on your route can affect AutoReroute.  See also KBA-01154.


KBA-01422; Last updated: September 18, 2017 at 11:32 am;