KBA-01558: Workflow Script Library

Question:

How can I use the same script from multiple predefined routes?
Can I run a workflow script when my document is approved?
Can I use a workflow script to initialize my new documents?

Answer:

Yes! On the System Admin dashboard you will find the Workflow Scripts tool.

Every script you store here can be called from any predefined route or other script using the ATC: CALL command.  This greatly simplifies reusing and refining and updating scripts over time.

The workflow script library also allows individual scripts to be associated with document events, by Doc type. You add a row for each Doc type and set the ‘trigger when‘ option using a pop-up dialog.

Possible triggers are:

  • On Create – the script is run when a document is created, before being presented to the user.  This is where you would initialize new documents.
  • First Save – the script will be run the very first time a new document is saved.
  • Normal Saves – the script will be run every time a document is saved.
  • Newly Pending – the script will be run the first time a document is saved with a Pending state.
  • Newly Closed – the script will be run the first time a document is saved with a Closed state.
  • Newly Approved – the script will be run the first time a document is saved with an Approved state.
  • When Combined Only – modifies the other selections.  Normally, the triggers are treated as an ‘OR‘ — for example, when a document is Newly Closed OR Newly Approved.  Include this option to make all other marked options required simultaneously, for example, Newly Closed AND Newly Approved.  Note that some combinations are not logical: for example, no document is ever both Newly Pending and Newly Approved.

KBA-01558; Last updated: September 19, 2017 at 8:58 am