Automatically backup your flows. Backs up multiple revisions as easily restorable .sflow files.
To utilize flow auto backup (FAB), you must make a program flow which utilizes the FAB functions. You should not have to modify the FAB functions at all. An example FAB program flow is included in this repository. The example program executes backups once per hour, archiving the returned flows in a heirarchy following the flow grouping in the flow pane.
You can use the FAB Parent Folders as well as the FAB Flow Name to set a hierarchy path in Switch using ‘Set hierarchy path’:
- [Job.PrivateData:Key="FAB Parent Folder4"]
- [Job.PrivateData:Key="FAB Parent Folder3"]
- [Job.PrivateData:Key="FAB Parent Folder2"]
- [Job.PrivateData:Key="FAB Parent Folder1"]
- [Job.PrivateData:Key="FAB Flow Name"]
- .sflows file
Here is an example of results using the example above:
This flow function group will provide archivable .sflow files of every flow on a Switch system, as well as their metadata. One potential use is to back up all .sflow files, and archive them according to Switch flow groups:
- FAB Get Flow Function
- FAB Pack Flow Function
- FAB Flow Group Function
To use the FAB functions the following dataset needs to be set as private data: FAB Portal Callback - The Portal channel where the packed flows will be delivered once the core functions are complete. You do not have to change this.
- FAB Flows Path - The absolute path to your Switch Server/flows directory.
- FAB Manifest Path - The absolute path to your generic manifest.xml file.
- FAB Flow Panes Path - The absolute path to Switch Server flowpanes.xml file.
- FAB Portal Failure Callback - Optional - The Portal channel where files that fail are delivered from any part of this flow function group.
Out of the Callback, .sflows will start flowing in. Each of these .sflows is ready for use and contains the following new FAB dataset fields:
- FAB Flow Name - The name of the flow
- FAB Flow Version - The current version of the flow
- FAB Flow ID - The numerical ID of the flow
- FAB Parent Folder<Number Iteration 1 - 4> - The folder names of the flow based on grouping in Switch
If any of your flows are password protected, these values will say 'Encrypted'.
The optional Failure Callback, will return failed jobs with the following private data keys:
- FAB Fail Flow
- FAB Fail Element
- FAB Fail Message
- FAB Fail Module