Event Script Hands on Training - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

Event Script Hands on Training

Description:

Event Script Hands-on Training Accela 2006 User Conference: Introduction to Event Scripts ... Learn the capabilities of the Event Manager Script Engine ... – PowerPoint PPT presentation

Number of Views:288
Avg rating:3.0/5.0
Slides: 27
Provided by: johns249
Category:

less

Transcript and Presenter's Notes

Title: Event Script Hands on Training


1
Event ScriptHands on Training
  • Putting the Automation in Accela Automation!

2
Goals
  • Understand basic scripting concepts
  • Learn the capabilities of the Event Manager
    Script Engine
  • Learn what Master Scripts are and how they work
  • Hands-on Exercises
  • Case Studies

3
Basic Scripting Concepts
  • What is an Event?
  • Action triggered by a user
  • Submit button on a form
  • Saving data
  • 76 Unique Events Defined in Accela Automation (20
    added from last year)

4
Basic Scripting Concepts
  • Event types
  • Before
  • Prior to database action
  • Database action can be cancelled via script
  • Typically used for validation
  • Example ApplicationSubmitBefore
  • After
  • After database action completes
  • Typically used for automation
  • Example ApplicationSubmitAfter

5
Basic Scripting Concepts
  • What is a Script?
  • JavaScript code
  • Stored in the database
  • In order to be executed, must be attached to
  • Event,
  • Batch Job, or
  • Script Test

6
Basic Scripting Concepts
7
Capabilities of the EMSE
  • Task Automation
  • Data Validation
  • Modifying Data
  • Batch Jobs
  • Communication

8
EMSE Layers
AccelaAutomation
AccelaIVR
AccelaWireless
Master Scripts
Event Manager Script Engine (EMSE)
Accela Automation Application Server
Database
9
Master Scripts
  • Standardized scripts
  • One script per event
  • Standard Choice entries control the script
  • Modular, plug in functions
  • Minimal JavaScript knowledge required

10
Why Master Scripts?
  • Native Scripts
  • Target consumer programmers
  • Entirely JavaScript
  • Compiled on execution
  • Limited end-user documentation
  • Hard to decipher
  • No built-in value population
  • No built-in business logic
  • Master Scripts
  • Target consumer administrators
  • JavaScript framework within AA
  • Interpreted at execution
  • Extensive docs and examples
  • Easy to read and understand
  • Frequently used values are populated
  • Built in functions for common tasks

11
Master Script Flow of Execution
Script Controls
Master Script
Event
12
Script Controls
  • Script Controls
  • Uses Standard Choices items
  • Determine the flow of execution

13
Script Control Design
  • Sample Script Controls

Script Action Item matches value in related
Master Script
order of execution
Script Control setting logging options
Script Control with Criteria and Action
Enable or Disable this Script Control
14
Script Control Basics
  • Script Controls
  • Are case-sensitive!
  • Do all the work. Criteria tells when, Action
    tells what
  • Criteria and Actions separated by a caret ( )
  • Must be valid JavaScript
  • Use curly braces "" and "" to reference
  • Application Specific Info fields
  • Task Specific Info fields
  • Parcel custom attributes

15
Script Control Structure
separator ()
Criteria
Action
appMatch("Building/Reroof/NA/NA")
addAllFees("BLDCR05","FINAL",1,"N")
IF this is true,
THEN do this
16
Master Scripts Criteria
  • Criteria
  • Must evaluate to only "True" or "False
  • May contain multiple statements, separated by
    logical operators

17
Master Scripts Criteria Examples
  • true
  • appMatch(Building/Commercial//)
  • inspType Final Inspection
  • Government Funded "Yes"
  • Building Type ! Historical"
  • ParcelAttribute.Neighborhood "Downtown Area
  • feeExists(LICFEE) balanceDue 0
  • inspType Final !isScheduled(Electrical)
  • proximity(GIS,Schools,1000)
  • taskStatus(License Issuance,Issued)

18
Master Scripts Actions
  • Action
  • Usually call functions developed for common
    actions
  • May contain multiple statements (separated by
    semi-colon)
  • May call subroutines using the branch() function

19
Master Scripts Action Examples
  • activateTask(Plan Review)
  • addFees(RENEW,LICENSE,PER2005,1,Y)
  • addAppCondition("Permit","Applied","Reinspection
    Fee","Re-Inspection Fee","Hold")
  • closeTask(Peer Review,NA,Closed by
    Script,Closed by Script)
  • comment(Square footage is Sq Ft)
  • childApp createChild(Building,Commercial,Pl
    umb,NA,)
  • editAppSpecific(Total Value,Sq Ft Price
    per Sq Ft)
  • branch(CALCVALUES)

20
Master Scripts Global Variables
  • Script Global Variables
  • Event dependent
  • Workflow wfTask, wfStatus, wfDate, etc.
  • Inspection Result inspType, inspResult,
    InspGroup, etc.
  • Debug pop-up window shows the full list

21
Master Scripts Debug Output Sample
CAP that triggered the event
Pre-populated CAP values available to your script
Event specific values
User-defined data (ASI, TSI, Parcel attributes,
etc.)
22
Master Scripts Branching
23
Script Error Messages
  • Error messages appear in pop-up window
  • Common messages
  • undefined syntax error (script line xxx)
  • undefined unterminated string literal (script
    line xxx)
  • undefined Cannot convert null to an object.

24
Script Controls Design Method
  • Step by Step
  • Identify triggering Event
  • Find Master Script for the Event
  • Add Master Script to agency
  • Add Event to agency
  • Associate Script to Event
  • Create Script Control
  • Test

25
Use Cases
  • Use Cases to be demonstrated
  • Adding fees on application submittal
  • Auto-scheduling inspections
  • Updating workflow after inspection resulted
  • Emailing inspection results
  • Accessing GIS info and proximity alerts
  • Add re-inspection fees and conditions
  • Creating child applications
  • Preventing inspection scheduling

26
Wrap Up
  • Next Steps
  • Webex Training
  • Resources
  • Accela Portal
  • Scripts
  • Documentation
  • Sample Solutions
  • Question and Answer
Write a Comment
User Comments (0)
About PowerShow.com