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 0bf2c42ede Batch 13: Result sections for the graph actions: Check 
graph database connections, Graph script, Graph index, Graph constraint and 
Create property graph. #8970 (#9200)
0bf2c42ede is described below

commit 0bf2c42edef13dd797fac83365fdaf9690e6fb38
Author: Adalennis <[email protected]>
AuthorDate: Mon Nov 2 15:42:44 2026 +0100

    Batch 13: Result sections for the graph actions: Check graph database 
connections, Graph script, Graph index, Graph constraint and Create property 
graph. #8970 (#9200)
    
    * Batch 13: Result sections for the graph actions: Check graph database 
connections, Graph script, Graph index, Graph constraint and Create property 
graph. #8970
    
    * Graph index and Graph constraint: empty names, vector dimensions and IF 
NOT EXISTS per database, after review. #8970
---
 .../actions/check-graph-database-connections.adoc  | 12 ++++++++++
 .../workflow/actions/create-property-graph.adoc    | 17 +++++++++++++
 .../pages/workflow/actions/graph-constraint.adoc   | 19 +++++++++++++--
 .../ROOT/pages/workflow/actions/graph-index.adoc   | 17 ++++++++++++-
 .../ROOT/pages/workflow/actions/graph-script.adoc  | 28 ++++++++++++++++------
 5 files changed, 83 insertions(+), 10 deletions(-)

diff --git 
a/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/check-graph-database-connections.adoc
 
b/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/check-graph-database-connections.adoc
index 4578556936..70e3029f79 100644
--- 
a/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/check-graph-database-connections.adoc
+++ 
b/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/check-graph-database-connections.adoc
@@ -34,3 +34,15 @@ Enter the names of the connections you want to check in the 
dialog.
 
 NOTE: This action does not (yet) retrieve the list of connections. You really 
need to enter them manually.
 
+== Result
+
+What this action passes on to the next action. See 
xref:workflow/action-results.adoc[Action results] for how results travel 
through a workflow.
+
+[options="header", width="90%", cols="1,3"]
+|===
+|Result|Value
+|True|Every connection of the list was found and answered, with 0 errors. An 
empty list is also true.
+|False|The number of errors is the number of connections that failed: a name 
that is empty or doesn't exist, a server that can't be reached, or a login that 
is refused. All the connections are checked, also after one that fails.
+|Result files|Passed on unchanged.
+|Result rows|Passed on unchanged.
+|===
diff --git 
a/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/create-property-graph.adoc
 
b/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/create-property-graph.adoc
index 38f192289e..f12ae1b31f 100644
--- 
a/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/create-property-graph.adoc
+++ 
b/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/create-property-graph.adoc
@@ -116,3 +116,20 @@ FROM GRAPH_TABLE ( SOCIAL_NETWORK
   COLUMNS (p.name AS person, f.name AS friend, k.since AS since, c.name AS 
friend_works_at) )
 ORDER BY person, friend
 ----
+
+== Result
+
+What this action passes on to the next action. See 
xref:workflow/action-results.adoc[Action results] for how results travel 
through a workflow.
+
+[options="header", width="90%", cols="1,3"]
+|===
+|Result|Value
+|True|The property graph was created, with 0 errors, and with *Create missing 
tables?* the tables that didn't exist yet. Tables that already exist are kept 
as they are. With *Replace an existing graph?* an existing graph with the same 
name is replaced.
+|False|The number of errors is 1. *Property graph name* is empty or holds a 
character that can't be quoted (for example `"`), the *Graph model* doesn't 
exist, the database can't be reached or doesn't support SQL/PGQ, the *Schema* 
doesn't exist, a table is missing while *Create missing tables?* is unchecked, 
or the graph already exists while *Replace an existing graph?* is unchecked.
+|Result files|Passed on unchanged.
+|Result rows|Passed on unchanged.
+|===
+
+WARNING: A *Relational database connection* that is empty or doesn't exist 
doesn't make the action false: the workflow stops with an error, and no hop 
from the action is followed.
+
+NOTE: The tables are created before the property graph. When the `CREATE 
PROPERTY GRAPH` statement fails, for example on a database without SQL/PGQ, the 
tables it created stay.
diff --git 
a/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/graph-constraint.adoc
 
