Revision 54854
Added by Claudio Atzori about 5 years ago
ValidatorServiceBlackboardJobNode.java | ||
---|---|---|
6 | 6 |
import eu.dnetlib.enabling.datasources.common.Datasource; |
7 | 7 |
import eu.dnetlib.enabling.datasources.common.DsmException; |
8 | 8 |
import eu.dnetlib.enabling.datasources.common.LocalDatasourceManager; |
9 |
import eu.dnetlib.msro.rmi.MSROException; |
|
10 |
import eu.dnetlib.msro.rmi.MSRORuntimeException; |
|
9 | 11 |
import org.apache.commons.lang.StringUtils; |
10 | 12 |
import org.apache.commons.logging.Log; |
11 | 13 |
import org.apache.commons.logging.LogFactory; |
... | ... | |
212 | 214 |
token.getEnv().setAttribute("validatorError", error); |
213 | 215 |
} |
214 | 216 |
|
217 |
final String dsId = token.getFullEnv().getAttribute(WorkflowsConstants.DATAPROVIDER_ORIGINALID); |
|
218 |
final String ifaceId = token.getFullEnv().getAttribute(WorkflowsConstants.DATAPROVIDER_INTERFACE); |
|
219 |
|
|
215 | 220 |
try { |
216 |
final String dsId = token.getFullEnv().getAttribute(WorkflowsConstants.DATAPROVIDER_ORIGINALID); |
|
217 |
final String ifaceId = token.getFullEnv().getAttribute(WorkflowsConstants.DATAPROVIDER_INTERFACE); |
|
218 |
|
|
219 | 221 |
dsManager.setLastValidationJob(dsId, ifaceId, jobId); |
220 |
|
|
221 |
} catch (final DsmException e) { |
|
222 |
log.error("Error setting last_validation_job field"); |
|
223 |
throw new RuntimeException("Error setting last_validation_job field", e); |
|
222 |
} catch (final Throwable e) { |
|
223 |
final String msg = String.format("Error setting last_validation_job field, BB jobId '%s'", job.getId()); |
|
224 |
log.error(msg); |
|
225 |
job.setError(msg); |
|
226 |
super.onFailed(job); |
|
227 |
throw new MSRORuntimeException(msg, e); |
|
224 | 228 |
} |
225 | 229 |
|
226 | 230 |
super.onDone(job); |
Also available in: Unified diff
fail on dsm error