You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by gi...@apache.org on 2020/11/27 16:05:01 UTC

[incubator-hop-docs] branch asf-site updated: Documentation updated to 64e9f1d

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

git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-hop-docs.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 490d382  Documentation updated to 64e9f1d
490d382 is described below

commit 490d3829c17cc7060ecb55e4be5d279cb064bb69
Author: jenkins <bu...@apache.org>
AuthorDate: Fri Nov 27 16:04:55 2020 +0000

    Documentation updated to 64e9f1d
---
 .../modules/.asciidoctor/pages/index.adoc          |  2 +
 hop-user-manual/modules/ROOT/nav.adoc              |  2 +
 .../modules/ROOT/pages/plugins/actions/eval.adoc   | 85 +++++++++-------------
 .../ROOT/pages/plugins/actions/repeat-end.adoc     | 13 ++++
 .../modules/ROOT/pages/plugins/actions/repeat.adoc | 41 +++++++++++
 5 files changed, 93 insertions(+), 50 deletions(-)

diff --git a/hop-user-manual/modules/.asciidoctor/pages/index.adoc b/hop-user-manual/modules/.asciidoctor/pages/index.adoc
index e1b99da..b9bf6a0 100644
--- a/hop-user-manual/modules/.asciidoctor/pages/index.adoc
+++ b/hop-user-manual/modules/.asciidoctor/pages/index.adoc
@@ -256,6 +256,7 @@ include::{sourcepath}/plugins/actions/deleteresultfilenames.adoc[leveloffset=+2]
 include::{sourcepath}/plugins/actions/msgboxinfo.adoc[leveloffset=+2]
 include::{sourcepath}/plugins/actions/dostounix.adoc[leveloffset=+2]
 include::{sourcepath}/plugins/actions/pgpencryptfiles.adoc[leveloffset=+2]
+include::{sourcepath}/plugins/actions/repeat-end.adoc[leveloffset=+2]
 include::{sourcepath}/plugins/actions/evalfilesmetrics.adoc[leveloffset=+2]
 include::{sourcepath}/plugins/actions/evaluatetablecontent.adoc[leveloffset=+2]
 include::{sourcepath}/plugins/actions/ftpdelete.adoc[leveloffset=+2]
@@ -280,6 +281,7 @@ include::{sourcepath}/plugins/actions/ping.adoc[leveloffset=+2]
 include::{sourcepath}/plugins/actions/pipeline.adoc[leveloffset=+2]
 include::{sourcepath}/plugins/actions/ftpput.adoc[leveloffset=+2]
 include::{sourcepath}/plugins/actions/sftpput.adoc[leveloffset=+2]
+include::{sourcepath}/plugins/actions/repeat.adoc[leveloffset=+2]
 include::{sourcepath}/plugins/actions/sql.adoc[leveloffset=+2]
 include::{sourcepath}/plugins/actions/sendnagiospassivecheck.adoc[leveloffset=+2]
 include::{sourcepath}/plugins/actions/syslog.adoc[leveloffset=+2]
diff --git a/hop-user-manual/modules/ROOT/nav.adoc b/hop-user-manual/modules/ROOT/nav.adoc
index d120703..514a6ed 100644
--- a/hop-user-manual/modules/ROOT/nav.adoc
+++ b/hop-user-manual/modules/ROOT/nav.adoc
@@ -239,6 +239,7 @@
 *** xref:plugins/actions/msgboxinfo.adoc[Display Msgbox info]
 *** xref:plugins/actions/dostounix.adoc[Dos To Unix]
 *** xref:plugins/actions/pgpencryptfiles.adoc[Encrypt files with PGP]
+*** xref:plugins/actions/repeat-end.adoc[End Repeat]
 *** xref:plugins/actions/evalfilesmetrics.adoc[Evaluate File Metrics]
 *** xref:plugins/actions/evaluatetablecontent.adoc[Evaluate rows number in a table]
 *** xref:plugins/actions/ftpdelete.adoc[FTP delete]
@@ -263,6 +264,7 @@
 *** xref:plugins/actions/pipeline.adoc[Pipeline]
 *** xref:plugins/actions/ftpput.adoc[Put a file with FTP]
 *** xref:plugins/actions/sftpput.adoc[Put a file with SFTP]
+*** xref:plugins/actions/repeat.adoc[Repeat]
 *** xref:plugins/actions/sql.adoc[SQL Script Executor]
 *** xref:plugins/actions/sendnagiospassivecheck.adoc[Send Nagios check]
 *** xref:plugins/actions/syslog.adoc[Send information using Syslog]
diff --git a/hop-user-manual/modules/ROOT/pages/plugins/actions/eval.adoc b/hop-user-manual/modules/ROOT/pages/plugins/actions/eval.adoc
index 8c844d4..6538f58 100644
--- a/hop-user-manual/modules/ROOT/pages/plugins/actions/eval.adoc
+++ b/hop-user-manual/modules/ROOT/pages/plugins/actions/eval.adoc
@@ -23,41 +23,35 @@ The result of a JavaScript action is either true or false. In other words, it ne
 Here are a few possible evaluations to end your script with:
 
 [source,javascript]
-----
 lines_input > 100
-----
 
 or
 
 [source,javascript]
-----
 true
-----
 
 or
 
 [source,javascript]
-----
 parent_workflow.getVariable("INPUT_DIRECTORY").equals("/tmp");
-----
 
 The following variables are available for the expression:
 
 [width="90%", options="header"]
 |===
 |Variable|Description
-|errors|Number of errors in the previous workflow action (long).
-|lines_input|Number of rows read from database or file (long).
-|lines_output|Number of rows written to database or file (long).
-|lines_updated|Number of rows updated in a database table (long).
-|lines_read|number of rows read from a previous pipeline transform (long).
-|lines_written|Number of rows written to a next pipeline transform (long).
-|files_retrieved|Number of files retrieved from an FTP server (long).
-|exit_status|The exit status of a shell script (integer).
-|nr (integer)|The workflow action number of the previous workflow action (long); increments at every next workflow action.
-|is_windows|use if Hop runs on Windows (boolean).
-|parent_workflow|The parent workflow of the current workflow action.
-|_action_|The current workflow action.
+|```errors```|Number of errors in the previous workflow action (long).
+|```lines_input```|Number of rows read from database or file (long).
+|```lines_output```|Number of rows written to database or file (long).
+|```lines_updated```|Number of rows updated in a database table (long).
+|```lines_read```|number of rows read from a previous pipeline transform (long).
+|```lines_written```|Number of rows written to a next pipeline transform (long).
+|```files_retrieved```|Number of files retrieved from an FTP server (long).
+|```exit_status```|The exit status of a shell script (integer).
+|```nr```|The workflow action number of the previous workflow action (long); increments at every next workflow action.
+|```is_windows```|use if Hop runs on Windows (boolean).
+|```parent_workflow```|The parent workflow of the current workflow action.
+|```__action__```|The current workflow action.
 |===
 
 == Variables
@@ -65,28 +59,24 @@ The following variables are available for the expression:
 Here is how you can evaluate the content of a variable string:
 
 [source,javascript]
-----
 parent_workflow.getVariable("NR_OF_ROWS") == 1000000;
-----
 
 Since we have access to the parent_workflow object, we can also set variables in the parent workflow this way:
 
 [source,javascript]
-----
 parent_workflow.setVariable("NR_OF_ROWS", "1000000");
-----
 
 For example you can do something like the following to manipulate variables within this workflow action:
 
 [source,javascript]
 ----
 useDate = parent_workflow.getVariable("use_date").equals("1");
