SlideShare ist ein Scribd-Unternehmen logo
1 von 9
Running SQL from a Agile
PLM Groovy Event Handler
Introduction
 Will show how to execute SQL from a Groovy
handler using the SQL connection already
established by the container
 Should work fine in a PX – add agileclasses.jar
to the IDE classpath for the build but cannot
run in the debugger since the PX is not in
Agile’s class loader
Sample Script
import
import
import
import

com.agile.agileDSL.ScriptObj.*;
com.agile.api.*;
com.agile.util.sql.*;
java.sql.*;

void invokeScript(IBaseObjectScriptObj object) {
Connection connection = null;
PreparedStatement statement = null;
ResultSet rows = null;
try {
connection = ConnectionFactory.getFactory().getConnection();
statement = connection.prepareStatement("select ifs_url from vault");
rows = statement.executeQuery();
while(rows.next()) {
// log the SQL response
object.logMonitor( "SQL Response: " + rows.getString("ifs_url") );
}
} catch (Exception e) {
object.logMonitor( e.getMessage() );
}
}
Setting Up Agile for the Test
 Setting up the event for our demo
Setting Up Agile for the Test (cont)
 Defining the event handler
Setting Up Agile for the Test (cont)
 The event subscriber
The Results
I set up my script to execute on
the title block update event for
items, so simply modifying an
attribute on a part and saving the
changes will trigger it. If we
inspect the event monitor the
following entry is found.
About Us
 PLM Mechanic specializes in the technical
aspects of Oracle’s Agile PLM solution
 We offer the following service:
– Agile PLM installations and upgrades
– Agile PLM maintenance and help desk functions
– Agile PLM hosting
– Customization

 PLM Mechanic also has several product
offerings
Contact Us









Web: http://www.plmmechanic.com
Blog: http://www.plmmechanic.com/blog
Facebook: http://facebook.com/PLMMechanic
LinkedIn: http://www.linkedin.com/company/plm-mechanic
Twitter: @PLMMechanic
Email: sales@plmmechanic.com
Phone: 512-827-2262
Fax: 512-582-2932

Weitere ähnliche Inhalte

Was ist angesagt?

Gatling Tool in Action at Devoxx 2012
Gatling Tool in Action at Devoxx 2012Gatling Tool in Action at Devoxx 2012
Gatling Tool in Action at Devoxx 2012
slandelle
 
Asp.Net Ajax Component Development
Asp.Net Ajax Component DevelopmentAsp.Net Ajax Component Development
Asp.Net Ajax Component Development
Chui-Wen Chiu
 
Inside asp.net mvc framework
Inside asp.net mvc frameworkInside asp.net mvc framework
Inside asp.net mvc framework
Ciklum Ukraine
 

Was ist angesagt? (20)

React js t6 -lifecycle
React js   t6 -lifecycleReact js   t6 -lifecycle
React js t6 -lifecycle
 
Continuous performance management with Gatling
Continuous performance management with GatlingContinuous performance management with Gatling
Continuous performance management with Gatling
 
Gatling - Stress test tool
Gatling - Stress test toolGatling - Stress test tool
Gatling - Stress test tool
 
React js t4 - components
React js   t4 - componentsReact js   t4 - components
React js t4 - components
 
AngularJS Unit Test
AngularJS Unit TestAngularJS Unit Test
AngularJS Unit Test
 
Gatling
Gatling Gatling
Gatling
 
React state management with Redux and MobX
React state management with Redux and MobXReact state management with Redux and MobX
React state management with Redux and MobX
 
React.js - The Dawn of Virtual DOM
React.js - The Dawn of Virtual DOMReact.js - The Dawn of Virtual DOM
React.js - The Dawn of Virtual DOM
 
Gatling Tool in Action at Devoxx 2012
Gatling Tool in Action at Devoxx 2012Gatling Tool in Action at Devoxx 2012
Gatling Tool in Action at Devoxx 2012
 
New Features Of Microsoft Visual Studio 2008 And .Net Framework 3.5 To Comsof...
New Features Of Microsoft Visual Studio 2008 And .Net Framework 3.5 To Comsof...New Features Of Microsoft Visual Studio 2008 And .Net Framework 3.5 To Comsof...
New Features Of Microsoft Visual Studio 2008 And .Net Framework 3.5 To Comsof...
 
