activiti
activiti copied to clipboard
Relationships in domain class
Hi, The problem occurs for Grails 2.1.0 and activiti plugin 5.9 To reproduce it:
- Create a domain class with relationship to another class
- Generate activiti conreoller for this class.
- Define a process for the class. Let's the first task in the process create an instance of a domain class
- Start the application
- Choose any user
- Choose controller for the class defined earlier
- Choose "Create..."
- Fill the form with data and click "Complete task"
The error org.activiti.engine.ActivitiException occurs with message "couldn't find type for [id:1]"
The stacktrace is: org.activiti.engine.ActivitiException: couldn't find type for [id:1] at org.activiti.engine.impl.variable.DefaultVariableTypes.findVariableType(DefaultVariableTypes.java:62) at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.createVariableLocal(VariableScopeImpl.java:223) at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.setVariable(VariableScopeImpl.java:175) at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.setVariables(VariableScopeImpl.java:264) at org.activiti.engine.impl.persistence.entity.TaskEntity.setExecutionVariables(TaskEntity.java:360) at org.activiti.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:54) at org.activiti.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:28) at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24) at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42) at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42) at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40) at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33) at org.activiti.engine.impl.TaskServiceImpl.complete(TaskServiceImpl.java:148) at org.grails.activiti.ActivitiService.completeTask(ActivitiService.groovy:153) at ActivitiGrailsPlugin$_addActivitiMethods_closure11.doCall(ActivitiGrailsPlugin.groovy:159) at delegacje.DelegacjaController$_closure5.doCall(DelegacjaController.groovy:36) at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:195) at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)
Thanks for trying the plugin, Please refer to the sample app at http://grails-activiti-plugin.googlecode.com/files/activiti59-sample.zip.
If you are new user of the plugin and have problem using it, please post your question to the plugin's online group at https://groups.google.com/forum/?fromgroups#!forum/grails-activiti-plugin. Unless you are confirmed that it is a defect of the plugin then you create an issue report here.