Introduction
Civic Platform scripting offers an extensive amount of customization opportunities across
the Civic Platform user interface, workflows, and processes. The Civic Platform
scripting architecture consists of the following components:
- Custom scripts and custom functions that interact with the master scripts and EMSE API to implement custom business logic
- JavaScript scripting framework which allows script developers to use standard JavaScript syntax, code repository, testing and deployment tools
- Standard Choice script controls which comprise a legacy mechanism for customizing the master scripts. Accela recommends the use of the JavaScript framework instead of the Standard choice script controls.
- Master Scripts that provide an environment in which the JavaScript or Standard Choice scripts execute. Civic Platform provides master scripts for most comment events.
- Event Manager Scripting Engine (EMSE) and EMSE API are at the heart of the Civic Platform scripting platform that provide the scripting interface with Civic Platform objects. Civic Platform stores the master script files, written in JavaScript, in the Civic Platform database. Civic Platform uses the Rhino open source JavaScript engine to convert scripts into Java classes that Civic Platform executes through the EMSE API.
- Expression Builder interface for scripting form-based interactions (auto-populating data fields based on user-selected values, for example) that occur before you trigger an event activity.
Civic Platform launches scripts when the events that you associate with the script occur. You can use these event-triggered scripts to:
Automate business processes
Help save mouse-clicks
Assess fees
Update workflow
Enforce business rules
Custom data validation
Confirm event pre-requisites
Communicate
Send event driven email
Support Event / Batch driven data collection
Communicate/access web services, email, and interact with the file system
Master Script Flow of Execution shows the flow when you trigger an event with an associated master script.