*/
@Override
public WorkflowInstance get(String id) throws WorkflowException {
ParamChecker.notNull(id, "id");
try {
ResultSetReader rs = SqlStatement.parse(SqlStatement.selectColumns(OozieColumn.PI_state).where(
SqlStatement.isEqual(OozieColumn.PI_wfId, ParamChecker.notNull(id, "id"))).
prepareAndSetValues(connection).executeQuery());
rs.next();
LiteWorkflowInstance pInstance = WritableUtils.fromByteArray(rs.getByteArray(OozieColumn.PI_state),
LiteWorkflowInstance.class);
return pInstance;
}
catch (SQLException e) {
throw new WorkflowException(ErrorCode.E0713, e.getMessage(), e);