KBA-01306: Using Routing and Workflow to Automate Document Status


How can I make my document status change automatically when the document is ‘approved‘ or ‘sent on‘ by someone in the route?


Every Spitfire document has a status.  These statuses are configurable, but in general, documents can be “open” or “closed” or “approved” or “pending,” etc.  Similarly, every routed document has a routing status for each routee: “pending,” “sent on,” “sent back,” “accepted,” etc.  Frequently, the overall status of a document is related to the progress the document makes in its routing.  Let‘s use a simple example based upon a Pay Request.  In this example,

  1. Anne, the project assistant, creates the pay requests.
  2. Vic, the vendor, fills it out online (or Anne does this on Vic‘s behalf if vendors can‘t log into Spitfire).
  3. Mike, the PM, reviews the request.
  4. Bob, the bookkeeper, does the payables.

So, when Mike accepts his route entry, he is in essence approving the Pay Request document.  While it isn‘t a big deal for Mike to change the document status before he saves, we can configure Spitfire to do this via workflow. The routing to accomplish this would look like:

Seq #1 Anne
Seq #2 Vic (or Vendor)
Seq #3 Mike (or Project Manager)
Seq #4 Spitfire
Seq #5 Bob (or Accountant)

  1. Anne creates the Pay Request and routes it to Vic, if Vic can log into Spitfire.
  2. Vic receives the Pay Request and fills it out online (or Anne does this too if vendors can‘t log into Spitfire).  The document is routed to Mike.
  3. Mike reviews the request and clicks the ‘thumbs up‘ icon which accepts the route by default.  The document is routed to ‘Spitfire‘.
  4. The Spitfire workflow changes the document status to Approved and sends it on to Bob.
  5. Bob does the payables.

The workflow script for step 4 would be stored in the routing definition.  The script itself is simple:


Additional Comments:

In a sense, the opposite of this type of pattern is to have the document status affect the routing.  See KBA-01177 for changing a document route based upon status. For more information about workflow scripts, see ATC Scripts and Automatic Workflow.

KBA-01306; Last updated: November 8, 2016 at 13:22 pm;