Session: Activity Scripts and Triggers Panelist: Pam Kietzman, City of Pasadena, CA Esfir Livshitz, City of Pasadena, CA Doug Johnson, City of Overland.

Slides:



Advertisements
Similar presentations
Access 2007 ® Use Databases How can Microsoft Access 2007 help you structure your database?
Advertisements

ECATS “The Honeywell Web-based Corrective Action Solution” CAR Process Last Revised: August 19 th 2008 Honeywell Confidential & Proprietary.
Spillman Sentryx 6.0.
ProcureAZ 11 Invoices.
March 20, 2008 Team DunKyan.  Functionality implemented to date  Current activities  Plans for rest of semester  Software demonstration  Reporting.
A Guide to Oracle9i1 Advanced SQL And PL/SQL Topics Chapter 9.
Fundamentals, Design, and Implementation, 9/e Chapter 7 Using SQL in Applications.
Database Design Concepts INFO1408 Term 2 week 1 Data validation and Referential integrity.
Eyad Alshareef 1 Creating Custom Forms Part A. 2Eyad Alshareef Data Block and Custom Forms Data block form Data block form Based on data blocks that are.
Supplier Invoicing North America
October 2001 Tidemark User's Conference1 Session: Grading, Right of Way Construction & Transportation Permits Panelist: Melanie Adams, Associate Engineer.
Copyright 2007– WinWare, Inc. Session: How to Utilize the Open Database Architecture of CribMaster Presenter: Phil Stenger.
Oracle Data Definition Language (DDL)
Electronically approve and create Suppliers in Oracle Financials using a combination of APEX and Oracle Workflow. NZOUG Conference 2010 Brad Sayer Team.
©2008 TTW Where “Lean” principles are considered common sense and are implemented with a passion! Product Training Cash and Cash Management.
October 2001 Tidemark User's Conference1 Session: 2.6 Conversion Lessons Learned Panelist: Art Henriques, City of Santa Clara Sean Hurley, Synergetic Consulting.
Chapter 6: Integrity and Security Thomas Nikl 19 October, 2004 CS157B.
Triggers and Transactions Making Decisions behind the scene.
Oracle10g Developer: PL/SQL Programming1 Objectives Manipulating data with cursors Managing errors with exception handlers Addressing exception-handling.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 11 1 Microsoft Office Access 2003 Tutorial 11 – Using and Writing Visual Basic for Applications.
ABC Insurance Co. Paul Barry Steve Randolph Jing Zhou CSC8490 Database Systems & File Management Dr. Goelman Villanova University August 2, 2004.
Triggers A Quick Reference and Summary BIT 275. Triggers SQL code permits you to access only one table for an INSERT, UPDATE, or DELETE statement. The.
Triggers and Stored Procedures in DB 1. Objectives Learn what triggers and stored procedures are Learn the benefits of using them Learn how DB2 implements.
ENCOMPASS Voucher Build Process
Access Project 3 Notes. Introduction Maintaining the Database  Modifying the data to keep it up-to-date Restructure the Database  To change the database.
Rev.04/2015© 2015 PLEASE NOTE: The Application Review Module (ARM) is a system that is designed as a shared service and is maintained by the Grants Centers.
Commercial RDBMSs Access and Oracle. Access DBMS Architchecture  Can be used as a standalone system on a single PC: -JET Engine -Microsoft Data Engine.
Fall 2001Database Systems1 Triggers Assertions –Assertions describe rules that should hold for a given database. –An assertion is checked anytime a table.
Advanced SQL: Triggers & Assertions
What is a Package? A package is an Oracle object, which holds other objects within it. Objects commonly held within a package are procedures, functions,
Oracle 11g: SQL Chapter 4 Constraints.
Chapter 4 Constraints Oracle 10g: SQL. Oracle 10g: SQL 2 Objectives Explain the purpose of constraints in a table Distinguish among PRIMARY KEY, FOREIGN.
Objectives Database triggers and syntax
PL/SQLPL/SQL Oracle10g Developer: PL/SQL Programming Chapter 9 Database Triggers.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
UB & UC An Update on Resource Sharing Developments.
Gold – Crystal Reports Introductory Course Cortex User Group Meeting New Orleans – 2011.
A Guide to SQL, Eighth Edition Chapter Eight SQL Functions and Procedures.
PL/SQLPL/SQL Oracle11g: PL/SQL Programming Chapter 9 Database Triggers.
PL/SQLPL/SQL Oracle10g Developer: PL/SQL Programming Chapter 9 Database Triggers.
Chapter 5 : Integrity And Security  Domain Constraints  Referential Integrity  Security  Triggers  Authorization  Authorization in SQL  Views 
Session 1 Module 1: Introduction to Data Integrity
PRACTICE OVERVIEW PL/SQL Part Your stored procedure, GET_BUDGET, has a logic problem and must be modified. The script that contains the procedure.
10 1 Chapter 10 - A Transaction Management Database Systems: Design, Implementation, and Management, Rob and Coronel.
IMS 4212: Constraints & Triggers 1 Dr. Lawrence West, Management Dept., University of Central Florida Stored Procedures in SQL Server.
Oracle 10g Database Administrator: Implementation and Administration Chapter 10 Basic Data Management.
Level 1-2 Trigger Data Base development Current status and overview Myron Campbell, Alexei Varganov, Stephen Miller University of Michigan August 17, 2000.
Constraints and Views Chap. 3-5 continued (7 th ed. 5-7)
SQL Triggers, Functions & Stored Procedures Programming Operations.
ATRK & CMC—The Perfect Pair. Presentation Outline Brief Introduction CMC Screen & The 4 Definitions of Communications Management ATRK Screen Tying together.
Work In Progress Presentation. Orders Alex Thornton.
Data Integrity & Indexes / Session 1/ 1 of 37 Session 1 Module 1: Introduction to Data Integrity Module 2: Introduction to Indexes.
Database Constraints Ashima Wadhwa. Database Constraints Database constraints are restrictions on the contents of the database or on database operations.
Getting started with Accurately Storing Data
Software Project Configuration Management
Working in the Forms Developer Environment
Introduction to Triggers
Building Configurable Forms
Lecturer: Mukhtar Mohamed Ali “Hakaale”
This presentation document has been prepared by Vault Intelligence Limited (“Vault") and is intended for off line demonstration, presentation and educational.
Advanced SQL: Views & Triggers
E-permits Tutorial for first-time users
To the ETS – Encumbrance Online Training Course
Chapter 7 Using SQL in Applications
Oracle9i Developer: PL/SQL Programming Chapter 8 Database Triggers.
Chapter 7 Using SQL in Applications
To the ETS – Encumbrance Online Training Course
Triggers.
Prof. Arfaoui. COM390 Chapter 9
This presentation document has been prepared by Vault Intelligence Limited (“Vault") and is intended for off line demonstration, presentation and educational.
Presentation transcript:

Session: Activity Scripts and Triggers Panelist: Pam Kietzman, City of Pasadena, CA Esfir Livshitz, City of Pasadena, CA Doug Johnson, City of Overland Park, KS Date: Thursday October 4, 2001

October 2001 Tidemark User's Conference2 Activity Scripts What are they? How do they work? Examples of what they can do Triggers What are they? How do they work? Examples of what they can do Agenda

October 2001 Tidemark User's Conference3 An activity script is a code that communicates with the Permit Plan application in order to help us enforce our business rules for activities over a broad range of cases & projects. One example of what an activity script can do would be to check the status of a permit before taking an inspection request. This would ensure that you don’t take any inspection requests on permits that aren’t issued yet or are already finaled. Activity Scripts – What are they?

October 2001 Tidemark User's Conference4 Each activity script contains one or more functions, and is executed one line at a time. You can include as many functions as you need in a script and repeat each of them any number of times. After a script has been created, then you need to link the script to a specific activity of a specific case type. This is done in the Activity Script Link Table. Activity Scripts – How do they work?

October 2001 Tidemark User's Conference5 Sample Activity Script - “AholdStat” The activity script “AholdStat” allows us to have the system check the status of a permit to make sure it has an ISS status. See the example to the right labeled “BLDSTAT”. If the case has anything other than an ISS status, then there is a Hold Level 3 placed against any new inspection activities being added. An activity link has to be made to each inspection activity code, which is time intensive, but worth the investment.

October 2001 Tidemark User's Conference6 Sample Activity Script - “AaddFee” The activity script “AaddFee” will add a fee item when the activity is added for miscellaneous services requiring their own additional charge (e.g. reinspection fees, after-hour inspections, etc.). This is a convenient method for the inspector or support staff to record that a reinspection is required, the fee will be automatically added and in Pasadena, another inspection request won’t be taken until this fee is paid…because our inspection activities are checking for unpaid fees.

October 2001 Tidemark User's Conference7 Sample Activity Script - “AholdFee” The activity script “AholdFee” checks to make sure that there aren’t any outstanding fees within the project, even if they are all revolved on that particular case. All fees, project-wide must be paid before the activity which finals the case is allowed to be added. The sample to the right is making sure all fees are paid before a Certificate of Occupancy is granted on a BLD case.

October 2001 Tidemark User's Conference8 Sample Activity Script - “AchngExp” (1) The activity script “AchngExp” will push out an expiration date when an inspection is completed on permits issued by Building. The expiration date is to be extended by 180 days not only on the permit on which the inspection was performed, but for all other permits of certain case types which are attached to the same project. The stored procedure “today_6M”, which was written by Tidemark, updates not only the current permit, but all related permits per documented standards.

October 2001 Tidemark User's Conference9 Sample Activity Script - “AChngExp” (2) Here’s another example of how to use the “AChngExp” script. The Planning case type covers all land use review applications, and the subtype field allows the tracking of each type for reporting purposes. Different planning case types may have different expiration date regulations. The activity will calculate the expiration date for a given case, based on system date and on the case subtype to which the activity pertains.

October 2001 Tidemark User's Conference10 Sample Activity Script – “AddActn” The activity script “AaddActn” can allow you to add one activity which will then add multiple activities. Pasadena has a complex plan review process and is tracked online using different activities for each agency involved in the review. Certain combinations of plan check activities constitute standard “routes” for a given project (e.g., a Restaurant Tenant Improvement would consist of Building, Zoning, Design Review, Fire, Public Works & Health Dept reviews). A single activity is added which then adds these multiple plan review activities to the case.

October 2001 Tidemark User's Conference11 Sample Activity Script – “Adisp” Here, the activity script “Adisp” is combined with “AaddActn” to do two things: check the disposition of an activity and based on that disposition, add another activity. Pasadena’s Water & Power department is informed by Building when a power release has been approved at a construction site. If the inspection activity for the Electrical Service is APPR, then the system will add the activity to “Release Electric to W&P” automatically. Water & Power runs a Crystal Report everyday to find out which addresses have been approved for power release.

October 2001 Tidemark User's Conference12 Sample Activity Script – “AholdActn” The activity script “AholdActn” is used to search the current case, or any related cases designated by the extent of the search, for activities that have not been completed and/or signed off. In Pasadena, a new address cannot be finalized until the building permit on the site has been issued. The activity on our “Address Assignment” (ADD) case type, which updates the status to FNL, checks to see if the “Permit Issued” activity on the building permit, attached to the same project, has been signed off before allowing the status change on the ADD case.

October 2001 Tidemark User's Conference13 A trigger defines an action the database should take when some database-related event occurs. The action is an executable block of computer code which can perform a variety of actions on the database (in Oracle, this code is written with PL/SQL) The event that starts the trigger can be an update, insert or delete action on a specific database table Triggers – What are they?

October 2001 Tidemark User's Conference14 Triggers – How do they work? Header – trigger name, type of trigger, table name & “when” clause Declare variables (if any) Begin trigger body PL/SQL statements End of trigger Create trigger t_cond_desc Before insert on case_condition for each row When (new.case_type = 'OPC' ) Declare Dvar varchar2(150); Nvar varchar2(150); cm casemain%rowtype; Begin Select * into cm from casemain Where csm_caseno = :new.csm_caseno; Nvar := rtrim(:new.csc_title, ‘ ‘); Dvar := cm.csm_description || ‘, ‘ || Nvar; Dvar := ltrim(dvar, ‘, ‘); Update casemain set csm_description = dvar, csm_status = ‘VIO’ where csm_caseno = :new.csm_caseno; End;

October 2001 Tidemark User's Conference15  Triggers are NOT supported by Tidemark  Triggers should be written by your DBA or someone who is VERY knowledgeable about your database  Triggers must account for all table relationships and dependencies, and for Tidemark’s “business rules”  Triggers must account for all possible data values, including NULL values  Triggers should be tested thoroughly before implementation Disclaimer !

October 2001 Tidemark User's Conference16  Validate or modify data entry  Example: Disposition field on case_action  Shortcuts to simplify user interface  Example: Sign-off for conditions  Insert data into other fields or tables  Example: Code violations added to csm_description  Alter system dates  Example: Plan review comment letter due dates Some Examples

October 2001 Tidemark User's Conference17 Some Pasadena Trigger Examples Insert data into other fields or tables Example: Populate “assigned to” fields on permit case types with the inspector’s initials based on certain parameters (e.g., commercial/residential projects or designated inspection areas). Update records on related cases that are linked by a project Example: Push out permit expiration date on all related cases of a project when an inspection has taken place on the project. A project may have a building, electrical, plumbing & mechanical permits. An inspection on any one of those permits should push out the expiration date by 180 days on the entire project. Pasadena has developed a trigger which will update the parent record and the child records that are attached by a project.

October 2001 Tidemark User's Conference18 Pasadena Trigger Example (1)  Populating case extended fields  Example: As you can see on the right, Pasadena has added several case_extended fields to be displayed on the main case screen. These case_extended fields would have to be updated by the user. A trigger was built so that the “Plancheck Expiration” field would be populated when the case is initially created.

October 2001 Tidemark User's Conference19 Pasadena Trigger Example (2) Populating case extended fields Example: Another trigger that Pasadena is working on will populate a case_extended field labeled “Approved”. When submitted plans have been approved for permit, an activity is added to change the status to APR, but the corresponding date cannot be automatically populated via the activity setup. With this trigger, the “Approved” date field will also populate when the activity is added.

October 2001 Tidemark User's Conference20  Triggers cannot alter data contained in the same table as the trigger event, other than the row that initiated the trigger event  If you have more than one trigger on the same database table/event, you run the risk of code conflicts  Triggers can be used to run Oracle Stored Procedures Tips and Traps