Search in sources :

Example 1 with WorkflowException

use of ca.corefacility.bioinformatics.irida.exceptions.WorkflowException in project irida by phac-nml.

the class GalaxyHistoriesService method getStatusForHistory.

/**
 * Given a history id returns the status for the given workflow.
 *
 * @param historyId
 *            The history id to use to find a workflow.
 * @return The WorkflowStatus for the given workflow.
 * @throws ExecutionManagerException
 *             If there was an exception when attempting to get the status
 *             for a history.
 */
public GalaxyWorkflowStatus getStatusForHistory(String historyId) throws ExecutionManagerException {
    checkNotNull(historyId, "historyId is null");
    try {
        HistoryDetails details = historiesClient.showHistory(historyId);
        logger.trace("Details for history " + details.getId() + ": state=" + details.getState());
        return GalaxyWorkflowStatus.builder(details).build();
    } catch (ClientHandlerException | UniformInterfaceException e) {
        throw new WorkflowException(e);
    }
}
Also used : ClientHandlerException(com.sun.jersey.api.client.ClientHandlerException) HistoryDetails(com.github.jmchilton.blend4j.galaxy.beans.HistoryDetails) UniformInterfaceException(com.sun.jersey.api.client.UniformInterfaceException) WorkflowException(ca.corefacility.bioinformatics.irida.exceptions.WorkflowException)

Aggregations

WorkflowException (ca.corefacility.bioinformatics.irida.exceptions.WorkflowException)1 HistoryDetails (com.github.jmchilton.blend4j.galaxy.beans.HistoryDetails)1 ClientHandlerException (com.sun.jersey.api.client.ClientHandlerException)1 UniformInterfaceException (com.sun.jersey.api.client.UniformInterfaceException)1