Hi Team,
I am using activiti in my groovy & grails framework. please let me know how to configure processEngineConfiguration, processEngine and remaining services like as taskService, formService etc. please send me any reference available.
Thanks
Solved! Go to Solution.
BuildConfig.groovy
repositories {
//maven of activiti repository
mavenRepo name: "Activiti", root: "https://maven.alfresco.com/nexus/content/groups/public"
}
dependencies {
runtime 'mysql:mysql-connector-java:5.1.29'
test "org.grails:grails-datastore-test-support:1.0.2-grails-2.4"
//add this line for downloading activiti related jars from repository
compile ('org.activiti:activiti-engine:5.20.0') {
excludes 'livetribe-jsr223', 'spring-beans'
}
runtime ('org.activiti:activiti-spring:5.20.0') {
excludes 'spring-context', 'spring-jdbc', 'spring-orm', 'slf4j-log4j12', 'commons-dbcp'
}
}
}
Configuring ProcessEngineConfiguration in Grails:
In resources.groovy add this Code
resources.groovy:
import org.activiti.spring.SpringProcessEngineConfiguration
import org.hibernate.SessionFactory;
import org.springframework.orm.hibernate3.HibernateTransactionManager
// Place your Spring DSL code here
beans = {
processEngineConfiguration(org.activiti.spring.SpringProcessEngineConfiguration) {
databaseType = "mysql" // (u have to specify which database did u used in your application)
databaseSchemaUpdate = true // create-drop, true, false
dataSource = ref("dataSource")
transactionManager = ref("transactionManager")
history = "audit";
asyncExecutorActivate = false;
jobExecutorActivate = false;
}
processEngine(org.activiti.spring.ProcessEngineFactoryBean) {
processEngineConfiguration = ref("processEngineConfiguration")
}
runtimeService(processEngine:"getRuntimeService")
repositoryService(processEngine:"getRepositoryService")
taskService(processEngine:"getTaskService")
managementService(processEngine:"getManagementService")
identityService(processEngine:"getIdentityService")
historyService(processEngine:"getHistoryService")
formService(processEngine:"getFormService")
baseController(com.nipun.BaseController) {
repositoryService = ref("repositoryService")
runtimeService = ref("runtimeService")
taskService = ref("taskService")
identityService = ref("identityService")
formService = ref("formService")
}
}
Please reply me anyone about this.
BuildConfig.groovy
repositories {
//maven of activiti repository
mavenRepo name: "Activiti", root: "https://maven.alfresco.com/nexus/content/groups/public"
}
dependencies {
runtime 'mysql:mysql-connector-java:5.1.29'
test "org.grails:grails-datastore-test-support:1.0.2-grails-2.4"
//add this line for downloading activiti related jars from repository
compile ('org.activiti:activiti-engine:5.20.0') {
excludes 'livetribe-jsr223', 'spring-beans'
}
runtime ('org.activiti:activiti-spring:5.20.0') {
excludes 'spring-context', 'spring-jdbc', 'spring-orm', 'slf4j-log4j12', 'commons-dbcp'
}
}
}
Configuring ProcessEngineConfiguration in Grails:
In resources.groovy add this Code
resources.groovy:
import org.activiti.spring.SpringProcessEngineConfiguration
import org.hibernate.SessionFactory;
import org.springframework.orm.hibernate3.HibernateTransactionManager
// Place your Spring DSL code here
beans = {
processEngineConfiguration(org.activiti.spring.SpringProcessEngineConfiguration) {
databaseType = "mysql" // (u have to specify which database did u used in your application)
databaseSchemaUpdate = true // create-drop, true, false
dataSource = ref("dataSource")
transactionManager = ref("transactionManager")
history = "audit";
asyncExecutorActivate = false;
jobExecutorActivate = false;
}
processEngine(org.activiti.spring.ProcessEngineFactoryBean) {
processEngineConfiguration = ref("processEngineConfiguration")
}
runtimeService(processEngine:"getRuntimeService")
repositoryService(processEngine:"getRepositoryService")
taskService(processEngine:"getTaskService")
managementService(processEngine:"getManagementService")
identityService(processEngine:"getIdentityService")
historyService(processEngine:"getHistoryService")
formService(processEngine:"getFormService")
baseController(com.nipun.BaseController) {
repositoryService = ref("repositoryService")
runtimeService = ref("runtimeService")
taskService = ref("taskService")
identityService = ref("identityService")
formService = ref("formService")
}
}
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.