mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

abobrov
30.16.2008 cec880d908a0dab559f4c55e4a0a1aa607594617
opends/src/server/org/opends/server/core/WorkflowTopologyNode.java
@@ -299,6 +299,12 @@
      WorkflowTopologyNode newWorkflow
      )
  {
    // Dont try to add the workflow to itself.
    if (newWorkflow == this)
    {
      return;
    }
    // Check whether subordinates of current workflow should move to the
    // new workflow subordinate list.
    ArrayList<WorkflowTopologyNode> curSubordinateList =
@@ -308,10 +314,17 @@
    {
      DN newDN = newWorkflow.getBaseDN();
      DN subordinateDN = curSubordinate.getBaseDN();
      // Dont try to add workflow when baseDNs are
      // the same on both workflows.
      if (newDN.equals(subordinateDN)) {
        return;
      }
      if (subordinateDN.isDescendantOf(newDN))
      {
        removeSubordinate(curSubordinate);
        newWorkflow.addSubordinateNoCheck(curSubordinate, newWorkflow);
        newWorkflow.addSubordinate(curSubordinate);
      }
    }