Creating a subtask throw API should inherit properties from supertask
---------------------------------------------------------------------
Key: JBPM-2936
URL:
https://jira.jboss.org/browse/JBPM-2936
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.4
Reporter: Jimmy Smith
Fix For: jBPM 4.5
When creating a subtask in java code using taskService.newTask(parentTask.id), the
executionId and processInstanceId fields are left blank in the database.
Seeing that the task interface also does not provide a 'getParentTask' method, it
means that there is no way to get the execution or processInstance from within the task
without maybe casting it to a TaskImpl, which defies the purpose of using interfaces in
the first place.
As an example, we have a task with a timer set on a duedate. If the timer fires, a java
class is executed that will create a subtask for a supervisor to follow up (why was the
original task not completed on time?) while leaving the original task intact and in the
same activity (we do not want a state transition to a new activity).
As it is now, we cannot do this programming against the interface API, we have to cast
objects and that also complicates unit testing.
Subtasks by implication should have at least the same processInstance as the parent task,
execution is debatable.
--
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