samuelwillyanto1 opened a new issue, #8726:
URL: https://github.com/apache/hop/issues/8726

   ### Apache Hop version?
   
   2.20.0-SNAPSHOT
   
   ### Java version?
   
   21
   
   ### Operating system
   
   Windows
   
   ### What happened?
   
   There are incorrect validation behaviors during "Verify pipeline" and 
"Verify workflow" in two plugins:
   1. **Closure Generator Transform (`ClosureGeneratorMeta.java`)**:
   In `ClosureGeneratorMeta.check()`, the validation condition checking whether 
the parent ID and child ID fields exist in the input row metadata is inverted 
(`!= null` was used instead of `== null` when creating error remarks).
   - When the field IS found in the input stream 
(`prev.indexOfValue(parentIdFieldName) != -1`), it incorrectly creates an error 
remark: `The fieldname of the parent id could not be found`.
   - When the field is NOT found, it incorrectly creates an OK remark.
   2. **Evaluate Table Content Action (`ActionEvalTableContent.java`)**:
   In `ActionEvalTableContent.check()`, the validator checks a non-existent 
property named `"WaitForSQL"`:
   ```java
   ActionValidatorUtils.andValidator()
       .validate(
           this,
           "WaitForSQL",
           remarks,
           
AndValidator.putValidators(ActionValidatorUtils.notBlankValidator()));
   ```
   Because ActionEvalTableContent has no property named WaitForSQL (it was 
copy-pasted from ActionWaitForSql), running "Verify workflow" always produces a 
false failure: Field [WaitForSQL] can not be blank, even when the action is 
completely and validly configured.
   
   ### Relevant log output
   ***For Closure Generator:***
   Validation warning: "The fieldname of the parent id could not be found." and 
"The fieldname of the child id could not be found." even when both fields exist 
in the previous transform stream.
   ***For Evaluate rows number in a table:***
   Validation warning: "Field [WaitForSQL] can not be blank." even when 
connection and table name are configured properly.
   
   ### Steps to Reproduce
   **Reproduce Closure Generator:**
   1. Create a pipeline: Add a "Generate rows" transform outputting `parent_id` 
and `child_id` fields.
   2. Connect it to a "Closure generator" transform.
   3. Configure Parent ID to `parent_id` and Child ID to `child_id`.
   4. Run `Verify this pipeline` or F7 (Check pipeline).
   5. Observe the warning: "The fieldname of the parent id could not be found."
   
   <img width="977" height="767" alt="Image" 
src="https://github.com/user-attachments/assets/3a63c29c-8a19-4816-b67c-48569e5ad360";
 />
   
   **Reproduce Evaluate Table Content:**
   1. Create a workflow: Add the "Evaluate rows number in a table" action.
   2. Configure a valid database connection and table name.
   3. Run `Verify this workflow` or F7 (Check workflow).
   4. Observe the validation error stating: "Field [WaitForSQL] can not be 
blank."
   
   <img width="1202" height="790" alt="Image" 
src="https://github.com/user-attachments/assets/898b5c46-f40a-4a69-9045-68bcaaa652ec";
 />
   
   ### Expected behavior
   ```
   1. In Closure Generator, "Verify pipeline" should report OK when parent and 
child fields are present in the incoming row stream, and report an error only 
when they are missing.
   2. In Evaluate Table Content, "Verify workflow" should validate `connection` 
and `tableName` (or `customSql` when "Use custom SQL" is checked), and should 
not validate non-existent fields like `WaitForSQL`.
   ```
   
   ### Issue Priority
   
   Priority: 3
   
   ### Issue Component
   
   Component: Transforms, Component: Actions


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to