Integrating Grails 2.4.4 with Activiti

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Integrating Grails 2.4.4 with Activiti

Himabindu Medarametla
Hi team,


Could You please forward some sample application for integrating grails 2.4.4 with activiti, i did in many ways i am getting errors.


I am added this code in BuildConfig.groovy, Config.groovy

repositories {
        inherits true // Whether to inherit repository definitions from plugins

        grailsPlugins()
        grailsHome()
        mavenLocal()
        grailsCentral()
        mavenCentral()
        mavenRepo "http://repo.grails.org/grails/core" //for easy grid export
        // uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories
        //mavenRepo "http://repository.codehaus.org"
        //mavenRepo "http://download.java.net/maven/2/"
        //mavenRepo "http://repository.jboss.com/maven2/"
    }

    dependencies {
        // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.
        runtime 'mysql:mysql-connector-java:5.1.29'
        // runtime 'org.postgresql:postgresql:9.3-1101-jdbc41'
        compile "commons-collections:commons-collections:3.2.1"


        test "org.grails:grails-datastore-test-support:1.0.2-grails-2.4"
        runtime 'net.sourceforge.jexcelapi:jxl:2.6.12'

        //provided "com.nipun.utils:inventory-utils:1.0"

        compile "net.sf.jasperreports:jasperreports-fonts:5.6.1"

        compile 'org.apache.httpcomponents:httpclient:4.5.2'

        compile "commons-codec:commons-codec:1.9"
// https://mvnrepository.com/artifact/org.activiti/activiti-spring
compile ("org.activiti:activiti-spring:jar:5.22.0"){
excludes "spring-beans"
}
        // compile 'org.grails.plugins:quartz:2.0.0'
        //compile "org.grails.plugins:quartz:1.0.2"
    }


 Config.groovy
-------------------------


activiti {
processEngineName = "activiti-engine-default"
jobExecutorActivate = false
asyncExecutorActivate = false
databaseType = "mysql"
history = "audit"
}

environments {
    development {
        grails.logging.jul.usebridge = true
activiti {
processEngineName = "activiti-engine-dev"
databaseSchemaUpdate = "true"
}
        //        grails.serverURL = "http://localhost:8080/MaterialManagement/dashboard/main"
    }
    production {
        grails.logging.jul.usebridge = true
activiti {
processEngineName = "activiti-engine-prod"
databaseSchemaUpdate = false
}
        //        grails.serverURL = "localhost:8080/smartInventory"
        //        grails.serverURL = "localhost:8080/MaterialManagement/dashboard/loginpage"
    }
}

DataSource.groovy
---------------------------------

dataSource {
    pooled = true
    jmxExport = true
    driverClassName = "com.mysql.jdbc.Driver"
    dialect="org.hibernate.dialect.MySQL5InnoDBDialect"
    username =  grailsApplication.metadata['database.username']
    // password =  "root"
    password = grailsApplication.metadata['database.password']
}
hibernate {
    cache.use_second_level_cache = true
    cache.use_query_cache = false
    //    cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory' // Hibernate 3
    cache.region.factory_class = 'org.hibernate.cache.ehcache.EhCacheRegionFactory' // Hibernate 4
    singleSession = true // configure OSIV singleSession mode
    flush.mode = 'manual' // OSIV session flush mode outside of transactional context
}

// environment specific settings
environments {
    development {
        dataSource {
            dbCreate = "validate" // one of 'create', 'create-drop', 'update', 'validate', ''
            url = grailsApplication.metadata['database.url']
            username = grailsApplication.metadata['database.username']
            // password =  "root"
            password =  grailsApplication.metadata['database.password']
            properties {
                // See http://grails.org/doc/latest/guide/conf.html#dataSource for documentation
                jmxEnabled = true
                initialSize = 5
                maxActive = 50
                minIdle = 5
                maxIdle = 25
                maxWait = 10000
                maxAge = 10 * 60000
                timeBetweenEvictionRunsMillis = 5000
                minEvictableIdleTimeMillis = 60000
                validationQuery = "SELECT 1"
                validationQueryTimeout = 3
                validationInterval = 15000
                testOnBorrow = true
                testWhileIdle = true
                testOnReturn = false
                jdbcInterceptors = "ConnectionState"
                defaultTransactionIsolation = java.sql.Connection.TRANSACTION_READ_COMMITTED
            }
        }

        /* dataSource_test2 {
         dbCreate = "update" // one of 'create', 'create-drop', 'update', 'validate', ''
         driverClassName = 'com.mysql.jdbc.Driver'
         username = "root"
         password = "Nipun@123"
         url = "jdbc:mysql://localhost:3306/user_management"
         }*/

    }
    test {
        dataSource {
            dbCreate = "validate" // one of 'create', 'create-drop', 'update', 'validate', ''
            url = grailsApplication.metadata['database.url']
            username = grailsApplication.metadata['database.username']
            // password =  "root"
            password = grailsApplication.metadata['database.password']
            // password =  "root"
        }
    }
    production {
        dataSource {
            dbCreate = "validate" // one of 'create', 'create-drop', 'update', 'validate', ''
            url = grailsApplication.metadata['database.url']
            username = grailsApplication.metadata['database.username']
            // password =  "root"
            password =   grailsApplication.metadata['database.password']
            properties {
                // See http://grails.org/doc/latest/guide/conf.html#dataSource for documentation
                jmxEnabled = true
                initialSize = 5
                maxActive = 50
                minIdle = 5
                maxIdle = 25
                maxWait = 10000
                maxAge = 10 * 60000
                timeBetweenEvictionRunsMillis = 5000
                minEvictableIdleTimeMillis = 60000
                validationQuery = "SELECT 1"
                validationQueryTimeout = 3
                validationInterval = 15000
                testOnBorrow = true
                testWhileIdle = true
                testOnReturn = false
                jdbcInterceptors = "ConnectionState"
                defaultTransactionIsolation = java.sql.Connection.TRANSACTION_READ_COMMITTED
            }
        }
    }
}

when i refresh the dependencies it's working fine.After running the application activiti related tables are not created in DataBase.
How to solve this Issue.Could You please help me.


Thanks&Regards.
V.HimaBindu

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/315b37c3-e79b-4f07-bf07-921e8bfc0b7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.