Can a workflow save itself? #1002
-
Hi all, Can a workflow write a copy of itself? I'm looking for something like a node that triggers "Save as" when it receives an input. Is that possible? A bit more of context for why that would be useful. I use bonsai to control my experimental setup and record ephys/videos. The workflow I use evolves slowly with each iteration of the experiments. I try to save all relevant parameters but it is sometimes a bit hard to find the exact version of the workflow that was used. I can use "Save as" to keep a copy with the data to help but it will save only the main workflow (not the included) and does not save the parameters that are set at initialisation, or manually adjusted at the beginning of the recording. I was wondering if I could have a "save" node in each included workflow and trigger them all when I start to acquire data. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There is currently no one node that does this. I have attached a custom c# script that should be able to copy and paste a target file. In this case you would simply target the workflow itself. |
Beta Was this translation helpful? Give feedback.
There is currently no one node that does this. I have attached a custom c# script that should be able to copy and paste a target file. In this case you would simply target the workflow itself.
Let me know if it works!
saveworkflow.zip