Can you give me examples of ATC workflow scripts and how you set up if they are triggered by document events or called from a predefined route?
Let’s say you want to set up four workflow scripts, three of which will be triggered by events and one to be called as needed.
The first script, called ON DFR Save Attach Template, creates a file from a specific template and attaches that file to the document
ATC: ATTACH TEMPLATE [JFS Field Report]
This script will be triggered by an event, specifically when a new Daily Field Report is first saved:
The second script, called OnSubmittalDocSaved, sets the Submitted date to today if the Item status has changed to Submitted.
ATC: FOREACH DocItem by DocItemNumber WITH ItemStatus = 'SIP'; ATC: IF @.ItemStatus IsChanging ATC: SET @.Submitted = NOW ATC: ENDIF ATC: ENDLOOP
This script will be triggered by any of three events, specifically
- when a Submittal Log is saved:
- when a Submittal is closed or saved or set to Pending:
- when a Submittal Package is closed or saved or set to Pending
The third script, called PayApplicationInvoiced, applies a predefined route when the document status is changed to Invoiced.
ATC: EXIT WHEN STATUS != V
ATC: IF Status is Changing
ATC: ROUTE *, AUTO;
This script will be triggered by an event, specifically when a Pay Application is approved, saved or made Pending:
The fourth script, called Project_StartUp_Checklist, copies a Checklist document onto the project.
ATC: * Called from route
ATC: COPY KEY 3909586e-9491-4b09-8bde-47cde45a0151; WITH Autoaccepted Items
This script is not triggered by any event, but rather is called (through a ATC: CALL Project_Startup_Checklist command) from a predefined route.
KBA-1784; Last updated: March 17, 2022 at 13:40 pm