This is an automated email from the ASF dual-hosted git repository.

hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hop.git


The following commit(s) were added to refs/heads/master by this push:
     new 52e05cfbae fix for issue #2461
     new 9674a6ff6c Merge pull request #2462 from mattcasters/master
52e05cfbae is described below

commit 52e05cfbaeb8c48f020cea4b77f0f7d73d2c11e2
Author: Matt Casters <[email protected]>
AuthorDate: Thu Feb 23 14:15:51 2023 +0100

    fix for issue #2461
---
 .../BlockUntilTransformsFinish.java                         | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git 
a/plugins/transforms/blockuntiltransformsfinish/src/main/java/org/apache/hop/pipeline/transforms/blockuntiltransformsfinish/BlockUntilTransformsFinish.java
 
b/plugins/transforms/blockuntiltransformsfinish/src/main/java/org/apache/hop/pipeline/transforms/blockuntiltransformsfinish/BlockUntilTransformsFinish.java
index f013ab4692..2d640687cf 100644
--- 
a/plugins/transforms/blockuntiltransformsfinish/src/main/java/org/apache/hop/pipeline/transforms/blockuntiltransformsfinish/BlockUntilTransformsFinish.java
+++ 
b/plugins/transforms/blockuntiltransformsfinish/src/main/java/org/apache/hop/pipeline/transforms/blockuntiltransformsfinish/BlockUntilTransformsFinish.java
@@ -17,18 +17,18 @@
 
 package org.apache.hop.pipeline.transforms.blockuntiltransformsfinish;
 
+import java.util.Iterator;
+import java.util.Map.Entry;
 import org.apache.hop.core.Const;
 import org.apache.hop.core.exception.HopException;
 import org.apache.hop.i18n.BaseMessages;
 import org.apache.hop.pipeline.Pipeline;
 import org.apache.hop.pipeline.PipelineMeta;
+import org.apache.hop.pipeline.engine.EngineComponent;
 import org.apache.hop.pipeline.engine.IEngineComponent;
 import org.apache.hop.pipeline.transform.BaseTransform;
 import org.apache.hop.pipeline.transform.TransformMeta;
 
-import java.util.Iterator;
-import java.util.Map.Entry;
-
 /** Block all incoming rows until defined transforms finish processing rows. */
 public class BlockUntilTransformsFinish
     extends BaseTransform<BlockUntilTransformsFinishMeta, 
BlockUntilTransformsFinishData> {
@@ -102,10 +102,15 @@ public class BlockUntilTransformsFinish
       while (it.hasNext()) {
         Entry<Integer, IEngineComponent> e = it.next();
         IEngineComponent transform = e.getValue();
-        if (transform.isRunning()) {
+        if (transform.getStatus() == 
EngineComponent.ComponentExecutionStatus.STATUS_RUNNING
+            || transform.getStatus() == 
EngineComponent.ComponentExecutionStatus.STATUS_IDLE
+            || transform.getStatus() == 
EngineComponent.ComponentExecutionStatus.STATUS_INIT
+            || transform.getStatus() == 
EngineComponent.ComponentExecutionStatus.STATUS_PAUSED) {
           // This transform is still running...
           data.continueLoop = true;
         } else {
+          log.logBasic(
+              "Transform " + transform.getName() + " status: " + 
transform.getStatusDescription());
           // We have done with this transform.
           // remove it from the map
           data.componentMap.remove(e.getKey());

Reply via email to