function updateRoot(event) {
    var context = event.context,
        oldRoot = context.oldRoot,
        children = oldRoot.children;

    forEach(children, function(child) {
      if (is(child, 'bpmn:BaseElement')) {
        self.updateParent(child);
      }
    });
  }
/*
   * ## Updating Parent
   *
   * When morphing a Process into a Collaboration or vice-versa,
   * make sure that both the *semantic* and *di* parent of each element
   * is updated.
   *
   */
Updating Parent
When morphing a Process into a Collaboration or vice-versa,
make sure that both the *semantic* and *di* parent of each element
is updated.
Updating Parent When morphing a Process into a Collaboration or vice - versa make sure that both the * semantic * and * di * parent of each element is updated .
function updateRoot(event) {
    var context = event.context,
        oldRoot = context.oldRoot,
        children = oldRoot.children;
    forEach(children, function(child) {
      if (is(child, 'bpmn:BaseElement')) {
        self.updateParent(child);
      }
    });
  }
function updateRoot ( event ) { var context = event . context , oldRoot = context . oldRoot , children = oldRoot . children ; forEach ( children , function ( child ) { if ( is ( child , 'bpmn:BaseElement' ) ) { self . updateParent ( child ) ; } } ) ; }
## Updating Parent
 When morphing a Process into a Collaboration or vice-versa,
 make sure that both the *semantic* and *di* parent of each element
 is updated.
## Updating Parent When morphing a Process into a Collaboration or vice - versa make sure that both the * semantic * and * di * parent of each element is updated .