-
Notifications
You must be signed in to change notification settings - Fork 16
Closed
Description
When a job is configured to use ExportToFileTask or ExportBatchToFileTask and does not have a PROCESS-MODULE configured, then there is nothing to execute or write and the job finishes quickly. This can be confusing. It would be better if CoRB complained and told the user that they forgot to configure a PROCESS-MODULE.
The easiest way to enforce it for those Export*ToFileTask is to override the invokeModule() function and add a check to assert that there is a query to execute, and throw an Exception if there isn't. We can add this to the ExportToFileTask, and since ExportBatchToFileTask extends it, it will also require a PROCESS-MODULE
@Override
protected String[] invokeModule() throws CorbException {
if (StringUtils.isEmpty(adhocQuery) && StringUtils.isEmpty(moduleUri)) {
throw new CorbException(Options.PROCESS_MODULE + " must be specified.");
}
return super.invokeModule();
}
Metadata
Metadata
Assignees
Labels
No labels