Merge pull request #2420 from KevinVdV/DS-4239-migrate-workflow-xml-to-spring

[DS-4239] Migrate the workflow.xml to spring
Merging since there are 2 approvals and it's a dependency for https://github.com/DSpace/DSpace/pull/2646
This commit is contained in:
benbosman
2020-01-29 09:19:00 +01:00
committed by GitHub
20 changed files with 1065 additions and 466 deletions

View File

@@ -48,6 +48,7 @@ import org.dspace.harvest.HarvestedCollection;
import org.dspace.harvest.service.HarvestedCollectionService;
import org.dspace.workflow.factory.WorkflowServiceFactory;
import org.dspace.xmlworkflow.WorkflowConfigurationException;
import org.dspace.xmlworkflow.XmlWorkflowFactoryImpl;
import org.dspace.xmlworkflow.factory.XmlWorkflowFactory;
import org.dspace.xmlworkflow.state.Workflow;
import org.dspace.xmlworkflow.storedcomponents.CollectionRole;
@@ -370,11 +371,11 @@ public class CollectionServiceImpl extends DSpaceObjectServiceImpl<Collection> i
Workflow workflow = null;
try {
workflow = workflowFactory.getWorkflow(collection);
} catch (IOException | WorkflowConfigurationException e) {
} catch (WorkflowConfigurationException e) {
log.error(LogManager.getHeader(context, "setWorkflowGroup",
"collection_id=" + collection.getID() + " " + e.getMessage()), e);
}
if (!StringUtils.equals(XmlWorkflowFactory.LEGACY_WORKFLOW_NAME, workflow.getID())) {
if (!StringUtils.equals(XmlWorkflowFactoryImpl.LEGACY_WORKFLOW_NAME, workflow.getID())) {
throw new IllegalArgumentException(
"setWorkflowGroup can be used only on collection with the default basic dspace workflow. "
+ "Instead, the collection: "