protected function createGroups($groups, WorkflowDefinition $definition, $clear = false)
    {
        // Create the necessary relation in WorkflowDefinition_Groups
        $source = array('groups' => $groups);
        $this->addManyManyToObject($definition, $source, $clear);
    }