nk from the end node to the old node
        diagram.model.addLinkData({ from: endnode.key, to: tonode.key });
      } else if (newnode.category === 'If') {
        // add Conditional group
        // add group for conditional
        var groupdata = { isGroup: true, cat: newnode.category, text: newnode.category };
        diagram.model.addNodeData(groupdata);
        var group = diagram.findNodeForData(groupdata);
        group.containingGroup = oldlink.containingGroup;
        diagram.select(group);

    