Activiti 6 Use custom bean in listener
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2023 10:10 AM
I am using activiti 6.
I want to configure custom bean which will be used in tasklistener.
Where I can register ?
Other issue is how can I get member os group in TaskListner?
Autowired service is not working in activiti.
public class CreateTask implements TaskListener { }
- Labels:
-
Alfresco Process Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2023 01:35 PM
If you are using the attribute activiti:class, it doesn't resolve the wiring of Spring beans.
In order to enable the wiring for your Spring beans, you have to declare it using the attribute activiti:delegateExpression setting its own Spring Bean Id such as the following:
<serviceTask id="thisIsMyServiceTaskId"
name="Service Task that needs Autowiring" activiti:delegateExpression="${myServiceTaskSpringBeanId}"/>
You can find a complete example in the following tutorial:
Hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2023 10:56 PM
I am using activiti community version,not enterprise.
What ever you have suggested that is applicable to enterprise version only and tasklistner is on user task.
