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

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


The following commit(s) were added to refs/heads/main by this push:
     new b1ae110de2 Add samples for zip and unzip action (#6011)
b1ae110de2 is described below

commit b1ae110de268ea6b7901982e2bd6dc3726d6fe4e
Author: Drazen Sander <[email protected]>
AuthorDate: Mon Nov 17 12:43:38 2025 +0100

    Add samples for zip and unzip action (#6011)
---
 .../unzip/src/main/samples/actions/unzip-file.hwf  | 114 +++++++++++++++++++++
 .../unzip/src/main/samples/files/unzip-file        | Bin 0 -> 584 bytes
 .../src/main/samples/actions/zip-file-2.hwf        | 112 ++++++++++++++++++++
 .../zipfile/src/main/samples/actions/zip-file.hwf  | 112 ++++++++++++++++++++
 .../zipfile/src/main/samples/files/zip-file.txt    |  17 +++
 5 files changed, 355 insertions(+)

diff --git a/plugins/actions/unzip/src/main/samples/actions/unzip-file.hwf 
b/plugins/actions/unzip/src/main/samples/actions/unzip-file.hwf
new file mode 100644
index 0000000000..bc622e7982
--- /dev/null
+++ b/plugins/actions/unzip/src/main/samples/actions/unzip-file.hwf
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<workflow>
+  <name>unzip-file</name>
+  <name_sync_with_filename>Y</name_sync_with_filename>
+  <description/>
+  <extended_description/>
+  <workflow_version/>
+  <created_user>-</created_user>
+  <created_date>2025/11/14 20:32:45.439</created_date>
+  <modified_user>-</modified_user>
+  <modified_date>2025/11/14 20:32:45.439</modified_date>
+  <parameters>
+    </parameters>
+  <actions>
+    <action>
+      <name>Start</name>
+      <description/>
+      <type>SPECIAL</type>
+      <attributes/>
+      <DayOfMonth>1</DayOfMonth>
+      <doNotWaitOnFirstExecution>N</doNotWaitOnFirstExecution>
+      <hour>12</hour>
+      <intervalMinutes>60</intervalMinutes>
+      <intervalSeconds>0</intervalSeconds>
+      <minutes>0</minutes>
+      <repeat>N</repeat>
+      <schedulerType>0</schedulerType>
+      <weekDay>1</weekDay>
+      <parallel>N</parallel>
+      <xloc>64</xloc>
+      <yloc>224</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>Unzip file</name>
+      <description/>
+      <type>UNZIP</type>
+      <attributes/>
+      <SpecifyFormat>N</SpecifyFormat>
+      <addOriginalTimestamp>N</addOriginalTimestamp>
+      <adddate>N</adddate>
+      <addfiletoresult>N</addfiletoresult>
+      <addtime>N</addtime>
+      <afterunzip>0</afterunzip>
+      <create_move_to_directory>N</create_move_to_directory>
+      <createfolder>Y</createfolder>
+      <iffileexists>0</iffileexists>
+      <isfromprevious>N</isfromprevious>
+      <nr_limit>10</nr_limit>
+      <rootzip>N</rootzip>
+      <setOriginalModificationDate>N</setOriginalModificationDate>
+      <success_condition>success_if_no_errors</success_condition>
+      <targetdirectory>${PROJECT_HOME}/actions/unzip-file</targetdirectory>
+      <zipfilename>${PROJECT_HOME}/files/unzip-file</zipfilename>
+      <parallel>N</parallel>
+      <xloc>256</xloc>
+      <yloc>224</yloc>
+      <attributes_hac/>
+    </action>
+  </actions>
+  <hops>
+    <hop>
+      <from>Start</from>
+      <to>Unzip file</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>Y</unconditional>
+    </hop>
+  </hops>
+  <notepads>
+    <notepad>
+      <backgroundcolorblue>251</backgroundcolorblue>
+      <backgroundcolorgreen>232</backgroundcolorgreen>
+      <backgroundcolorred>201</backgroundcolorred>
+      <bordercolorblue>90</bordercolorblue>
+      <bordercolorgreen>58</bordercolorgreen>
+      <bordercolorred>14</bordercolorred>
+      <fontbold>N</fontbold>
+      <fontcolorblue>90</fontcolorblue>
+      <fontcolorgreen>58</fontcolorgreen>
+      <fontcolorred>14</fontcolorred>
+      <fontitalic>N</fontitalic>
+      <fontname>Segoe UI</fontname>
+      <fontsize>11</fontsize>
+      <height>90</height>
+      <xloc>48</xloc>
+      <yloc>80</yloc>
+      <note>The Unzip File action extracts one or more files to a specified 
target location.
+
+Example:
+The Unzip File action extracts the file unzip-file stored in 
config/projects/samples/files and creates a folder named unzip-file in 
config/projects/samples/actions to store the extracted content.</note>
+      <width>1340</width>
+    </notepad>
+  </notepads>
+  <attributes/>
+</workflow>
diff --git a/plugins/actions/unzip/src/main/samples/files/unzip-file 
b/plugins/actions/unzip/src/main/samples/files/unzip-file
new file mode 100644
index 0000000000..c4bf108909
Binary files /dev/null and 
b/plugins/actions/unzip/src/main/samples/files/unzip-file differ
diff --git a/plugins/actions/zipfile/src/main/samples/actions/zip-file-2.hwf 
b/plugins/actions/zipfile/src/main/samples/actions/zip-file-2.hwf
new file mode 100644
index 0000000000..806a87ac1e
--- /dev/null
+++ b/plugins/actions/zipfile/src/main/samples/actions/zip-file-2.hwf
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<workflow>
+  <name>zip-file-2</name>
+  <name_sync_with_filename>Y</name_sync_with_filename>
+  <description/>
+  <extended_description/>
+  <workflow_version/>
+  <created_user>-</created_user>
+  <created_date>2025/11/14 20:02:33.717</created_date>
+  <modified_user>-</modified_user>
+  <modified_date>2025/11/14 20:02:33.717</modified_date>
+  <parameters>
+    </parameters>
+  <actions>
+    <action>
+      <name>Start</name>
+      <description/>
+      <type>SPECIAL</type>
+      <attributes/>
+      <DayOfMonth>1</DayOfMonth>
+      <doNotWaitOnFirstExecution>N</doNotWaitOnFirstExecution>
+      <hour>12</hour>
+      <intervalMinutes>60</intervalMinutes>
+      <intervalSeconds>0</intervalSeconds>
+      <minutes>0</minutes>
+      <repeat>N</repeat>
+      <schedulerType>0</schedulerType>
+      <weekDay>1</weekDay>
+      <parallel>N</parallel>
+      <xloc>80</xloc>
+      <yloc>176</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>Zip file</name>
+      <description/>
+      <type>ZIP_FILE</type>
+      <attributes/>
+      <SpecifyFormat>N</SpecifyFormat>
+      <adddate>N</adddate>
+      <addfiletoresult>N</addfiletoresult>
+      <addtime>N</addtime>
+      <afterzip>0</afterzip>
+      <compressionrate>1</compressionrate>
+      <createMoveToDirectory>N</createMoveToDirectory>
+      <createparentfolder>Y</createparentfolder>
+      <ifzipfileexists>2</ifzipfileexists>
+      <include_subfolders>Y</include_subfolders>
+      <isfromprevious>N</isfromprevious>
+      <sourcedirectory>${PROJECT_HOME}/files</sourcedirectory>
+      <stored_source_path_depth>1</stored_source_path_depth>
+      <zipfilename>${PROJECT_HOME}/actions/zip-files/zip-files</zipfilename>
+      <parallel>N</parallel>
+      <xloc>272</xloc>
+      <yloc>176</yloc>
+      <attributes_hac/>
+    </action>
+  </actions>
+  <hops>
+    <hop>
+      <from>Start</from>
+      <to>Zip file</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>Y</unconditional>
+    </hop>
+  </hops>
+  <notepads>
+    <notepad>
+      <backgroundcolorblue>251</backgroundcolorblue>
+      <backgroundcolorgreen>232</backgroundcolorgreen>
+      <backgroundcolorred>201</backgroundcolorred>
+      <bordercolorblue>90</bordercolorblue>
+      <bordercolorgreen>58</bordercolorgreen>
+      <bordercolorred>14</bordercolorred>
+      <fontbold>N</fontbold>
+      <fontcolorblue>90</fontcolorblue>
+      <fontcolorgreen>58</fontcolorgreen>
+      <fontcolorred>14</fontcolorred>
+      <fontitalic>N</fontitalic>
+      <fontname>Segoe UI</fontname>
+      <fontsize>11</fontsize>
+      <height>90</height>
+      <xloc>80</xloc>
+      <yloc>32</yloc>
+      <note>The Zip File action creates a standard ZIP archive.
+
+Example:
+This action compresses all files located in config/projects/samples/files and 
creates a ZIP file in the config/projects/samples/actions/zip-files 
directory.</note>
+      <width>1008</width>
+    </notepad>
+  </notepads>
+  <attributes/>
+</workflow>
diff --git a/plugins/actions/zipfile/src/main/samples/actions/zip-file.hwf 
b/plugins/actions/zipfile/src/main/samples/actions/zip-file.hwf
new file mode 100644
index 0000000000..32e61a9b0f
--- /dev/null
+++ b/plugins/actions/zipfile/src/main/samples/actions/zip-file.hwf
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<workflow>
+  <name>zip-file</name>
+  <name_sync_with_filename>Y</name_sync_with_filename>
+  <description/>
+  <extended_description/>
+  <workflow_version/>
+  <created_user>-</created_user>
+  <created_date>2025/11/14 20:02:33.717</created_date>
+  <modified_user>-</modified_user>
+  <modified_date>2025/11/14 20:02:33.717</modified_date>
+  <parameters>
+    </parameters>
+  <actions>
+    <action>
+      <name>Start</name>
+      <description/>
+      <type>SPECIAL</type>
+      <attributes/>
+      <DayOfMonth>1</DayOfMonth>
+      <doNotWaitOnFirstExecution>N</doNotWaitOnFirstExecution>
+      <hour>12</hour>
+      <intervalMinutes>60</intervalMinutes>
+      <intervalSeconds>0</intervalSeconds>
+      <minutes>0</minutes>
+      <repeat>N</repeat>
+      <schedulerType>0</schedulerType>
+      <weekDay>1</weekDay>
+      <parallel>N</parallel>
+      <xloc>80</xloc>
+      <yloc>176</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>Zip file</name>
+      <description/>
+      <type>ZIP_FILE</type>
+      <attributes/>
+      <SpecifyFormat>N</SpecifyFormat>
+      <adddate>N</adddate>
+      <addfiletoresult>N</addfiletoresult>
+      <addtime>N</addtime>
+      <afterzip>0</afterzip>
+      <compressionrate>1</compressionrate>
+      <createMoveToDirectory>N</createMoveToDirectory>
+      <createparentfolder>Y</createparentfolder>
+      <ifzipfileexists>2</ifzipfileexists>
+      <include_subfolders>Y</include_subfolders>
+      <isfromprevious>N</isfromprevious>
+      <sourcedirectory>${PROJECT_HOME}/files/zip-file.txt</sourcedirectory>
+      <stored_source_path_depth>1</stored_source_path_depth>
+      <zipfilename>${PROJECT_HOME}/actions/zip-files/zip-file</zipfilename>
+      <parallel>N</parallel>
+      <xloc>272</xloc>
+      <yloc>176</yloc>
+      <attributes_hac/>
+    </action>
+  </actions>
+  <hops>
+    <hop>
+      <from>Start</from>
+      <to>Zip file</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>Y</unconditional>
+    </hop>
+  </hops>
+  <notepads>
+    <notepad>
+      <backgroundcolorblue>251</backgroundcolorblue>
+      <backgroundcolorgreen>232</backgroundcolorgreen>
+      <backgroundcolorred>201</backgroundcolorred>
+      <bordercolorblue>90</bordercolorblue>
+      <bordercolorgreen>58</bordercolorgreen>
+      <bordercolorred>14</bordercolorred>
+      <fontbold>N</fontbold>
+      <fontcolorblue>90</fontcolorblue>
+      <fontcolorgreen>58</fontcolorgreen>
+      <fontcolorred>14</fontcolorred>
+      <fontitalic>N</fontitalic>
+      <fontname>Segoe UI</fontname>
+      <fontsize>11</fontsize>
+      <height>90</height>
+      <xloc>80</xloc>
+      <yloc>32</yloc>
+      <note>The Zip File action creates a standard ZIP archive.
+
+Example:
+This action compresses zip-file.txt located in config/projects/samples/files 
and creates a ZIP file in the config/projects/samples/actions/zip-files 
directory.</note>
+      <width>1028</width>
+    </notepad>
+  </notepads>
+  <attributes/>
+</workflow>
diff --git a/plugins/actions/zipfile/src/main/samples/files/zip-file.txt 
b/plugins/actions/zipfile/src/main/samples/files/zip-file.txt
new file mode 100644
index 0000000000..e327935b46
--- /dev/null
+++ b/plugins/actions/zipfile/src/main/samples/files/zip-file.txt
@@ -0,0 +1,17 @@
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Zip-file example
\ No newline at end of file

Reply via email to