React and Flux life cycle with JSX, React Router and Jest Unit Testing
React and  Flux life cycle with JSX, React Router and Jest Unit TestingReact and  Flux life cycle with JSX, React Router and Jest Unit Testing
React and Flux life cycle with JSX, React Router and Jest Unit Testing
 
Understanding Facebook's React.js
Understanding Facebook's React.jsUnderstanding Facebook's React.js
Understanding Facebook's React.js
 
React and redux
React and reduxReact and redux
React and redux
 
Asp.Net Ajax Component Development
Asp.Net Ajax Component DevelopmentAsp.Net Ajax Component Development
Asp.Net Ajax Component Development
 
Inside ASP.NET MVC framework
Inside ASP.NET MVC frameworkInside ASP.NET MVC framework
Inside ASP.NET MVC framework
 
Inside asp.net mvc framework
Inside asp.net mvc frameworkInside asp.net mvc framework
Inside asp.net mvc framework
 
React - Start learning today
React - Start learning today React - Start learning today
React - Start learning today
 
Scaling React and Redux at IOOF
Scaling React and Redux at IOOFScaling React and Redux at IOOF
Scaling React and Redux at IOOF
 
Intro to React
Intro to ReactIntro to React
Intro to React
 
Why reactive:reactive programming spring 5
Why reactive:reactive programming spring 5Why reactive:reactive programming spring 5
Why reactive:reactive programming spring 5
 

Ähnlich wie Running SQL from a Groovy Event Handler in Agile PLM

20150516 modern web_conf_tw
20150516 modern web_conf_tw20150516 modern web_conf_tw
20150516 modern web_conf_tw
Tse-Ching Ho
 
Jug Guice Presentation
Jug Guice PresentationJug Guice Presentation
Jug Guice Presentation
Dmitry Buzdin
 
Thomas braun dependency-injection_with_robo_guice-presentation-final
Thomas braun dependency-injection_with_robo_guice-presentation-finalThomas braun dependency-injection_with_robo_guice-presentation-final
Thomas braun dependency-injection_with_robo_guice-presentation-final
Droidcon Berlin
 
SQL Server 2005 CLR Integration
SQL Server 2005 CLR IntegrationSQL Server 2005 CLR Integration
SQL Server 2005 CLR Integration
webhostingguy
 
Our challenge for Bulkload reliability improvement
Our challenge for Bulkload reliability  improvementOur challenge for Bulkload reliability  improvement
Our challenge for Bulkload reliability improvement
Satoshi Akama
 

Ähnlich wie Running SQL from a Groovy Event Handler in Agile PLM (20)

20150516 modern web_conf_tw
20150516 modern web_conf_tw20150516 modern web_conf_tw
20150516 modern web_conf_tw
 
Serverless Angular, Material, Firebase and Google Cloud applications
Serverless Angular, Material, Firebase and Google Cloud applicationsServerless Angular, Material, Firebase and Google Cloud applications
Serverless Angular, Material, Firebase and Google Cloud applications
 
Jug Guice Presentation
Jug Guice PresentationJug Guice Presentation
Jug Guice Presentation
 
Scrollable Test App
Scrollable Test AppScrollable Test App
Scrollable Test App
 
Will it blend? Java agents and OSGi
Will it blend? Java agents and OSGiWill it blend? Java agents and OSGi
Will it blend? Java agents and OSGi
 
Arquillian Constellation
Arquillian ConstellationArquillian Constellation
Arquillian Constellation
 
Introduction to AngularJS For WordPress Developers
Introduction to AngularJS For WordPress DevelopersIntroduction to AngularJS For WordPress Developers
Introduction to AngularJS For WordPress Developers
 
Selenium my sql and junit user guide
Selenium my sql and junit user guideSelenium my sql and junit user guide
Selenium my sql and junit user guide
 
Typescript tips & tricks
Typescript tips & tricksTypescript tips & tricks
Typescript tips & tricks
 
Sqlapi0.1
Sqlapi0.1Sqlapi0.1
Sqlapi0.1
 
Apollo. The client we deserve
Apollo. The client we deserveApollo. The client we deserve
Apollo. The client we deserve
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Construire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleConstruire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradle
 
