GitHub user ossDataEngineer added a comment to the discussion: How could I
change a variable defined in JVM scope in JavaScript Action?
Second solution:
Parent Workflow - Set Variable var_retry_attempt=0 (Valid in current workflow)
Child Workflow (where the file download happens) on repeat and END_LOOP is set
after successful attempt and retry count<3 is checked, Javascript action with
following snippet:
```
//'Keep variables after substitutions' must be checked on Repeat Workflow shape
in parent workflow, for this to work
curr_retry_count = parseInt(parent_workflow.getVariable("v_c_RETRY_COUNT"))
new_retry_count = curr_retry_count+1
parent_workflow.setVariable("v_c_RETRY_COUNT", new_retry_count.toString())
true
```
GitHub link:
https://github.com/apache/hop/discussions/5181#discussioncomment-15138639
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]