public String getStatus(EndpointReferenceType epr) throws WorkflowException { try { return TavernaWorkflowServiceClient.getStatus(epr).getValue(); } catch (MalformedURIException e) { throw new WorkflowException(e.getMessage(), e); } catch (RemoteException e) { throw new WorkflowException(e.getMessage(), e); } }
public String[] getOutput(EndpointReferenceType epr) throws WorkflowException { if (!this.getStatus(epr).equals("Done")) return null; try { return TavernaWorkflowServiceClient.getOutput(epr).getOutputFile(); } catch (MalformedURIException e) { throw new WorkflowException(e.getMessage(), e); } catch (RemoteException e) { throw new WorkflowException(e.getMessage(), e); } }
@Override protected Vector<Step> steps() { Vector<Step> steps = new Vector<Step>(); File tempMMSServiceDir = new File(SERVICE_TEMP_PATH); // SETUP steps.add(new UnpackContainerStep(getContainer())); steps.add(new CopyServiceStep(getMMSDir(), tempMMSServiceDir)); // CONFIGURE // steps.add(new SetDatabasePropertiesStep(tempMMSServiceDir)); // steps.add(new CreateDatabaseStep(tempMMSServiceDir)); DeployServiceStep deployStep = new DeployServiceStep( getContainer(), tempMMSServiceDir.getAbsolutePath(), Arrays.asList(new String[] {"-Dno.deployment.validation=true"})); steps.add(deployStep); steps.add(new StartContainerStep(getContainer())); EndpointReferenceType epr = null; try { epr = getContainer().getServiceEPR(MMS_URL_PATH); } catch (MalformedURIException e) { e.printStackTrace(); fail("Error constructing client:" + e.getMessage()); } // TEST steps.add(new CheckMetadataStep(epr)); // retrieve failures return steps; }