Azure functions
Azure functionsAzure functions
Azure functions
 
Thomas braun dependency-injection_with_robo_guice-presentation-final
Thomas braun dependency-injection_with_robo_guice-presentation-finalThomas braun dependency-injection_with_robo_guice-presentation-final
Thomas braun dependency-injection_with_robo_guice-presentation-final
 
Integration tests: use the containers, Luke!
Integration tests: use the containers, Luke!Integration tests: use the containers, Luke!
Integration tests: use the containers, Luke!
 
SQL Server 2005 CLR Integration
SQL Server 2005 CLR IntegrationSQL Server 2005 CLR Integration
SQL Server 2005 CLR Integration
 
Loadrunner
LoadrunnerLoadrunner
Loadrunner
 
Our challenge for Bulkload reliability improvement
Our challenge for Bulkload reliability  improvementOur challenge for Bulkload reliability  improvement
Our challenge for Bulkload reliability improvement
 
Web UI test automation instruments
Web UI test automation instrumentsWeb UI test automation instruments
Web UI test automation instruments
 

Mehr von PLM Mechanic .

Mehr von PLM Mechanic . (6)

Trying to find the workflow status in the database?
Trying to find the workflow status in the database?Trying to find the workflow status in the database?
Trying to find the workflow status in the database?
 
Is File Load Taking Too Long?
Is File Load Taking Too Long? Is File Load Taking Too Long?
Is File Load Taking Too Long?
 
Help! Agile PLM won’t start after a database import!
Help! Agile PLM won’t start after a database import! Help! Agile PLM won’t start after a database import!
Help! Agile PLM won’t start after a database import!
 
How to import the agile plm database
How to import the agile plm databaseHow to import the agile plm database
How to import the agile plm database
 
Fix Agile PLM Attachment File Sizes
Fix Agile PLM Attachment File Sizes Fix Agile PLM Attachment File Sizes
Fix Agile PLM Attachment File Sizes
 
How to Export the Agile PLM Database
How to Export the Agile PLM DatabaseHow to Export the Agile PLM Database
How to Export the Agile PLM Database
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Running SQL from a Groovy Event Handler in Agile PLM

  • 1. Running SQL from a Agile PLM Groovy Event Handler
  • 2. Introduction  Will show how to execute SQL from a Groovy handler using the SQL connection already established by the container  Should work fine in a PX – add agileclasses.jar to the IDE classpath for the build but cannot run in the debugger since the PX is not in Agile’s class loader
  • 3. Sample Script import import import import com.agile.agileDSL.ScriptObj.*; com.agile.api.*; com.agile.util.sql.*; java.sql.*; void invokeScript(IBaseObjectScriptObj object) { Connection connection = null; PreparedStatement statement = null; ResultSet rows = null; try { connection = ConnectionFactory.getFactory().getConnection(); statement = connection.prepareStatement("select ifs_url from vault"); rows = statement.executeQuery(); while(rows.next()) { // log the SQL response object.logMonitor( "SQL Response: " + rows.getString("ifs_url") ); } } catch (Exception e) { object.logMonitor( e.getMessage() ); } }
  • 4. Setting Up Agile for the Test  Setting up the event for our demo
  • 5. Setting Up Agile for the Test (cont)  Defining the event handler
  • 6. Setting Up Agile for the Test (cont)  The event subscriber
  • 7. The Results I set up my script to execute on the title block update event for items, so simply modifying an attribute on a part and saving the changes will trigger it. If we inspect the event monitor the following entry is found.
  • 8. About Us  PLM Mechanic specializes in the technical aspects of Oracle’s Agile PLM solution  We offer the following service: – Agile PLM installations and upgrades – Agile PLM maintenance and help desk functions – Agile PLM hosting – Customization  PLM Mechanic also has several product offerings
  • 9. Contact Us         Web: http://www.plmmechanic.com Blog: http://www.plmmechanic.com/blog Facebook: http://facebook.com/PLMMechanic LinkedIn: http://www.linkedin.com/company/plm-mechanic Twitter: @PLMMechanic Email: sales@plmmechanic.com Phone: 512-827-2262 Fax: 512-582-2932