parent
8bfe22bf57
commit
2a1e7d3db6
1 changed files with 6 additions and 2 deletions
|
|
@ -299,7 +299,7 @@ public abstract class OrderElement extends IntegrationEntity implements
|
|||
//we have to remove the TaskSource which contains a TaskGroup instead of TaskElement
|
||||
removeTaskSource(result);
|
||||
}
|
||||
if(currentTaskSourceIsNotTheSame()) {
|
||||
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()) {
|
||||
|
|
@ -316,7 +316,7 @@ public abstract class OrderElement extends IntegrationEntity implements
|
|||
if (wasASchedulingPoint()) {
|
||||
result.add(taskSourceRemoval());
|
||||
}
|
||||
if(currentTaskSourceIsNotTheSame()) {
|
||||
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()) {
|
||||
|
|
@ -356,6 +356,10 @@ public abstract class OrderElement extends IntegrationEntity implements
|
|||
return getOnDBTaskSource() != getTaskSource();
|
||||
}
|
||||
|
||||
protected boolean hadATaskSource() {
|
||||
return getOnDBTaskSource() != null;
|
||||
}
|
||||
|
||||
private List<TaskSourceSynchronization> childrenSynchronizations() {
|
||||
List<TaskSourceSynchronization> childrenOfGroup = new ArrayList<TaskSourceSynchronization>();
|
||||
for (OrderElement orderElement : getSomewhatScheduledOrderElements()) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue