LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Asynchronous process in plugin causes automatic rollback of script actions

I have a dialog in the attached plugin I'm creating, and it has an asynchronous event handlercall, which also calls a second asynchronous event handler) to handle display of a string on the FP. Even though these processes appear to be complete by the time the scripts are done executing, the script actions are rolled back. If I disable the second (nested) async call, I can get the scripts to not roll back most of the time, if I insert sufficient delay between at the end of the execute script VI.

 

Two questions:

 

1. Why are my scripts being rolled back, even though "Fail transaction?" is false?

2. Can I prevent the transaction recording so as to circumvent the rollback?

3. Is it not allowed to have nested asynchronous calls within a plugin?

 

Plugin function: Right-click on any cluster node to get "Unbundle..." and "Bundle..." dialogs, or add, remove, and rearrange named (un)bundlers via dialog.

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 1 of 4
(2,263 Views)

I have highlighted the disabled code in the dialog (Cluster Item Selection_DIALOG.vi) in case anyone would like to try setting the bad code free.

 

dialog.PNG

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 2 of 4
(2,306 Views)

Can you try the fix posted here and see if it solves the issue?

 

https://forums.ni.com/t5/LabVIEW-Shortcut-Menu-Plug-Ins/Bug-Fix-for-ALL-Right-Click-Menu-Plug-Ins-LV...

0 Kudos
Message 3 of 4
(2,287 Views)

This fix did solve the issue. I will post an updated version of the plugin, along with an installer which installs the patch VI provided.

 

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 4 of 4
(2,260 Views)