[jira] [Updated] (NIFI-12645) InvokeScriptedProcessor: The onStopped method is never called

2024-03-04 Thread Matt Burgess (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-12645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Burgess updated NIFI-12645:

Fix Version/s: 2.0.0
   1.26.0
   Resolution: Fixed
   Status: Resolved  (was: Patch Available)

> InvokeScriptedProcessor: The onStopped method is never called
> -
>
> Key: NIFI-12645
> URL: https://issues.apache.org/jira/browse/NIFI-12645
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
> Environment: All operatiing system
>Reporter: Antonio Pezzuto
>Assignee: Jim Steinebrey
>Priority: Major
>  Labels: easyfix
> Fix For: 2.0.0, 1.26.0
>
> Attachments: Test_Script_Body_InvokeScriptedProcessor.json, 
> image-2024-01-19-12-40-24-453.png, image-2024-01-19-12-41-15-173.png, 
> image-2024-01-19-12-44-08-030.png, image-2024-01-19-12-44-39-464.png
>
>   Original Estimate: 24h
>  Time Spent: 0.5h
>  Remaining Estimate: 23.5h
>
> Processor: *InvokeScriptedProcessor*
> Script Engine : groovy
> The _InvokeScriptedProcessor_ processor was used to create a custom processor 
> in groovy.
> The groovy custom processor exposes the *onStopped* method
>  
> {code:java}
>  public void onStopped(ProcessContext context) throws Exception {
>         System.out.println("Stop")
>         restServer?.shutDown()
>     }{code}
>  
> When the _InvokeScriptedProcessor_ is stopped the groovy processor's 
> *onStopped* method is not invoked.
> I ran the InvokeScriptedProcessor processor in remote debug and the cause 
> seems to be due to a bug in the management of the scriptNeedsReload variable. 
> The groovy processor's onStopped method executes only if the 
> scriptNeedsReload instance variable equals false
> !image-2024-01-19-12-41-15-173.png!
> According to my analysis _scriptNeedsReload_ is always set to true due to an 
> error in the *reloadScript* method.
> Currently the *reloadScript* method returns true if the script body is empty 
> or if there are validation errors, it returns false if there are no 
> validation errors.
> The *reloadScript* method should return true if there are no validation 
> errors and return false if the script body is empty or if there are 
> validation errors.
> !image-2024-01-19-12-44-08-030.png!
> !image-2024-01-19-12-44-39-464.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (NIFI-12645) InvokeScriptedProcessor: The onStopped method is never called

2024-03-04 Thread Matt Burgess (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-12645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Burgess updated NIFI-12645:

Affects Version/s: (was: 1.20.0)
   (was: 1.19.1)
   (was: 1.21.0)
   (was: 1.22.0)
   (was: 1.23.0)
   (was: 1.24.0)
   (was: 1.23.1)
   (was: 1.23.2)
   Status: Patch Available  (was: Open)

> InvokeScriptedProcessor: The onStopped method is never called
> -
>
> Key: NIFI-12645
> URL: https://issues.apache.org/jira/browse/NIFI-12645
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
> Environment: All operatiing system
>Reporter: Antonio Pezzuto
>Assignee: Jim Steinebrey
>Priority: Major
>  Labels: easyfix
> Attachments: Test_Script_Body_InvokeScriptedProcessor.json, 
> image-2024-01-19-12-40-24-453.png, image-2024-01-19-12-41-15-173.png, 
> image-2024-01-19-12-44-08-030.png, image-2024-01-19-12-44-39-464.png
>
>   Original Estimate: 24h
>  Time Spent: 10m
>  Remaining Estimate: 23h 50m
>
> Processor: *InvokeScriptedProcessor*
> Script Engine : groovy
> The _InvokeScriptedProcessor_ processor was used to create a custom processor 
> in groovy.
> The groovy custom processor exposes the *onStopped* method
>  
> {code:java}
>  public void onStopped(ProcessContext context) throws Exception {
>         System.out.println("Stop")
>         restServer?.shutDown()
>     }{code}
>  
> When the _InvokeScriptedProcessor_ is stopped the groovy processor's 
> *onStopped* method is not invoked.
> I ran the InvokeScriptedProcessor processor in remote debug and the cause 
> seems to be due to a bug in the management of the scriptNeedsReload variable. 
> The groovy processor's onStopped method executes only if the 
> scriptNeedsReload instance variable equals false
> !image-2024-01-19-12-41-15-173.png!
> According to my analysis _scriptNeedsReload_ is always set to true due to an 
> error in the *reloadScript* method.
> Currently the *reloadScript* method returns true if the script body is empty 
> or if there are validation errors, it returns false if there are no 
> validation errors.
> The *reloadScript* method should return true if there are no validation 
> errors and return false if the script body is empty or if there are 
> validation errors.
> !image-2024-01-19-12-44-08-030.png!
> !image-2024-01-19-12-44-39-464.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (NIFI-12645) InvokeScriptedProcessor: The onStopped method is never called

2024-03-04 Thread Jim Steinebrey (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-12645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jim Steinebrey updated NIFI-12645:
--
Attachment: (was: Test_InvokeScriptedProcessor.json)

> InvokeScriptedProcessor: The onStopped method is never called
> -
>
> Key: NIFI-12645
> URL: https://issues.apache.org/jira/browse/NIFI-12645
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 1.20.0, 1.19.1, 1.21.0, 1.22.0, 1.23.0, 1.24.0, 1.23.1, 
> 1.23.2
> Environment: All operatiing system
>Reporter: Antonio Pezzuto
>Assignee: Jim Steinebrey
>Priority: Major
>  Labels: easyfix
> Attachments: Test_Script_Body_InvokeScriptedProcessor.json, 
> image-2024-01-19-12-40-24-453.png, image-2024-01-19-12-41-15-173.png, 
> image-2024-01-19-12-44-08-030.png, image-2024-01-19-12-44-39-464.png
>
>   Original Estimate: 24h
>  Time Spent: 10m
>  Remaining Estimate: 23h 50m
>
> Processor: *InvokeScriptedProcessor*
> Script Engine : groovy
> The _InvokeScriptedProcessor_ processor was used to create a custom processor 
> in groovy.
> The groovy custom processor exposes the *onStopped* method
>  
> {code:java}
>  public void onStopped(ProcessContext context) throws Exception {
>         System.out.println("Stop")
>         restServer?.shutDown()
>     }{code}
>  
> When the _InvokeScriptedProcessor_ is stopped the groovy processor's 
> *onStopped* method is not invoked.
> I ran the InvokeScriptedProcessor processor in remote debug and the cause 
> seems to be due to a bug in the management of the scriptNeedsReload variable. 
> The groovy processor's onStopped method executes only if the 
> scriptNeedsReload instance variable equals false
> !image-2024-01-19-12-41-15-173.png!
> According to my analysis _scriptNeedsReload_ is always set to true due to an 
> error in the *reloadScript* method.
> Currently the *reloadScript* method returns true if the script body is empty 
> or if there are validation errors, it returns false if there are no 
> validation errors.
> The *reloadScript* method should return true if there are no validation 
> errors and return false if the script body is empty or if there are 
> validation errors.
> !image-2024-01-19-12-44-08-030.png!
> !image-2024-01-19-12-44-39-464.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (NIFI-12645) InvokeScriptedProcessor: The onStopped method is never called

2024-03-04 Thread Jim Steinebrey (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-12645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jim Steinebrey updated NIFI-12645:
--
Attachment: Test_Script_Body_InvokeScriptedProcessor.json

> InvokeScriptedProcessor: The onStopped method is never called
> -
>
> Key: NIFI-12645
> URL: https://issues.apache.org/jira/browse/NIFI-12645
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 1.20.0, 1.19.1, 1.21.0, 1.22.0, 1.23.0, 1.24.0, 1.23.1, 
> 1.23.2
> Environment: All operatiing system
>Reporter: Antonio Pezzuto
>Assignee: Jim Steinebrey
>Priority: Major
>  Labels: easyfix
> Attachments: Test_Script_Body_InvokeScriptedProcessor.json, 
> image-2024-01-19-12-40-24-453.png, image-2024-01-19-12-41-15-173.png, 
> image-2024-01-19-12-44-08-030.png, image-2024-01-19-12-44-39-464.png
>
>   Original Estimate: 24h
>  Time Spent: 10m
>  Remaining Estimate: 23h 50m
>
> Processor: *InvokeScriptedProcessor*
> Script Engine : groovy
> The _InvokeScriptedProcessor_ processor was used to create a custom processor 
> in groovy.
> The groovy custom processor exposes the *onStopped* method
>  
> {code:java}
>  public void onStopped(ProcessContext context) throws Exception {
>         System.out.println("Stop")
>         restServer?.shutDown()
>     }{code}
>  
> When the _InvokeScriptedProcessor_ is stopped the groovy processor's 
> *onStopped* method is not invoked.
> I ran the InvokeScriptedProcessor processor in remote debug and the cause 
> seems to be due to a bug in the management of the scriptNeedsReload variable. 
> The groovy processor's onStopped method executes only if the 
> scriptNeedsReload instance variable equals false
> !image-2024-01-19-12-41-15-173.png!
> According to my analysis _scriptNeedsReload_ is always set to true due to an 
> error in the *reloadScript* method.
> Currently the *reloadScript* method returns true if the script body is empty 
> or if there are validation errors, it returns false if there are no 
> validation errors.
> The *reloadScript* method should return true if there are no validation 
> errors and return false if the script body is empty or if there are 
> validation errors.
> !image-2024-01-19-12-44-08-030.png!
> !image-2024-01-19-12-44-39-464.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (NIFI-12645) InvokeScriptedProcessor: The onStopped method is never called

2024-03-04 Thread Jim Steinebrey (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-12645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jim Steinebrey updated NIFI-12645:
--
Attachment: Test_InvokeScriptedProcessor.json

> InvokeScriptedProcessor: The onStopped method is never called
> -
>
> Key: NIFI-12645
> URL: https://issues.apache.org/jira/browse/NIFI-12645
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 1.20.0, 1.19.1, 1.21.0, 1.22.0, 1.23.0, 1.24.0, 1.23.1, 
> 1.23.2
> Environment: All operatiing system
>Reporter: Antonio Pezzuto
>Assignee: Jim Steinebrey
>Priority: Major
>  Labels: easyfix
> Attachments: Test_InvokeScriptedProcessor.json, 
> image-2024-01-19-12-40-24-453.png, image-2024-01-19-12-41-15-173.png, 
> image-2024-01-19-12-44-08-030.png, image-2024-01-19-12-44-39-464.png
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Processor: *InvokeScriptedProcessor*
> Script Engine : groovy
> The _InvokeScriptedProcessor_ processor was used to create a custom processor 
> in groovy.
> The groovy custom processor exposes the *onStopped* method
>  
> {code:java}
>  public void onStopped(ProcessContext context) throws Exception {
>         System.out.println("Stop")
>         restServer?.shutDown()
>     }{code}
>  
> When the _InvokeScriptedProcessor_ is stopped the groovy processor's 
> *onStopped* method is not invoked.
> I ran the InvokeScriptedProcessor processor in remote debug and the cause 
> seems to be due to a bug in the management of the scriptNeedsReload variable. 
> The groovy processor's onStopped method executes only if the 
> scriptNeedsReload instance variable equals false
> !image-2024-01-19-12-41-15-173.png!
> According to my analysis _scriptNeedsReload_ is always set to true due to an 
> error in the *reloadScript* method.
> Currently the *reloadScript* method returns true if the script body is empty 
> or if there are validation errors, it returns false if there are no 
> validation errors.
> The *reloadScript* method should return true if there are no validation 
> errors and return false if the script body is empty or if there are 
> validation errors.
> !image-2024-01-19-12-44-08-030.png!
> !image-2024-01-19-12-44-39-464.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (NIFI-12645) InvokeScriptedProcessor: The onStopped method is never called

2024-01-19 Thread David Handermann (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-12645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Handermann updated NIFI-12645:

Fix Version/s: (was: 1.25.0)
   (was: 2.0.0-M2)

> InvokeScriptedProcessor: The onStopped method is never called
> -
>
> Key: NIFI-12645
> URL: https://issues.apache.org/jira/browse/NIFI-12645
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 1.20.0, 1.19.1, 1.21.0, 1.22.0, 1.23.0, 1.24.0, 1.23.1, 
> 1.23.2
> Environment: All operatiing system
>Reporter: Antonio Pezzuto
>Priority: Major
>  Labels: easyfix
> Attachments: image-2024-01-19-12-40-24-453.png, 
> image-2024-01-19-12-41-15-173.png, image-2024-01-19-12-44-08-030.png, 
> image-2024-01-19-12-44-39-464.png
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Processor: *InvokeScriptedProcessor*
> Script Engine : groovy
> The _InvokeScriptedProcessor_ processor was used to create a custom processor 
> in groovy.
> The groovy custom processor exposes the *onStopped* method
>  
> {code:java}
>  public void onStopped(ProcessContext context) throws Exception {
>         System.out.println("Stop")
>         restServer?.shutDown()
>     }{code}
>  
> When the _InvokeScriptedProcessor_ is stopped the groovy processor's 
> *onStopped* method is not invoked.
> I ran the InvokeScriptedProcessor processor in remote debug and the cause 
> seems to be due to a bug in the management of the scriptNeedsReload variable. 
> The groovy processor's onStopped method executes only if the 
> scriptNeedsReload instance variable equals false
> !image-2024-01-19-12-41-15-173.png!
> According to my analysis _scriptNeedsReload_ is always set to true due to an 
> error in the *reloadScript* method.
> Currently the *reloadScript* method returns true if the script body is empty 
> or if there are validation errors, it returns false if there are no 
> validation errors.
> The *reloadScript* method should return true if there are no validation 
> errors and return false if the script body is empty or if there are 
> validation errors.
> !image-2024-01-19-12-44-08-030.png!
> !image-2024-01-19-12-44-39-464.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (NIFI-12645) InvokeScriptedProcessor: The onStopped method is never called

2024-01-19 Thread Antonio Pezzuto (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-12645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Antonio Pezzuto updated NIFI-12645:
---
Fix Version/s: 2.0.0-M2

> InvokeScriptedProcessor: The onStopped method is never called
> -
>
> Key: NIFI-12645
> URL: https://issues.apache.org/jira/browse/NIFI-12645
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 1.20.0, 1.19.1, 1.21.0, 1.22.0, 1.23.0, 1.24.0, 1.23.1, 
> 1.23.2
> Environment: All operatiing system
>Reporter: Antonio Pezzuto
>Priority: Major
>  Labels: easyfix
> Fix For: 1.25.0, 2.0.0-M2
>
> Attachments: image-2024-01-19-12-40-24-453.png, 
> image-2024-01-19-12-41-15-173.png, image-2024-01-19-12-44-08-030.png, 
> image-2024-01-19-12-44-39-464.png
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Processor: *InvokeScriptedProcessor*
> Script Engine : groovy
> The _InvokeScriptedProcessor_ processor was used to create a custom processor 
> in groovy.
> The groovy custom processor exposes the *onStopped* method
>  
> {code:java}
>  public void onStopped(ProcessContext context) throws Exception {
>         System.out.println("Stop")
>         restServer?.shutDown()
>     }{code}
>  
> When the _InvokeScriptedProcessor_ is stopped the groovy processor's 
> *onStopped* method is not invoked.
> I ran the InvokeScriptedProcessor processor in remote debug and the cause 
> seems to be due to a bug in the management of the scriptNeedsReload variable. 
> The groovy processor's onStopped method executes only if the 
> scriptNeedsReload instance variable equals false
> !image-2024-01-19-12-41-15-173.png!
> According to my analysis _scriptNeedsReload_ is always set to true due to an 
> error in the *reloadScript* method.
> Currently the *reloadScript* method returns true if the script body is empty 
> or if there are validation errors, it returns false if there are no 
> validation errors.
> The *reloadScript* method should return true if there are no validation 
> errors and return false if the script body is empty or if there are 
> validation errors.
> !image-2024-01-19-12-44-08-030.png!
> !image-2024-01-19-12-44-39-464.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (NIFI-12645) InvokeScriptedProcessor: The onStopped method is never called

2024-01-19 Thread Antonio Pezzuto (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-12645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Antonio Pezzuto updated NIFI-12645:
---
Labels: easyfix  (was: )

> InvokeScriptedProcessor: The onStopped method is never called
> -
>
> Key: NIFI-12645
> URL: https://issues.apache.org/jira/browse/NIFI-12645
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 1.20.0, 1.19.1, 1.21.0, 1.22.0, 1.23.0, 1.24.0, 1.23.1, 
> 1.23.2
> Environment: All operatiing system
>Reporter: Antonio Pezzuto
>Priority: Major
>  Labels: easyfix
> Fix For: 1.25.0
>
> Attachments: image-2024-01-19-12-40-24-453.png, 
> image-2024-01-19-12-41-15-173.png, image-2024-01-19-12-44-08-030.png, 
> image-2024-01-19-12-44-39-464.png
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Processor: *InvokeScriptedProcessor*
> Script Engine : groovy
> The _InvokeScriptedProcessor_ processor was used to create a custom processor 
> in groovy.
> The groovy custom processor exposes the *onStopped* method
>  
> {code:java}
>  public void onStopped(ProcessContext context) throws Exception {
>         System.out.println("Stop")
>         restServer?.shutDown()
>     }{code}
>  
> When the _InvokeScriptedProcessor_ is stopped the groovy processor's 
> *onStopped* method is not invoked.
> I ran the InvokeScriptedProcessor processor in remote debug and the cause 
> seems to be due to a bug in the management of the scriptNeedsReload variable. 
> The groovy processor's onStopped method executes only if the 
> scriptNeedsReload instance variable equals false
> !image-2024-01-19-12-41-15-173.png!
> According to my analysis _scriptNeedsReload_ is always set to true due to an 
> error in the *reloadScript* method.
> Currently the *reloadScript* method returns true if the script body is empty 
> or if there are validation errors, it returns false if there are no 
> validation errors.
> The *reloadScript* method should return true if there are no validation 
> errors and return false if the script body is empty or if there are 
> validation errors.
> !image-2024-01-19-12-44-08-030.png!
> !image-2024-01-19-12-44-39-464.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)