@Test public void testFromWorkflow() { Log.info("fromWorkflow"); Integer workflowSWA = null; WorkflowReport instance = new WorkflowReport(); instance.fromWorkflow(workflowSWA); fail("The test case is a prototype."); }
public String fromWorkflow(Integer workflowSWA) { StringBuilder result = new StringBuilder(); WorkflowService ws = BeanFactory.getWorkflowServiceBean(); Workflow workflow = ws.findBySWAccession(workflowSWA); if (workflow == null) { throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST, "The workflow does not exist: " + workflowSWA); } result.append("Workflow: ").append(workflow.getName()).append("\tVersion ").append(workflow.getVersion()).append("\tSWID: ") .append(workflow.getSwAccession()).append("\n"); for (WorkflowRun run : workflow.getWorkflowRuns()) { long time = run.getUpdateTimestamp().getTime() - run.getCreateTimestamp().getTime(); result.append("\tRun: ").append(run.getStatus()).append("\tStart Date: ").append(run.getCreateTimestamp()) .append("\tRunning time: ").append(getTime(time)).append("\tSWID: ").append(run.getSwAccession()).append("\n"); for (Processing processing : run.getProcessings()) { calcProcessing(processing, result); } for (Processing processing : run.getOffspringProcessings()) { calcProcessing(processing, result); } } return result.toString(); }
WorkflowReport { public String fromWorkflow(Integer workflowSWA) { StringBuilder result = new StringBuilder(); WorkflowService ws = BeanFactory.getWorkflowServiceBean(); Workflow workflow = ws.findBySWAccession(workflowSWA); if (workflow == null) { throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST, "The workflow does not exist: " + workflowSWA); } result.append("Workflow: ").append(workflow.getName()).append("\tVersion ").append(workflow.getVersion()).append("\tSWID: ") .append(workflow.getSwAccession()).append("\n"); for (WorkflowRun run : workflow.getWorkflowRuns()) { long time = run.getUpdateTimestamp().getTime() - run.getCreateTimestamp().getTime(); result.append("\tRun: ").append(run.getStatus()).append("\tStart Date: ").append(run.getCreateTimestamp()) .append("\tRunning time: ").append(getTime(time)).append("\tSWID: ").append(run.getSwAccession()).append("\n"); for (Processing processing : run.getProcessings()) { calcProcessing(processing, result); } for (Processing processing : run.getOffspringProcessings()) { calcProcessing(processing, result); } } return result.toString(); } }
WorkflowReport { public String fromWorkflow(Integer workflowSWA) { StringBuilder result = new StringBuilder(); WorkflowService ws = BeanFactory.getWorkflowServiceBean(); Workflow workflow = ws.findBySWAccession(workflowSWA); if (workflow == null) { throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST, "The workflow does not exist: " + workflowSWA); } result.append("Workflow: ").append(workflow.getName()).append("\tVersion ").append(workflow.getVersion()).append("\tSWID: ") .append(workflow.getSwAccession()).append("\n"); for (WorkflowRun run : workflow.getWorkflowRuns()) { long time = run.getUpdateTimestamp().getTime() - run.getCreateTimestamp().getTime(); result.append("\tRun: ").append(run.getStatus()).append("\tStart Date: ").append(run.getCreateTimestamp()) .append("\tRunning time: ").append(getTime(time)).append("\tSWID: ").append(run.getSwAccession()).append("\n"); for (Processing processing : run.getProcessings()) { calcProcessing(processing, result); } for (Processing processing : run.getOffspringProcessings()) { calcProcessing(processing, result); } } return result.toString(); }  }
WorkflowReport { public String fromWorkflow(Integer workflowSWA) { StringBuilder result = new StringBuilder(); WorkflowService ws = BeanFactory.getWorkflowServiceBean(); Workflow workflow = ws.findBySWAccession(workflowSWA); if (workflow == null) { throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST, "The workflow does not exist: " + workflowSWA); } result.append("Workflow: ").append(workflow.getName()).append("\tVersion ").append(workflow.getVersion()).append("\tSWID: ") .append(workflow.getSwAccession()).append("\n"); for (WorkflowRun run : workflow.getWorkflowRuns()) { long time = run.getUpdateTimestamp().getTime() - run.getCreateTimestamp().getTime(); result.append("\tRun: ").append(run.getStatus()).append("\tStart Date: ").append(run.getCreateTimestamp()) .append("\tRunning time: ").append(getTime(time)).append("\tSWID: ").append(run.getSwAccession()).append("\n"); for (Processing processing : run.getProcessings()) { calcProcessing(processing, result); } for (Processing processing : run.getOffspringProcessings()) { calcProcessing(processing, result); } } return result.toString(); }  String fromWorkflow(Integer workflowSWA); }
WorkflowReport { public String fromWorkflow(Integer workflowSWA) { StringBuilder result = new StringBuilder(); WorkflowService ws = BeanFactory.getWorkflowServiceBean(); Workflow workflow = ws.findBySWAccession(workflowSWA); if (workflow == null) { throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST, "The workflow does not exist: " + workflowSWA); } result.append("Workflow: ").append(workflow.getName()).append("\tVersion ").append(workflow.getVersion()).append("\tSWID: ") .append(workflow.getSwAccession()).append("\n"); for (WorkflowRun run : workflow.getWorkflowRuns()) { long time = run.getUpdateTimestamp().getTime() - run.getCreateTimestamp().getTime(); result.append("\tRun: ").append(run.getStatus()).append("\tStart Date: ").append(run.getCreateTimestamp()) .append("\tRunning time: ").append(getTime(time)).append("\tSWID: ").append(run.getSwAccession()).append("\n"); for (Processing processing : run.getProcessings()) { calcProcessing(processing, result); } for (Processing processing : run.getOffspringProcessings()) { calcProcessing(processing, result); } } return result.toString(); }  String fromWorkflow(Integer workflowSWA);  }