[
https://jira.jboss.org/browse/JBPM-2924?page=com.atlassian.jira.plugin.sy...
]
Maciej Swiderski commented on JBPM-2924:
----------------------------------------
In fact you can use another available event type to capture it:
<task name='task1' assignee='alex'>
<on event='assign'>
<event-listener class='" + TaskEventListener.class.getName() +
"' />
</on>
<transition name='to task2' to='task2' g='-50,-21'/>
"
</task>
Assigning task is last thing that happens when starting a task, so you will get access to
your task from event listener by executing following code:
public void notify(EventListenerExecution execution) {
DbSession session = EnvironmentImpl.getFromCurrent(DbSession.class);
TaskImpl task = session.findTaskByExecution(execution.getProcessInstance());
}
Do you think it is enough or shall we provide another event type?
Cannot retrieve information about a task within it's start event
handler because task not initialised at the point the handler is invoked
-----------------------------------------------------------------------------------------------------------------------------------------
Key: JBPM-2924
URL:
https://jira.jboss.org/browse/JBPM-2924
Project: jBPM
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: jBPM 4.4
Reporter: Ed Willis
Re-opens
https://jira.jboss.org/browse/JBPM-2644 which, in my opinion, was incorrectly
closed. See last few comments on this Jira for more info.
A common use-case (for us at least, and I suspect for many applications) is to perform
some processing when a task starts in the start event handler. Currently, it is not
possible to retrieve information about the task that has been started (in our case we need
the participants) because it is not initialised when the start event fires.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira