diff --git a/use-cases/src/test/java/org/gcube/application/cms/usecases/ExportConcessioniAsProjects.java b/use-cases/src/test/java/org/gcube/application/cms/usecases/ExportConcessioniAsProjects.java index 4c17513..33ed66d 100644 --- a/use-cases/src/test/java/org/gcube/application/cms/usecases/ExportConcessioniAsProjects.java +++ b/use-cases/src/test/java/org/gcube/application/cms/usecases/ExportConcessioniAsProjects.java @@ -397,7 +397,12 @@ public class ExportConcessioniAsProjects { // Submit for review - project = client.performStep(project.getId(),step()); + project = client.performStep(project.getId(),step("SUBMIT-FOR-REVIEW")); + + // + if(project.getLifecycleInformation().getLastOperationStatus().equals(LifecycleInformation.Status.OK)) + project = client.performStep(project.getId(), step("APPROVE-SUBMITTED")); + System.out.println("Done "+c.getId()+" in "+(System.currentTimeMillis()-startTime)/1000+" sec"); @@ -437,9 +442,9 @@ public class ExportConcessioniAsProjects { return toReturn; } - private static final StepExecutionRequest step(){ + private static final StepExecutionRequest step(String id){ StepExecutionRequest toReturn = new StepExecutionRequest(); - toReturn.setStepID("SUBMIT-FOR-REVIEW"); + toReturn.setStepID(id); return toReturn; }