Getting Activiti to “Talk” to an External Database Koorosh Vakhshoori Software Architect/Senior developer at Synopsys Inc.

Slides:



Advertisements
Similar presentations
ICIS-NPDES Plugin Design Preview Webinar ICIS-NPDES Full Batch OpenNode2 Plugin Project Presented by Bill Rensmith Windsor Solutions, Inc. 3/15/2012.
Advertisements

Ian J Robotham Software Development Lead Medi-CAL Unit, University of Aberdeen.
Module 12: Auditing SQL Server Environments
PHP and MySQL Database. Connecting to MySQL Note: you need to make sure that you have MySQL software properly installed on your computer before you attempt.
Alfresco Benchmark Framework Derek Hulley Repository and Benchmark Team.
Integrating SOA and the Application Development Framework Shaun O’Brien Principal Product Manager – Oracle JDeveloper / ADF.
Fast Track to ColdFusion 9. Getting Started with ColdFusion Understanding Dynamic Web Pages ColdFusion Benchmark Introducing the ColdFusion Language Introducing.
Computational Physics Kepler Dr. Guy Tel-Zur. This presentations follows “The Getting Started with Kepler” guide. A tutorial style manual for scientists.
International User Group Information Delivery Manuals: General Overview Courtesy:This presentation is based on material provided by AEC3 and AEC Infosystems.
Simple Web SQLite Manager/Form/Report
Spring-Batch Tutorial Guide for Application Developers.
JBPM Kickstart Bob Brady ChemBio Informatics Platform.
UNIT-V The MVC architecture and Struts Framework.
Jason Morrill NCOAUG Training Day February, 2008
Alfresco – An Open Source Content Management System - Bindu Nayar, Bhavana Mohanraj.
Submitted by: Madeeha Khalid Sana Nisar Ambreen Tabassum.
Native Support for Web Services  Native Web services access  Enables cross platform interoperability  Reduces middle-tier dependency (no IIS)  Simplifies.
Grant Ronald Principal Product Manager JDeveloper and ADF for Forms Developers: Taking it to the next level.
 A databases is a collection of data organized to make it easy to search and easy to retrieve in a useful, usable form.
Learning objectives By the end of this lecture you should be able to:  have a well-earned rest! Ch 24 Beyond the second semester.
MySQL Databases & PHP Integration Using PHP to write data to, and retrieve data from, a MySQL database.
IT 456 Seminar 5 Dr Jeffrey A Robinson. Overview of Course Week 1 – Introduction Week 2 – Installation of SQL and management Tools Week 3 - Creating and.
Oracle Data Integrator Procedures, Advanced Workflows.
ASP.NET The Clock Project. The ASP.NET Clock Project The ASP.NET Clock Project is the topic of Chapter 23. By completing the clock project, you will learn.
Java Portals and Portlets Submitted By: Rashi Chopra CIS 764 Fall 2007 Rashi Chopra.
Database Concepts Track 3: Managing Information using Database.
Oracle Data Integrator Data Quality (Integrity Control)
Unit 18 Advanced Database Design
Java Beans. Definitions A reusable software component that can be manipulated visually in a ‘builder tool’. (from JavaBean Specification) The JavaBeans.
KEW Definitions Document Type The Document Type defines the routing definition and other properties for a set of documents. Each document is an instance.
Database Management System. DBMS A software package that allows users to create, retrieve and modify databases. A database is a collection of related.
UML Diagrams for Caradon developers Daniel DG Moth Core Development Group, Research Student University of Brighton, MSc Object Oriented Software Technology.
XmlBlackBox The presentation Alexander Crea June the 15st 2010 The presentation Alexander Crea June the 15st 2010
Gourav Atalkar Software Engineer bispsolutions.wordpress.com.
02 | Data Flow – Extract Data Richard Currey | Senior Technical Trainer–New Horizons United George Squillace | Senior Technical Trainer–New Horizons Great.
MVC WITH CODEIGNITER Presented By Bhanu Priya.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Java Programming: Advanced Topics 1 Enterprise JavaBeans Chapter 14.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Overview of the Spring Framework Introducing.
IceCube DAQ Mtg. 10,28-30 IceCube DAQ: Implementation Plan.
Lab 301 Populating Template Data from a Third Party Data Source Justin Pava, Software Release Manager Andrew Schoonmaker, Software QA Engineer.
Windows Workflow Foundation Guy Burstein Senior Consultant Advantech – Microsoft Division
From Venus to Mars Developer land Real world Maven Alfresco SDK is fun! -Pamp-to-war Alfresco AMP Archetype Share AMP Archetype.
© 2013 IBM Corporation Accelerating Product and Service Innovation Service Virtualization Testing in Managed Environments Michael Elder, IBM Senior Technical.
#SummitNow Using Scheduler with Long Running Activiti Workflow Tasks 6 November 2013 (Barcelona) 14 November 2013 (Boston) Bill Young, Flatirons Solutions.
TIBCO Business Events Online Training. Introduction to TIBCO BE Tibco Business Events is complex event processing software with a powerful engine enables.
Getting Activiti to “Talk” to an External Database Koorosh Vakhshoori Software Architect/Senior developer at Synopsys Inc.
Prepared by: Session ID: Using PeopleSoft Test Framework During Development Matt Shimel Principal Applications Systems Analyst/Developer University of.
SELECT, IMPLEMENT & USE TODAY’S ADVANCED BUSINESS SYSTEMS
SSIS Templates, Configurations & Variables
VB 2010 Pertemuan 10.
School of Business Administration
Getting Activiti to “Talk” to an External Database
Automatic RElease Service
CSCE 741 Software Process Lecture 04 Availability
Housing application Presented by Phil Callaghan MD Caltech CRM
Populating a Data Warehouse
Populating a Data Warehouse
Populating a Data Warehouse
Populating a Data Warehouse
Populating a Data Warehouse
Populating a Data Warehouse
Pre-assessment Questions
PowerApps and Flow.
PCW-09 Vision: Information Center Approval System
SSIS Data Integration Data Warehouse Acceleration
SSIS Data Integration Data Warehouse Acceleration
SSIS Data Integration Data Warehouse Acceleration
Plug-In Architecture Pattern
Demo for Partners and Customers
Presentation transcript:

