Process engine spring config file in web project
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-12-2013 05:18 AM
Hi,
I am using Activiti in my web project with Auto-deployment. As i am using auto-deployment,I am going with activiti spring configuration .
How i initialize my process engine when web project instance created. Can we use processEngine.init() method for activiti spring configuration.
Please provide me solution for this.
regards,
suresh kumar
I am using Activiti in my web project with Auto-deployment. As i am using auto-deployment,I am going with activiti spring configuration .
How i initialize my process engine when web project instance created. Can we use processEngine.init() method for activiti spring configuration.
Please provide me solution for this.
regards,
suresh kumar
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-13-2013 02:37 AM
In the activiti REST, we use a ServletContextListener (org.activiti.rest.common.servlet.ActivitiServletContextListener) to get hold of the default process-engine. This is when you're not in a spring-context…
In spring-context, use:
If you have services that depend on the process-engine, the engine will be initialized when it's injected in your service for the first time (thats what a factory-bean is for) and will be resued by all services that depend on it. So once the app-context is booted, the engine is booted as wel. I presume you have a ApplicationContextServletContextListener (not sure what the exact name is in Spring) that initialises the spring-context when the webapp boots, so that's what you need…
In spring-context, use:
<bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean" destroy-method="destroy">
<property name="processEngineConfiguration" ref="processEngineConfiguration" />
</bean>
If you have services that depend on the process-engine, the engine will be initialized when it's injected in your service for the first time (thats what a factory-bean is for) and will be resued by all services that depend on it. So once the app-context is booted, the engine is booted as wel. I presume you have a ApplicationContextServletContextListener (not sure what the exact name is in Spring) that initialises the spring-context when the webapp boots, so that's what you need…
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2013 06:37 AM
Thank you for your feedback and present i have done POC from standalone application for Autodeployment. I need to implement Activiti Engine in web application with Auto-deployment. Please let me know what are the things i need to do.
regards,
suresh
regards,
suresh
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2013 04:13 AM
Take a look how the Activiti-explorer works. Basically, you'll need to wire up your spring-context in the servlet-context (e.g.. using a servlet-listener). A lot depends on the technology you want to use. But from the services you write, make sure you have access to the application-context and extract the process-engine from it (or inject it). Then, you can use our API from within any user-requests, using the framework of your choice.
