Package eu.scape_project.planning.exception

Examples of eu.scape_project.planning.exception.PlanningException


            plan.setExperimentWorkflow(alternative, workflow);
            alternative.getAction().setActionIdentifier("myExperiment-plan");
            addedBytestreams.add(workflow.getPid());
        } catch (StorageException e) {
            log.error("An error occurred while storing the executable plan: {}", e.getMessage());
            throw new PlanningException("An error occurred while storing the profile", e);
        }
    }
View Full Code Here


                        sample.getData().releaseData();
                    }
                }
            }
        } catch (Exception e) {
            throw new PlanningException("Automated evaluation failed", e);
        }
    }
View Full Code Here

       
        String planIdentifier;
        try {
            planIdentifier = planManagement.reservePlanIdentifier();
        } catch (Exception e) {
            throw new PlanningException("Could not reserve Identifier.", e);
        } catch (Throwable e) {
            throw new PlanningException("Could not reserve Identifier.", e);
        }
        this.plan.getPlanProperties().setRepositoryIdentifier(planIdentifier);
        saveWithoutModifyingPlanState();
       

        String binarydataTempPath = OS.getTmpPath() + planIdentifier + "/";
        File binarydataTempDir = new File(binarydataTempPath);
        binarydataTempDir.mkdirs();
        File planFile = new File(binarydataTempPath + "plan.xml");
        try {
            try {
                BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(planFile));
                projectExport.exportComplete(plan.getPlanProperties().getId(), out, binarydataTempPath);
                out.flush();
                out.close();
               
                planManagement.deployPlan(planIdentifier, new FileInputStream(planFile));
            } catch (Exception e) {
                throw new PlanningException("Failed to generate plan.", e);
            }
        } finally {
            OS.deleteDirectory(binarydataTempDir);
        }
    }
View Full Code Here

        final AsyncRequest areq = new AsyncRequest("monitor plan: " + plan.getPlanProperties().getName(), triggers);
        final AsyncRequest areq2 = resource.path(KBUtils.ASYNC_REQUEST + ".json/new").accept(MediaType.APPLICATION_JSON)
                .post(AsyncRequest.class, areq);
      } catch (Exception e) {
        throw new PlanningException("Failed to access endpoint.", e);
      }
      } else {
        throw new PlanningException("No triggers to deploy.");
      }
    }
View Full Code Here

     *             if the executable plan could not be parsed
     */
    public void readT2flowExecutablePlan(InputStream stream) throws PlanningException, TavernaParserException {
        ByteStream bsData = this.convertToByteStream(stream);
        if (bsData == null) {
            throw new PlanningException("An error occurred while storing the executable plan");
        }

        T2FlowParser parser = T2FlowParser.createParser(new ByteArrayInputStream(bsData.getData()));

        String name = parser.getName();
View Full Code Here

            plan.setPreservationActionPlan(digitalObject);
            addedBytestreams.add(digitalObject.getPid());
            plan.getPreservationActionPlan().touch();
        } catch (IOException e) {
            log.error("Error generating preservation action plan {}.", e.getMessage());
            throw new PlanningException("Error generating preservation action plan.", e);
        } catch (StorageException e) {
            log.error("An error occurred while storing the executable plan: {}", e.getMessage());
            throw new PlanningException("An error occurred while storing the profile", e);
        }
    }
View Full Code Here

     * @throws PlanningException
     *             if an error occurred during storing
     */
    public void copyRecommendedExperimentWorkflow() throws PlanningException {
        if (plan.getRecommendation().getAlternative().getExperiment() == null) {
            throw new PlanningException("The recommendation has no experiment defined.");
        }
        if (plan.getRecommendation().getAlternative().getExperiment().getWorkflow() == null) {
            throw new PlanningException("The recommendation experiment has no workflow defined.");
        }

        DigitalObject workflow = plan.getRecommendation().getAlternative().getExperiment().getWorkflow();
        DigitalObject copy = digitalObjectManager.getCopyOfDataFilledDigitalObject(workflow);
        digitalObjectManager.moveDataToStorage(copy);
View Full Code Here

            plan.getExecutablePlanDefinition().setT2flowExecutablePlan(object);
            plan.getExecutablePlanDefinition().getT2flowExecutablePlan().touch();
            addedBytestreams.add(object.getPid());
        } catch (StorageException e) {
            log.error("An error occurred while storing the executable plan: {}", e.getMessage());
            throw new PlanningException("An error occurred while storing the profile", e);
        }
    }
View Full Code Here

        try {
            generator.generate(writer);
        } catch (IOException e) {
            log.warn("An error occured generating the executable plan.", e.getMessage());
            throw new PlanningException("An error occured generating the executable plan.", e);
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                } catch (IOException e) {
                    log.warn("An error occured closing the executable plan generator writer.", e.getMessage());
                    throw new PlanningException("An error occured closing the executable plan generator writer.", e);
                }
            }
        }

        byte[] data = out.toByteArray();
View Full Code Here

            wf.readMetadata();
            String workflowContent = MyExperimentRESTClient.getWorkflowContent(wf);
            generator.setMigrationComponent(wf, workflowContent, parameters);
        } catch (Exception e) {
            log.warn("An error occured querying myExperiment migration component.", e.getMessage());
            throw new PlanningException("An error occurred querying myExperiment migration component", e);
        }
    }
View Full Code Here

TOP

Related Classes of eu.scape_project.planning.exception.PlanningException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.