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

   ### Apache Hop version?
   
   SNAPSHOT-20261021
   
   ### Java version?
   
   Java 21
   
   ### Operating system
   
   macOS
   
   ### What happened?
   
   Found while documenting the result of this action (#8970, seventh batch, PR 
#9132). Reproduced with hop-run; the current behaviour is documented in a NOTE 
on the action page, so the docs need an update when these are fixed.
   
   **1. Most settings are not saved since 57bd0dcdab**
   
   57bd0dcdab ("XML Cleanup for XSLT action") removed `getXml()` and 
`loadXml()`, but only `xmlfilename`, `xslfilename`, `outputfilename` and 
`ifFileExists` got `@HopMetadataProperty` (#4628 restored `ifFileExists` 
afterwards). These fields are no longer saved or loaded:
   
   - `filenamesfromprevious` (Get filenames from previous result)
   - `addfiletoresult` (Add output filename to result)
   - `xsltfactory` (Transformer factory)
   - the Advanced tab: parameters (`parameterField`, `parameterName`) and 
output properties (`outputPropertyName`, `outputPropertyValue`)
   
   They work in Hop Gui until the workflow is saved and opened again; with 
hop-run they are always ignored, also for workflows saved before 57bd0dcdab, 
whose XML still holds the tags. Tested:
   - `<addfiletoresult>Y</addfiletoresult>`: the output file is not added to 
the result files.
   - `<filenamesfromprevious>Y</filenamesfromprevious>` with one previous 
result row (xml, xsl, output): the row is ignored, the empty dialog file names 
are used, and the action fails with "3 filesname is requested!".
   
   **2. If file exists = Create new with unique name overwrites the existing 
file**
   
   `processOneXMLFile` builds the new name in the `outputfilename` string 
(lines 339–363), but the transformation is written to `outputfile` (line 419), 
the FileObject resolved from the original name before. With an existing output 
file holding "old", the action is true, no new file is created, and the 
existing file now holds the transformation result.
   
   **3. A missing XSL file is logged with the XML file name**
   
   In the `else` branch (lines 466–470) both checks log `xmlfilename`: when the 
XSL file doesn't exist, the log says "File [.../in.xml] does not exist!", 
pointing at a file that exists. The second message should use `xslfilename`.
   
   ### 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