use of uk.ac.bbsrc.tgac.miso.core.data.workflow.Progress in project miso-lims by miso-lims.
the class WorkflowTestUtils method makeProgress.
static Progress makeProgress(WorkflowName workflowName, ProgressStep... steps) {
Progress progress = new ProgressImpl();
progress.setWorkflowName(workflowName);
progress.setSteps(Arrays.asList(steps));
return progress;
}
use of uk.ac.bbsrc.tgac.miso.core.data.workflow.Progress in project miso-lims by miso-lims.
the class DefaultWorkflowManager method update.
private void update(Progress progress) throws IOException {
Progress managed = progressStore.getManaged(progress.getId());
managed.getSteps().forEach(step -> progressStore.delete(step));
managed.setSteps(progress.getSteps());
setChangeDetails(managed);
progressStore.save(managed);
}
use of uk.ac.bbsrc.tgac.miso.core.data.workflow.Progress in project miso-lims by miso-lims.
the class DefaultWorkflowManager method beginWorkflow.
@Override
public Workflow beginWorkflow(String workflowNameString) throws IOException {
WorkflowName workflowName = WorkflowName.valueOf(workflowNameString);
Progress progress = new ProgressImpl();
progress.setWorkflowName(workflowName);
save(progress);
return workflowName.createWorkflow(progress);
}
use of uk.ac.bbsrc.tgac.miso.core.data.workflow.Progress in project miso-lims by miso-lims.
the class DefaultWorkflowManager method loadWorkflow.
@Override
public Workflow loadWorkflow(long id) throws IOException {
Progress progress = progressStore.get(id);
if (progress == null)
return null;
authorizationManager.throwIfNotOwner(progress.getUser());
return progress.getWorkflowName().createWorkflow(progress);
}
use of uk.ac.bbsrc.tgac.miso.core.data.workflow.Progress in project miso-lims by miso-lims.
the class HibernateProgressDaoIT method createProgress1.
private Progress createProgress1() {
Progress progress = makeProgress(LOAD_SEQUENCER, getDefaultUser(), new Date(), new Date(), Collections.singletonList(makeSampleProgressStep(PROGRESS1_SAMPLE_ID, 0)));
progress.setId(WORKFLOW_PROGRESS_ID_1);
return progress;
}
Aggregations