-if (useDate == 0) { //We get to use native java classes as this is using Rhino mocks???
-date = new java.util.Date();
-date.setDate(date.getDate()-1); //Go back 1 full day
-dateFormat = new java.text.SimpleDateFormat("yyyyMMdd");
-newDateStr = dateFormat.format(date);
-parent_workflow.setVariable("start_date", newDateStr);
+if (useDate == 0) {
+  date = new java.util.Date();
+  date.setDate(date.getDate()-1); //Go back 1 full day
+  dateFormat = new java.text.SimpleDateFormat("yyyyMMdd");
+  newDateStr = dateFormat.format(date);
+  parent_workflow.setVariable("start_date", newDateStr);
 }
 true;
 ----
@@ -98,30 +88,25 @@ When a workflow action finishes, the result of the execution will be a Result ob
 [width="90%", options="header"]
 |===
 |Expression|Alternative|Data type|Meaning
-|previous_result.getResult()||boolean|true if the previous workflow action was executed successfully, false if there was some error.
-|previous_result.getExitStatus()|exit_status|int|exit status of previous shell script workflow action
-|previous_result.getActionNr()|nr|int|The action number is increased every time a workflow action is executed.
-|previous_result.getNrErrors()|errors|long|the number of errors, also available as variable "errors".
-|previous_result.getNrLinesInput()|lines_input|long|The number of rows read from a file or database.
-|previous_result.getNrLinesOutput()|lines_output|long|The number of rows written to a file or database.
-|previous_result.getNrLinesRead()|lines_read|long|The number of rows read from previous transforms.
-|previous_result.getNrLinesUpdated()|lines_updated|long|The number of rows updated in a file or database.
-|previous_result.getNrLinesWritten()|lines_written|long|The number of rows written to next transform.
-|previous_result.getNrLinesDeleted()|lines_deleted|long|The number of deleted rows.
-|previous_result.getNrLinesRejected()|lines_rejected|long|The number of rows rejected and passed to another transform via error handling.
-|previous_result.getRows()||List<RowMetaAndData>|The result rows, see also below.
-|previous_result.isStopped()||boolean|Flag to signal if the previous previous workflow action stopped or not.
-|previous_result.getResultFilesList()||List<ResultFile>|The list of all the files used in the previous workflow action (or actions).
-|previous_result.getNrFilesRetrieved()|files_retrieved|int|The number of files retrieved from FTP, SFTP, etc.
-|previous_result.getLogText()||String|The log text of the execution of the previous workflow action and its children.
-|previous_result.getLogChannelId()||String|The ID of the log channel of the previous workflow action. You can use this to look up information on the execution lineage in the log channel log table.
-||is_windows|Boolean|True if the workflow runs on Windows variants, false if this is not the case. 
+|```previous_result.getResult()```||boolean|true if the previous workflow action was executed successfully, false if there was some error.
+|```previous_result.getExitStatus()```|exit_status|int|exit status of previous shell script workflow action
+|```previous_result.getActionNr()```|nr|int|The action number is increased every time a workflow action is executed.
+|```previous_result.getNrErrors()```|errors|long|the number of errors, also available as variable "errors".
+|```previous_result.getNrLinesInput()```|lines_input|long|The number of rows read from a file or database.
+|```previous_result.getNrLinesOutput()```|lines_output|long|The number of rows written to a file or database.
+|```previous_result.getNrLinesRead()```|lines_read|long|The number of rows read from previous transforms.
+|```previous_result.getNrLinesUpdated()```|lines_updated|long|The number of rows updated in a file or database.
+|```previous_result.getNrLinesWritten()```|lines_written|long|The number of rows written to next transform.
+|```previous_result.getNrLinesDeleted()```|lines_deleted|long|The number of deleted rows.
+|```previous_result.getNrLinesRejected()```|lines_rejected|long|The number of rows rejected and passed to another transform via error handling.
+|```previous_result.getRows()```||List<RowMetaAndData>|The result rows, see also below.
+|```previous_result.isStopped()```||boolean|Flag to signal if the previous previous workflow action stopped or not.
+|```previous_result.getResultFilesList()```||List<ResultFile>|The list of all the files used in the previous workflow action (or actions).
+|```previous_result.getNrFilesRetrieved()```|files_retrieved|int|The number of files retrieved from FTP, SFTP, etc.
+|```previous_result.getLogText()```||String|The log text of the execution of the previous workflow action and its children.
+|```previous_result.getLogChannelId()```||String|The ID of the log channel of the previous workflow action. You can use this to look up information on the execution lineage in the log channel log table.
 |===
 
-=== Platform
-
-We also expose a variable called "is_windows" to help you make platform specific choices.
-
 === Rows
 
 The "rows" variable we expose to JavaScript helps you evaluate the result rows you passed to the next workflow action using the "Copy rows to result" transform.
diff --git a/hop-user-manual/modules/ROOT/pages/plugins/actions/repeat-end.adoc b/hop-user-manual/modules/ROOT/pages/plugins/actions/repeat-end.adoc
new file mode 100644
index 0000000..58fec3e
--- /dev/null
+++ b/hop-user-manual/modules/ROOT/pages/plugins/actions/repeat-end.adoc
@@ -0,0 +1,13 @@
+:documentationPath: /plugins/actions/
+:language: en_US
+:page-alternativeEditUrl: https://github.com/apache/incubator-hop/edit/master/plugins/actions/repeat/src/main/doc/repeat-end.adoc
+= End Repeat
+
+== Description
+
+This action allows you to a end repeating workflow which is executed by the Repeat action.
+It leaves a flag in the parent workflow to signal it can stop repeating at the next opportunity.
+
+*NOTE* The End Repeat action only works against its parent workflow when it's being executed by the Repeat action.
+
+This action has no options.  It works as a "Success" action and clears possible previous errors.
diff --git a/hop-user-manual/modules/ROOT/pages/plugins/actions/repeat.adoc b/hop-user-manual/modules/ROOT/pages/plugins/actions/repeat.adoc
new file mode 100644
index 0000000..e68f3e6
--- /dev/null
+++ b/hop-user-manual/modules/ROOT/pages/plugins/actions/repeat.adoc
@@ -0,0 +1,41 @@
+:documentationPath: /plugins/actions/
+:language: en_US
+:page-alternativeEditUrl: https://github.com/apache/incubator-hop/edit/master/plugins/actions/repeat/src/main/doc/repeat.adoc
+= Repeat
+
+== Description
+
+This action allows you to repeat the pipeline or workflow of your choice until a certain condition.
+The condition is either:
+
+* A variable in the workflow is set or set to a certain value
+* The End Repeat action is executed in the specified repeating workflow
+
+== Options
+
+[width="90%", options="header"]
+|===
+|Option|Description
+
+|Workflow action name|The name of the workflow action.
+
+|File to repeat|The filename of the pipeline or workflow to execute repeatedly.
+
+|Run configuration|The pipeline or workflow run configuration to use.
+
+*Please note* that if you set a variable on a remote server the value is currently not reported back so only local workflow engines are currently supported.
+
+|Stop repeating when this variable is set|Specify the variable you want to be checked before stopping the repeat loop
+
+|Optional variable value| Only stop repeating when the above variable is set and contains this exact value
+
+|Keep variable values after execution| This option keeps the variable values after a (repeating) pipeline or workflow execution to inject into the next iteration.
+
+|Logging file|In this group you can specify if you want to log to a file and how that should be done
+
+|Parameters/Variables to set|You can specify the values of any parameters or variables in this dialog.
+The values can contain variables themselves which will be resolved before every iteration.
+If the option ```Keep variable values after execution``` is set we evaluate the expression only once before the first execution of the file.
+
+|===
+