b/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/graph-constraint.adoc
index 129e8d4bf8..1fd692e4b6 100644
--- 
a/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/graph-constraint.adoc
+++ 
b/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/graph-constraint.adoc
@@ -33,11 +33,11 @@ For similar operations on indexes, check the 
xref:workflow/actions/graph-index.a
 * Graph database connection : The name of the graph database connection to 
update constraints on
 * Constraint updates to perform: You can specify your list of constraint 
updates here
 ** Update type : CREATE or DROP
-** Type of object to index on: NODE or RELATIONSHIP
+** Type of object to put constraint on: NODE or RELATIONSHIP
 ** Type of constraint: UNIQUE, NOT_NULL, or NODE_KEY
 ** Constraint name: The name for your constraint (mandatory)
 ** Object name: the label of the node or relationship you want to update a 
constraint for
-** Property: the property to put the constraint on (for NODE_KEY, use 
comma-separated properties like "id,name")
+** Object property: the property to put the constraint on (for NODE_KEY, use 
comma-separated properties like "id,name")
 
 The constraint name, object name and properties can be variables, for example 
`+${PERSON_KEY}+`.
 The action resolves them before it builds the statement, for create and drop, 
and the Cypher preview shows the resolved values.
@@ -56,4 +56,19 @@ shows the exact `CREATE CONSTRAINT` or `DROP CONSTRAINT` 
statements before execu
 The preview is read-only and helps you verify the constraint operations that 
will be performed, 
 including the correct syntax for UNIQUE, NOT_NULL, and NODE_KEY constraints.
 
+== Result
 
+What this action passes on to the next action. See 
xref:workflow/action-results.adoc[Action results] for how results travel 
through a workflow.
+
+[options="header", width="90%", cols="1,3"]
+|===
+|Result|Value
+|True|All the constraint updates ran, with 0 errors. The drops run first, then 
the creates. An empty list is also true.
+|False|The action is never false: see the WARNING.
+|Result files|Passed on unchanged.
+|Result rows|Passed on unchanged.
+|===
+
+WARNING: When a constraint update can't be done, the workflow stops with an 
error and no hop from the action is followed: the *Graph database connection* 
is empty, doesn't exist or can't be reached, an update has no *Update type* (a 
blank type comes back as CREATE when the workflow is loaded from its file), on 
Neo4j *Constraint name* is empty or a create has no *Object property* (a drop 
only uses the name), on Memgraph, which identifies a constraint by label and 
property, *Object name* o [...]
+
+NOTE: On Neo4j the action creates with `IF NOT EXISTS` and drops with `IF 
EXISTS`. Creating a constraint that already exists, or dropping one that 
doesn't, does nothing and the action is still true. This is also the case when 
a constraint with the same name exists on another label or property, or an 
equivalent one exists with another name: nothing is created.
diff --git 
a/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/graph-index.adoc 
b/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/graph-index.adoc
index 6ea5dae87c..26a9452260 100644
--- a/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/graph-index.adoc
+++ b/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/graph-index.adoc
@@ -36,7 +36,7 @@ For similar operations on constraints, check the 
xref:workflow/actions/graph-con
 ** Type of object to index on: NODE or RELATIONSHIP
 ** Index name: optional but recommended name for your index
 ** Object name: the label of the node or relationship you want to update an 
index for
-** Properties: the comma separated list of node or relationship properties to 
index
+** Properties (, separated): the comma separated list of node or relationship 
properties to index
 ** Index type: RANGE for a regular property index (the default), VECTOR for a 
vector index
 ** Vector dimensions: VECTOR only, the number of numbers in each vector, for 
example 768 for `nomic-embed-text`
 ** Vector similarity: VECTOR only, COSINE (the default) or EUCLIDEAN
@@ -93,4 +93,19 @@ shows the exact `CREATE INDEX` or `DROP INDEX` statements 
before execution.
 
 The preview is read-only and helps you verify the index operations that will 
be performed.
 
+== Result
 
