Package eu.planets_project.tb.impl.services.mockups.workflow

Examples of eu.planets_project.tb.impl.services.mockups.workflow.WorkflowResult


            // Process each in turn:
            for( String filename : job.getDigitalObjects() ) {
                Calendar start = Calendar.getInstance();
                log.info("Running job: "+(i+1)+"/"+total);
                DigitalObject dob = dh.get(filename).getDigitalObject();
                WorkflowResult wfr = null;
               
                // Actually run the workflow:
                try {
                    wfr = this.executeWorkflowOn(job, dob);
                    job.setWorkflowResult(filename, wfr);
                } catch( Exception e ) {
                    e.printStackTrace();
                }
               
                // Report:
                if( wfr != null ) {
                    // Patch in the start and end dates:
                    wfr.setStartDate(start);
                    wfr.setEndDate( Calendar.getInstance());
                    // Inspect the report:
                    if( wfr.getReportLog() != null ) {
                        log.info("Got report: " + wfr.getReportLog());
                    }
                    // Is there a result?
                    if( wfr.getResult() != null ) {
                        log.info("Got result: "+wfr.getResult().toString());
                    }
                }

                // Store results in the database:
                this.storeWorkflowResults(job, wfr, dob, filename, batch, exp );
View Full Code Here


     * @param dob The Digital Object to be processed.
     * @return
     * @throws Exception
     */
    private WorkflowResult executeWorkflowOn( TestbedBatchJob job, DigitalObject dob ) throws Exception {
        WorkflowResult wfr = null;
        if( job.getWorkflow() == null ) {
            throw new Exception("Cannot run this workflow, as it is null!");
        }
        try {
            wfr = job.getWorkflow().execute(dob);
View Full Code Here

TOP

Related Classes of eu.planets_project.tb.impl.services.mockups.workflow.WorkflowResult

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.