Bug #1518: Prevent removing the same TaskSource twice.
FEA: ItEr76S04BugFixing
This commit is contained in:
parent
39311a7a03
commit
7a48c66771
1 changed files with 19 additions and 17 deletions
|
|
@ -299,15 +299,16 @@ public abstract class OrderElement extends IntegrationEntity implements
|
|||
//this element was a container but now it's a scheduling point
|
||||
//we have to remove the TaskSource which contains a TaskGroup instead of TaskElement
|
||||
removeTaskSource(result);
|
||||
}
|
||||
if (hadATaskSource() && currentTaskSourceIsNotTheSame()) {
|
||||
//this element was unscheduled and then scheduled again. Its TaskSource has
|
||||
//been recreated but we have to remove the old one.
|
||||
if(!getParent().currentTaskSourceIsNotTheSame()) {
|
||||
//we only remove the TaskSource if the parent is not in the same situation.
|
||||
//In case the parent is in the same situation, it will remove the related
|
||||
//TaskSources in children tasks.
|
||||
removeTaskSource(result);
|
||||
} else {
|
||||
if (hadATaskSource() && currentTaskSourceIsNotTheSame()) {
|
||||
//this element was unscheduled and then scheduled again. Its TaskSource has
|
||||
//been recreated but we have to remove the old one.
|
||||
if(!getParent().currentTaskSourceIsNotTheSame()) {
|
||||
//we only remove the TaskSource if the parent is not in the same situation.
|
||||
//In case the parent is in the same situation, it will remove the related
|
||||
//TaskSources in children tasks.
|
||||
removeTaskSource(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
result
|
||||
|
|
@ -316,14 +317,15 @@ public abstract class OrderElement extends IntegrationEntity implements
|
|||
removeUnscheduled(result);
|
||||
if (wasASchedulingPoint()) {
|
||||
result.add(taskSourceRemoval());
|
||||
}
|
||||
if (hadATaskSource() && currentTaskSourceIsNotTheSame()) {
|
||||
//all the children of this element were unscheduled and then scheduled again,
|
||||
//its TaskSource has been recreated but we have to remove the old one.
|
||||
if(getParent() == null || !getParent().currentTaskSourceIsNotTheSame()) {
|
||||
//if it's a container node inside another container we could have the
|
||||
//same problem than in the case of leaf tasks.
|
||||
result.add(taskSourceRemoval());
|
||||
} else {
|
||||
if (hadATaskSource() && currentTaskSourceIsNotTheSame()) {
|
||||
//all the children of this element were unscheduled and then scheduled again,
|
||||
//its TaskSource has been recreated but we have to remove the old one.
|
||||
if(getParent() == null || !getParent().currentTaskSourceIsNotTheSame()) {
|
||||
//if it's a container node inside another container we could have the
|
||||
//same problem than in the case of leaf tasks.
|
||||
result.add(taskSourceRemoval());
|
||||
}
|
||||
}
|
||||
}
|
||||
result
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue