Examples of ExecutionStageRecordImpl


Examples of eu.planets_project.tb.impl.model.exec.ExecutionStageRecordImpl

                        execRecord.setEndDate(end);
          }
        }
     
        //1b. every service action gets persisted as a stage record
        ExecutionStageRecordImpl stageRecord = fillInExecutionStageRecord(wfResultItem,actionCounter,execRecord,action,exp.getEntityID());
              execRecord.getStages().add(stageRecord);
       
        //2. or about some general reporting information
        if(action.startsWith(WorkflowResultItem.GENERAL_WORKFLOW_ACTION)){
          execRecord.setReportLog(this.parseReportLog(wfResultItem));
View Full Code Here

Examples of eu.planets_project.tb.impl.model.exec.ExecutionStageRecordImpl

   * @param execRecord the parent record that takes the overall workflow's result
   * @param stageName a stage name to store this information for
   * @return
   */
  private ExecutionStageRecordImpl fillInExecutionStageRecord(WorkflowResultItem wfResultItem, int actionCounter, ExecutionRecordImpl execRecord, String stageName, long eid){
     ExecutionStageRecordImpl stage = new ExecutionStageRecordImpl(execRecord,"["+actionCounter+"] "+stageName);
     //TODO: AL: for now just filling in the endpoint and serviceRecord information
         try {
           //1. set the stage's endpoint
       stage.setEndpoint(new URL(wfResultItem.getServiceEndpoint()));
      
       //2. create the service record information
            if( stage.getEndpoint() != null ) {
                log.info("Recording info about endpoint: "+stage.getEndpoint());
                Calendar exectime = new GregorianCalendar();
                exectime.setTimeInMillis(wfResultItem.getStartTime());
                stage.setServiceRecord( ServiceBrowser.createServiceRecordFromEndpoint( eid, stage.getEndpoint(), exectime ) );
            }
    } catch (MalformedURLException e) {
      log.debug("can't set stage's endpoint."+e);
    }
   
View Full Code Here

Examples of eu.planets_project.tb.impl.model.exec.ExecutionStageRecordImpl

            exceptionReport = "<p>Service Invocation Failed!<br/>" + e + "</p>";
        }
        msAfter = System.currentTimeMillis();

        // Record this one-stage experiment:
        ExecutionStageRecordImpl idStage = new ExecutionStageRecordImpl(null, STAGE_CREATEVIEW);
        wr.getStages().add( idStage );
       
        // Record the endpoint of the service used for this stage.  FIXME Can this be done more automatically, from above?
        idStage.setEndpoint(serviceEndpoint);
       
        List<MeasurementImpl> recs = idStage.getMeasurements();
        recs.add(new MeasurementImpl(TecRegMockup.PROP_SERVICE_TIME, ""+((msAfter-msBefore)/1000.0) ));
       
        // Now record
        try {
            if( success && view.getViewURL() != null ) {
View Full Code Here

Examples of eu.planets_project.tb.impl.model.exec.ExecutionStageRecordImpl

    public WorkflowResult execute( DigitalObject dob ) {
        // Initialise the result:
        WorkflowResult wr = new WorkflowResult();
       
        // Pre-migrate characterise
        ExecutionStageRecordImpl preStage = new ExecutionStageRecordImpl(null, STAGE_PRE_MIGRATE);
        try {
            wr.getStages().add( preStage );
            if( this.preIsCharacterise() ) {
                executeCharacteriseStage(wr, dob, preStage, dpPre );
            }
            if( this.preIsIdentify()) {
                executeIdentifyStage(wr, dob, preStage, idPre );
            }
        } catch (Exception e ) {
            log.error("Pre-migrate stage failed! "+e);
            e.printStackTrace();
        }
        
        // Migrate Stage:
        ExecutionStageRecordImpl migrateStage = new ExecutionStageRecordImpl(null, STAGE_MIGRATE);
        try {
            wr.getStages().add( migrateStage );
            executeMigrateStage(wr, migrateStage, dob);
        } catch (Exception e ) {
            // Create a ServiceReport from the exception.
            // URGENT can we distinguish tool and install error here?
            ServiceReport sr = new ServiceReport(Type.ERROR, Status.TOOL_ERROR, e.toString());
            wr.logReport(sr);
            log.error("Migration failed! "+e);
            e.printStackTrace();
            return wr;
        }

        // Post-migrate characterise
        ExecutionStageRecordImpl postStage = new ExecutionStageRecordImpl(null, STAGE_POST_MIGRATE);
        try {
            wr.getStages().add( postStage );
            if( this.postIsCharacterise() ) {
                executeCharacteriseStage(wr, (DigitalObject)wr.getResult(), postStage, dpPost );
            }
View Full Code Here

Examples of eu.planets_project.tb.impl.model.exec.ExecutionStageRecordImpl

        // Now prepare the result:
        WorkflowResult wr = new WorkflowResult();
       
        // Record this one-stage experiment:
        ExecutionStageRecordImpl idStage = new ExecutionStageRecordImpl(null, STAGE_IDENTIFY);
        wr.getStages().add( idStage );
       
        // Record the endpoint of the service used for this stage.  FIXME Can this be done more automatically, from above?
        idStage.setEndpoint(identifierEndpoint);
       
        List<MeasurementImpl> recs = idStage.getMeasurements();
        recs.add(new MeasurementImpl(TecRegMockup.PROP_SERVICE_TIME, ""+((msAfter-msBefore)/1000.0) ));
       
        // Now record
        try {
            if( success && identify.getTypes() != null && identify.getTypes().size() > 0 ) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.