Getting Activiti to “Talk” to an External Database Koorosh Vakhshoori Software Architect/Senior developer at Synopsys Inc.

Getting Activiti to “Talk” to an External Database Koorosh Vakhshoori Software Architect/Senior developer at Synopsys Inc.

Synopsys Inc. Provider of best-in-class solutions enabling designers to accelerate the creation and verification of complex integrated circuits (IC) and system-on-chip (SoC) designs from concept to silicon.

Use Cases (Insert/Update) Reporting Logging Dashboard

Use Cases (Retrieve) Populating some form field Signal for action or NO action Photo from Flickr by carterse

Simple Article Review Workflow

Do Not Reinvent the Wheel! Alfresco framework Other open source components Photo from Flickr by Balaji.B

Components Alfresco framework alfresco-global.properties Spring framework Dependency injection JdbcTemplate Activiti Listener Service task

Components Alfresco framework alfresco-global.properties Spring framework Dependency injection JdbcTemplate Activiti Listener Service task

alfresco-global.properties ### database connection properties ### external_db.driver=org.gjt.mm.mysql.Driver external_db.username=activiti_app external_db.password=activiti_password external_db.name=ext_db external_db.url=jdbc:mysql://localhost:3306/ext_db?useUnicode=yes &characterEncoding=UTF-8

Dependency Injection - 1 <bean id=“extDataSource“ class="org.apache.commons.dbcp.BasicDataSource“ destroy-method="close"> <property name="driverClassName“ value="${external_db.driver}"/>

Dependency injection - 2 <bean id="AbstractUserTaskDelegate“ parent="baseJavaDelegate" abstract="true“ depends-on="activitiBeanRegistry"/> <bean id="LogActionClass" parent="AbstractUserTaskDelegate" class="com.example.activiti.workflow.LogActionListener">

Listener Code package com.example.workflow.listener; … public class LogTaskCommentListener extends BaseJavaDelegate implements TaskListener { public void notify(DelegateTask task) { … String query = "INSERT INTO article_actions (user, article_id, action) VALUES (?, ?, ?)"; jdbcTemplate.update(query, new Object[] { userName, articleId, action }); } public void setExtDBSource(DataSource extDBSource) { this.jdbcTemplate = new JdbcTemplate(extDBSource); }

Listener Code package com.example.workflow.listener; … public class LogTaskCommentListener extends BaseJavaDelegate implements TaskListener { public void notify(DelegateTask task) { … String query = "INSERT INTO article_actions (user, article_id, action) VALUES (?, ?, ?)"; jdbcTemplate.update(query, new Object[] { userName, articleId, action }); } public void setExtDBSource(DataSource extDBSource) { this.jdbcTemplate = new JdbcTemplate(extDBSource); }

Watch Out Database configuration Connection time out Connection pool size Consider corner cases Database not reachable

Unit Testing Challenges Review Alfresco source code AbstractActivitiComponentTest.java

Unit Testing Components Junit framework Mock framework (mockito) Spring framework SpringJUnit4ClassRunner JdbcTemplate H2 database engine

Unit Testing Components Junit framework Mock framework (mockito) Spring framework SpringJUnit4ClassRunner JdbcTemplate H2 database engine

Test Execution Flow Initialize H2 schema Record behavior (mock) Run test scenario Validate database table Drop table and cleanup

Test Execution Flow Initialize H2 schema Record behavior (mock) Run test scenario Validate database table Drop table and cleanup

Resources Blog Post on How to Implement o-activiti-talking-to-external.html