+What this action passes on to the next action. See 
xref:workflow/action-results.adoc[Action results] for how results travel 
through a workflow.
+
+[options="header", width="90%", cols="1,3"]
+|===
+|Result|Value
+|True|All the index updates ran, with 0 errors. The drops run first, then the 
creates. An empty list is also true. An empty *Index name* is only fine where 
the database doesn't use names: to create a RANGE index on Neo4j, which then 
names the index, for range indexes on Memgraph, and for every index on 
FalkorDB. In the other cases it stops the workflow, see the WARNING.
+|False|The action is never false: see the WARNING.
+|Result files|Passed on unchanged.
+|Result rows|Passed on unchanged.
+|===
+
+WARNING: When an index update can't be done, the workflow stops with an error 
and no hop from the action is followed: the *Graph database connection* is 
empty, doesn't exist or can't be reached, an update has no *Update type*, an 
index is created without *Object name* or *Properties* (on Memgraph and 
FalkorDB, which identify an index by them, also when it is dropped, except a 
Memgraph vector index), a VECTOR index is created with *Vector dimensions* that 
are empty, not a number or not po [...]
+
+NOTE: On Neo4j and Apache AGE the action creates with `IF NOT EXISTS` and 
drops with `IF EXISTS`. Creating an index that already exists, or dropping one 
that doesn't, does nothing and the action is still true. On Neo4j this is also 
the case when an index with the same name exists on another label or property, 
or an equivalent one exists with another name: nothing is created.
diff --git 
a/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/graph-script.adoc 
b/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/graph-script.adoc
index 87399be7a3..f03c707f0e 100644
--- a/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/graph-script.adoc
+++ b/docs/hop-user-manual/modules/ROOT/pages/workflow/actions/graph-script.adoc
@@ -28,7 +28,7 @@ under the License.
 The `Graph script` action (previously Neo4j Cypher script) executes statements 
on a graph database in a workflow: Cypher statements, or Gremlin traversals on 
Gremlin servers.
 
 As with all actions, the goal is not to retrieve data but to execute various 
statements like creating or dropping indexes, calling APOC procedures, add or 
delete some static data and so on. +
-The result of this action is a `true` or `false` exit code that determines if 
a success or failure hop to the next action in the workflow is chosen.
+The result of this action is a `true` or `false` exit code that determines if 
a success or failure hop to the next action in the workflow is chosen, except 
when the connection can't be used: see <<Result>>.
 
 == Important
 
@@ -48,24 +48,38 @@ On Memgraph every statement runs on its own in an 
auto-commit transaction.
 |===
 |Option |Description
 
-|Connection name
+|Graph database connection
 |The name of the connection on which you want to execute the cypher statements.
 
-|Script
+|Cypher Script
 |The script with cypher commands separated by a semi-colon (;) on a new line.
 For examples see below.
 
-|Replace variables
+|Replace variables in script?
 |Check this option if you want to replace variables in the format 
`+${VARIABLE_NAME}+` in the script prior to execution.
 |===
 
 == Example
 
-[source,CREATE INDEX idx_person_name on :Person(name)]
+[source,cypher]
 ----
-CREATE INDEX idx_company_id on :Company(id)
+CREATE INDEX idx_person_name IF NOT EXISTS FOR (n:Person) ON (n.name)
 ;
-CREATE INDEX idx_company_id on :Company(id)
+CREATE INDEX idx_company_id IF NOT EXISTS FOR (n:Company) ON (n.id)
 ;
 ----
 
+== Result
+
+What this action passes on to the next action. See 
xref:workflow/action-results.adoc[Action results] for how results travel 
through a workflow.
+
+[options="header", width="90%", cols="1,3"]
+|===
+|Result|Value
+|True|All the statements ran, with 0 errors. An empty script is also true. A 
query that returns rows is true too: the rows are not passed on.
+|False|The number of errors is 1. A statement fails, for example invalid 
Cypher, a semicolon at the end of a line instead of on a new line (Neo4j then 
gets two statements as one), or on Neo4j index or constraint changes and data 
changes in the same script, in either order (`Tried to execute Write query 
after executing Schema modification`, or the other way around). See 
<<Transactions>> for the statements that are kept.
+|Result files|Passed on unchanged.
+|Result rows|Passed on unchanged.
+|===
+
+WARNING: A *Graph database connection* that is empty, doesn't exist, can't be 
reached or refuses the login doesn't make the action false: the workflow stops 
with an error, and no hop from the action is followed.

Reply via email to