Search in sources :

Example 1 with Progress

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;
}
Also used : Progress(uk.ac.bbsrc.tgac.miso.core.data.workflow.Progress)

Example 2 with 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);
}
Also used : Progress(uk.ac.bbsrc.tgac.miso.core.data.workflow.Progress)

Example 3 with Progress

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);
}
Also used : ProgressImpl(uk.ac.bbsrc.tgac.miso.core.data.workflow.impl.ProgressImpl) Progress(uk.ac.bbsrc.tgac.miso.core.data.workflow.Progress) WorkflowName(uk.ac.bbsrc.tgac.miso.core.data.workflow.Workflow.WorkflowName)

Example 4 with 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);
}
Also used : Progress(uk.ac.bbsrc.tgac.miso.core.data.workflow.Progress)

Example 5 with 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;
}
Also used : Progress(uk.ac.bbsrc.tgac.miso.core.data.workflow.Progress) Date(java.util.Date)

Aggregations

Progress (uk.ac.bbsrc.tgac.miso.core.data.workflow.Progress)11 Date (java.util.Date)2 Test (org.junit.Test)2 AbstractDAOTest (uk.ac.bbsrc.tgac.miso.AbstractDAOTest)2 ProgressStep (uk.ac.bbsrc.tgac.miso.core.data.workflow.ProgressStep)2 PoolProgressStep (uk.ac.bbsrc.tgac.miso.core.data.workflow.impl.PoolProgressStep)2 ProgressImpl (uk.ac.bbsrc.tgac.miso.core.data.workflow.impl.ProgressImpl)2 SampleProgressStep (uk.ac.bbsrc.tgac.miso.core.data.workflow.impl.SampleProgressStep)2 Criteria (org.hibernate.Criteria)1 Before (org.junit.Before)1 WorkflowName (uk.ac.bbsrc.tgac.miso.core.data.workflow.Workflow.WorkflowName)1