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

   ### Apache Hop version?
   
   2.20.0-SNAPSHOT
   
   ### Java version?
   
   openjdk 21
   
   ### Operating system
   
   Windows
   
   ### What happened?
   
   ## What happened?
   
   Verifying a workflow (F7) that contains a **Wait for SQL** action always 
reports an error, even when the action is filled in correctly. No database is 
required.
   
   ### Steps to reproduce
   
   1. Create a workflow with a **Wait for SQL** action.
   2. Set the database connection to `dummy-db` and the target table to 
`dummy_table`. Leave **Custom SQL** off.
   3. Press F7 (Verify).
   
   ### Actual result
   
   The check result is an error:
   
   ```text
   WaitForSQL cannot be null or blank.
   ```
   
   The log also contains:
   
   ```text
   2026-10-19T10:31:22,739 ERROR 
[org.apache.commons.validator.util.ValidatorUtils] - Unknown property 
'WaitForSQL' on class 'class 
org.apache.hop.workflow.actions.waitforsql.ActionWaitForSql'
   java.lang.NoSuchMethodException: Unknown property 'WaitForSQL' on class 
'class org.apache.hop.workflow.actions.waitforsql.ActionWaitForSql'
           at 
org.apache.commons.beanutils.PropertyUtilsBean.getSimpleProperty(PropertyUtilsBean.java:1232)
           at 
org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:783)
           at 
org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:811)
           at 
org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:396)
           at 
org.apache.commons.validator.util.ValidatorUtils.getValueAsString(ValidatorUtils.java:119)
           at 
org.apache.hop.workflow.action.validator.NotBlankValidator.validate(NotBlankValidator.java:42)
           at 
org.apache.hop.workflow.action.validator.AndValidator.validate(AndValidator.java:46)
           at 
org.apache.hop.workflow.actions.waitforsql.ActionWaitForSql.check(ActionWaitForSql.java:525)
           at 
org.apache.hop.workflow.WorkflowMeta.checkAction(WorkflowMeta.java:1652)
           at 
org.apache.hop.workflow.WorkflowMeta.checkActions(WorkflowMeta.java:1597)
    
   ```
   
   The same error appears when the connection and the table name are left 
empty, so those fields are never reported on their own.
   
   ### Expected result
   
   Verification should use the fields shown in the dialog:
   
   - `connection` is required.
   - `tableName` is required when **Custom SQL** is off.
   - `customSql` is required when **Custom SQL** is on, and `tableName` is not 
required in that case.
   
   A workflow with `connection=dummy-db` and `tableName=dummy_table` should not 
fail verification because of a property named `WaitForSQL`. A missing metadata 
connection may still produce a separate warning that `dummy-db` does not exist. 
That warning is unrelated to this bug.
   
   ## Cause
   
   `ActionWaitForSql.check()` validates the bean property `"WaitForSQL"`. The 
class has no such field or getter. The stored fields are `connection`, 
`tableName`, and `customSql`. `NotBlankValidator` treats the missing property 
as blank, so the check fails for every configuration.
   
   `ActionEvalTableContent.check()` used to validate the same name and now 
checks `connection` plus either `tableName` or `customSql`. Wait for SQL should 
follow that behavior.
   
   ### Issue Priority
   
   Priority: 3
   
   ### Issue Component
   
   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