@VisibleForTesting void assignSchemeToProjectTemplate(StatefulTaskProgressSink migrationSink) throws GenericEntityException { // need to find the set of workflows that may need their draft workflows to be copied and deleted, since // the parent workflow may no longer be active. workflowSchemeManager.cleanUpSchemeDraft(project, user); schemeManager.removeSchemesFromProject(project); // Check if associating with none - the default workflow if (targetScheme != null && targetScheme.getId() != null) { Scheme scheme = workflowSchemeManager.getSchemeObject(targetScheme.getId()); schemeManager.addSchemeToProject(project, scheme); } }
workflowSchemeManager.cleanUpSchemeDraft(project, user);