protected function createImport($name, $filename, $record)
    {
        // This is needed to feed WorkflowService#getNamedTemplate()
        $import = ImportedWorkflowTemplate::create();
        $import->Name = $name;
        $import->Filename = $filename;
        $import->Content = serialize($record);
        $import->write();

        return $import;
    }