Example of event-driven ATC workflow scripts

This entry is part 7 of 7 in the series ATC Scripts and Automatic Workflow

Let’s say you want to set up three workflow scripts, two of which will be triggered by events and one to be called as needed.

Example of Workflow Script 1

First Script

The first script, called NewBidPackages, sets the document’s subtype to Purchase Order and fills in the Submit To field on the document with the “From User” name:

ATC: SET Subtype=PO
ATC: SET DocRevision.NoteA=[DocHeader_FromUser]

This script will be triggered by an event, specifically when a new Bid Package is first started:

Workflow Scripts Example 2

Second Script

The second script, called OutForBid, sets the document’s status to Out For Bid.

ATC: STATUS O

This script has no events associated with it. It is meant to be called as needed through another workflow script—such as one in a predefined route—as in the following example:

ATC: CALL [OutforBid]
ATC: SAVE

Third Script

The third script, called When Closed, sends a specified Alert to Chris Demo when the document’s status is Closed:

ATC: ALERT [Chris Demo] TITLE Document Closed; For your information, this document has been closed.

This script has an event for two different Doc types associated with it. When either an RFI or Issue document changes its status to Closed, the script will be triggered.

Workflow Scripts Example 3


[lastupdated]; V4.5+; changes since previous update appear in green.