Behavior of TaskService.deleteTask

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-16-2010 07:37 AM
Hi,
I would like to find out more about the behavior of TaskService.deleteTask. What happened if this method being invoked when the task have assignee or without assignee and what is it impacts to the process instance? Will the process instance be terminated?
Best regards,
Chee Kin
I would like to find out more about the behavior of TaskService.deleteTask. What happened if this method being invoked when the task have assignee or without assignee and what is it impacts to the process instance? Will the process instance be terminated?
Best regards,
Chee Kin
Labels:
- Labels:
-
Archive
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2010 04:20 AM
The task record will simply be deleted from the database.
The process will actually be stuck, since there is no way to continue anymore through that path.
So this method should only be used in admin applications, where people know what they are doing.
Deleting a task makes no sense for an end-user. Closing the task, while providing a reason (eg 'task invalid, John already did this for me') is cleaner and a more traceable approach.
The process will actually be stuck, since there is no way to continue anymore through that path.
So this method should only be used in admin applications, where people know what they are doing.
Deleting a task makes no sense for an end-user. Closing the task, while providing a reason (eg 'task invalid, John already did this for me') is cleaner and a more traceable approach.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2010 10:18 AM
The process will actually be stuck, since there is no way to continue anymore through that path.
Noted. Is that means the process instance is always active?
Regards,
Chee Kin

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2010 10:21 AM
The process will actually be stuck, since there is no way to continue anymore through that path.Noted. Is that means the process instance is always active in this case?
Closing the task, while providing a reason (eg 'task invalid, John already did this for me') is cleaner and a more traceable approach.Is that means provide a way for user to terminate the process (Let's say the user initiates a process by mistake)?
Regards,
Chee Kin
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2010 03:58 AM
Noted. Is that means the process instance is always active in this case?
Yes, the process will be active (it will live in the runtime database tables forever if not removed).
Is that means provide a way for user to terminate the process (Let's say the user initiates a process by mistake)?
No, that would be this method on the RuntimeService:
/** Delete an existing runtime process instance.
* @param processInstanceId id of process instance to delete, cannot be null.
* @param deleteReason reason for deleting, can be null.
* @throws ActivitiException when no process instance is found with the given id.
*/
void deleteProcessInstance(String processInstanceId, String deleteReason);
Deleting a process instance this way, will also delete all attached tasks.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2010 09:44 PM
Noted. Thanks for your advice.
Regards,
Chee Kin
Regards,
Chee Kin
