How to retrive Task object in custom implementation of TaskEventListener ?
Issue
- The requirement is to access the process variables inside the custom implementation of
TaskEventListeneruponTaskClaimedEventis generated. By default the TaskClaimedEvent gives ustaskIdanduserIdit doesn't gives the Task object associated with it. Is there a way to retrieve the Task object from within the implementation of TaskEventListener? - Additionally, while trying to fetch the associated Task object for the
taskIdin the DB from within theTaskEventListenerimplementation it throwsNoEntityFoundexception. So is it like jBPM engine has not yet committed the Task record in the Task table while theTaskClaimedEventhas been generated?
javax.persistence.NoResultException: No entity found for query
Environment
- JBoss Enterprise Business Rules Management System Platform (BRMS)
- 5.3.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
