Bug 1171134 - Changed task name is not propagated to TaskSummary
Summary: Changed task name is not propagated to TaskSummary
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: jBPM Core
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Mauricio Salatino
QA Contact: Tomas Livora
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-05 13:35 UTC by Tomas Livora
Modified: 2014-12-08 08:28 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-12-08 08:28:13 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1018173 0 high CLOSED I18NTextImpl doesn't update shortText when text is updated 2021-02-22 00:41:40 UTC

Internal Links: 1018173

Description Tomas Livora 2014-12-05 13:35:39 UTC
Description of problem:
When you change the name of a task and then try to get this name through TaskSummary interface, you will get the old one.

Version-Release number of selected component (if applicable):
6.1.0 ER2

Steps to Reproduce:
1. Create a process which contains a user task.
2. Execute the process and change task name:
((InternalI18NText)task.getNames().get(0)).setText("New task name");
3. Try to get task name through TaskSummary:
taskService.getTasksAssignedAsPotentialOwner("john", "en-UK").get(0).getName()

Actual results:
There is still old task name if you access the task through TaskSummary interface.

Expected results:
Although new task name is accessible through Task interface, it should also be propagated to TaskSummary.

Comment 1 Kris Verlaenen 2014-12-05 15:28:46 UTC
For performance reasons (to avoid table join), the name of the task is (also) stored as part of the task itself, so you should do:

((InternalTask) task).setName(..)

Does this work for you?

Comment 2 Tomas Livora 2014-12-05 16:06:30 UTC
Yes, this works. But the result is that the name is only changed directly in Task table and not in the other one with names.

Comment 3 Maciej Swiderski 2014-12-05 16:49:53 UTC
you should use setTaskNames method on taskService that will set both instead of directly modifying task instance

https://github.com/droolsjbpm/droolsjbpm-knowledge/blob/master/kie-internal/src/main/java/org/kie/internal/task/api/InternalTaskService.java#L140

Comment 4 Mauricio Salatino 2014-12-05 19:34:21 UTC
Looking at the comments this seems to be already resolved, if not can you please update the bug with the pending issues?

Comment 6 Tomas Livora 2014-12-08 08:28:13 UTC
Kris and Maciej, thanks for the explanation. According to the discussion above, a task name is stored in two different tables because of performance reasons and it can be easily changed in both of them by calling InternalTaskService.setTaskNames(..), so this is not a bug. However, I would recommend to mention this (and maybe other attributes with similar behavior?) somewhere in the documentation. Because as you can see for example in bug 1018173, customers sometimes change the task attributes directly and not by calling InternalTaskService methods.


Note You need to log in before you can comment on or make changes to this bug.