Workflow finished listeners are fired too often
package org.apache.hop.workflow.actions.workflow;
import org.apache.hop.core.Result;
-import org.apache.hop.core.exception.HopException;
import org.apache.hop.core.extension.ExtensionPointHandler;
import org.apache.hop.core.extension.HopExtensionPoint;
import org.apache.hop.core.logging.ILogChannel;
@@ -59,31 +58,18 @@ public class ActionWorkflowRunner implements Runnable {
return;
}
- // This JobEntryRunner is a replacement for the Workflow thread.
- // The workflow thread is never started because we simply want to wait for the result.
- //
- ExtensionPointHandler.callExtensionPoint(
- log, workflow, HopExtensionPoint.WorkflowStart.id, workflow);
-
if (workflow instanceof LocalWorkflowEngine) {
// We don't want to re-initialize the variables because we defined them already
//
((LocalWorkflowEngine) workflow).setInitializingVariablesOnStart(false);
}
result = workflow.startExecution();
- } catch (HopException e) {
- e.printStackTrace();
- log.logError("An error occurred executing this action : ", e);
- result.setResult(false);
- result.setNrErrors(1);
} finally {
- // Otherwise we will get a null pointer exception if 'workflow finished' listeners will be
- // using it
+ // Remember the result
workflow.setResult(result);
try {
ExtensionPointHandler.callExtensionPoint(
log, workflow, HopExtensionPoint.WorkflowFinish.id, workflow);
- workflow.fireWorkflowFinishListeners();
// catch more general exception to prevent thread hanging
} catch (Exception e) {
