Changes from 5.0rc1 to 5.0

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2010 11:14 PM
I was using in 5.0rc1 this code to provide activiti with my implementation of the identity session factory…
But I updated to 5.0 and it doesn't work anymore. In 5.0 ProcessEngineConfiguration has no getSessionFactories() method.
How should I implement this functionality?
Thanks!
ProcessEngineConfiguration conf = new ProcessEngineConfiguration();Map<Class<?>, SessionFactory> sessionFactories = conf.getSessionFactories();sessionFactories.put(IdentitySession.class, new MyIdentitySessionFactory());conf.set…engine = conf.buildProcessEngine();return engine;
But I updated to 5.0 and it doesn't work anymore. In 5.0 ProcessEngineConfiguration has no getSessionFactories() method.
How should I implement this functionality?
Thanks!
Labels:
- Labels:
-
Archive
6 REPLIES 6

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2010 11:39 PM
I fixed it changing it to
ProcessEngineConfigurationImpl conf = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration();
and calling conf.buildProcessEngine() before conf.getSessionFactories().
Hope this is the right way
ProcessEngineConfigurationImpl conf = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration();
and calling conf.buildProcessEngine() before conf.getSessionFactories().
Hope this is the right way
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2010 02:58 AM
Mattias,
The ProcessEngineConfiguration allows you to add custom session factories, before it is built:
The ProcessEngineConfiguration allows you to add custom session factories, before it is built:
ProcessEngineConfigurationImpl configuration = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration();
// Add your custom session factory
SessionFactory myFactory = new CustomSessionFactory();
configuration.setCustomSessionFactories(Arrays.asList(myFactory));
ProcessEngine engine = configuration.buildProcessEngine();

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2011 05:00 AM
Hi there,
I try to integrate Activiti and Spring Security by implement the custom SpringProcessEngineConfiguration and Session Factory. Please see the following code:
Then, I configure org.grails.activiti.springsecurity.SpringSecurityProcessEngineConfiguration in spring application context to initialize Activiti process engine. Everything seems working fine without any error. But when I run the integration tests of Activiti's identityService, no invocation route to custom SpringSecurityIdentitySession class. Did I missed anything?
Fyi, I am using Activiti 5.3.
Thanks in advance. Wish to hear from you soon!
Best regards,
Chee Kin
I try to integrate Activiti and Spring Security by implement the custom SpringProcessEngineConfiguration and Session Factory. Please see the following code:
package org.grails.activiti.springsecurity;
import org.activiti.spring.SpringProcessEngineConfiguration;
import org.activiti.engine.ProcessEngine;
import java.util.ArrayList;
class SpringSecurityProcessEngineConfiguration extends SpringProcessEngineConfiguration {
public ProcessEngine buildProcessEngine() {
ArrayList customSessionFactories = new ArrayList(1);
customSessionFactories.add(new SpringSecurityIdentitySessionFactory());
setCustomSessionFactories(customSessionFactories);
return super.buildProcessEngine();
}
}
package org.grails.activiti.springsecurity;
import org.activiti.engine.impl.interceptor.Session;
import org.activiti.engine.impl.interceptor.SessionFactory;
class SpringSecurityIdentitySessionFactory implements SessionFactory {
public Class<?> getSessionType() {
return SpringSecurityIdentitySession.class;
}
public Session openSession() {
return new SpringSecurityIdentitySession();
}
}
Then, I configure org.grails.activiti.springsecurity.SpringSecurityProcessEngineConfiguration in spring application context to initialize Activiti process engine. Everything seems working fine without any error. But when I run the integration tests of Activiti's identityService, no invocation route to custom SpringSecurityIdentitySession class. Did I missed anything?
Fyi, I am using Activiti 5.3.
Thanks in advance. Wish to hear from you soon!
Best regards,
Chee Kin
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2011 07:05 PM
Please post in a new topic…

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2011 11:59 PM
Noted.
Please see the new post here http://forums.activiti.org/en/viewtopic.php?f=6&t=1261
Regards,
Chee Kin
Please see the new post here http://forums.activiti.org/en/viewtopic.php?f=6&t=1261
Regards,
Chee Kin
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2011 02:29 AM
Thanks

