Getting application context from JavaDelegate
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2015 03:14 AM
Hello,
My Activiti runs as webapp on Tomcat. I need to get its ApplicationContext in JavaDelegate, which is invoked in some process instance inside the Activiti. How should I do it?
My Activiti runs as webapp on Tomcat. I need to get its ApplicationContext in JavaDelegate, which is invoked in some process instance inside the Activiti. How should I do it?
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2015 04:46 AM
Hi,
A solution could be to create a spring bean which implements ApplicationContextAware,
and then just inject this bean reference into your java delegate.
http://www.activiti.org/userguide/#serviceTaskFieldInjection
A solution could be to create a spring bean which implements ApplicationContextAware,
and then just inject this bean reference into your java delegate.
http://www.activiti.org/userguide/#serviceTaskFieldInjection
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2015 04:42 AM
Or use the SpringProcessEngineConfiguration. If you then use 'delegateExpression' with the bean name, it looks up that Spring bean.
