How-To Guides · Data flows and schedules
How to on Best Practices for Designing Flows in Fuuz
fuuz.com/help/how-to-on-best-practices-for-designing-flows-in-fuuz
About
The following list of standards is a listing of requirements that must be completed prior to deploying a Data Flow in Fuuz. Violations are ok while working on flows, just resolve them all prior to requesting a production deployment.
The intent of all these standards is to:
- Improve the consistency of flow designs
- Provide inline documentation for future reference
- Increase the efficiency of support by others that haven't been involved
- Track all changes for visibility
Naming
Naming the flow is super important the format is as follows:{#1 Primary Fuuz Object} {#2 direction or verb(s)} {#3 External Platform} {#4 Name of Primary External Object}{#5 Event Type}
- The primary Fuuz Object data is being pulled from or pushed into
- "From", "To", or verbs like "Badge In/Out" or "Workcenter Mode on Data Change"
- "NetSuite", "Plex", "Plex (API)", "QuickBooks", "RedZone", etc. (Note: Plex and Plex (API) are very different sources)
- "Bin", "Location", "Ledger" (This is only required if the Fuuz Object is not the same
- "on Data Change" (This is the only event type that is currently required)
Examples:
- Locations From NetSuite Bins (This represents a standard integration that sends locations to Fuuz from NetSuite's list of Bins)
- Locations To NetSuite Bins on Data Change (This represents a standard integration that sends locations to NetSuite's list of Bins from Fuuz when updates are captured with data change events)
- Facilities from NetSuite Locations (This is another integration from NetSuite and highlights that our objects don't line up with NetSuite)
- WorkOrder Process Defaults From Fuuz Default Product Strategy Processes on Data Change (This flow prepoulates WorkOrder Process records with a copy from the default Product Strategy Process tables on a data change event specifically the "add" event)
Documentation
- Every flow needs a meaningful description of what it does. This includes connections used and an overall summary.
- Every version needs a description of the changes being made. If you make additional changes after setting the initial description please update it.
- Every node needs a meaningful description. Period. No exceptions.
- Every flow must have a walkthrough.
- Every walkthrough must include all nodes in logical order.
- This walkthrough will be used during the review and deployment process.
- Take Note: The configured walkthrough is stored directly inside the flow. You must save the flow after configuring the walkthrough.
General
- All nodes must have a unique and meaningful name (Think about error log messages in the future)
- Nodes cannot use the default name even if that name is unique
- All nodes with a connection on the left-hand side must be connected to another node
Debug Nodes
- Descriptions are important. Use them to highlight specific test cases
- Test cases are required to prove your testing prior to deployment
Conditionals
- Conditionals should be very descriptive
- Conditionals cannot use double negatives (ex: $not(false))
- It is strongly recommended to use If/Else in most situations, even if the else condition goes nowhere.
- (Note: If this recommendation results in a double negative to continue on a true path, consider using the else path instead.)
Context
- Label everything in context with a wrapping variable, never set or merge context with a transform that is just "$", instead use "{plexResponse:$}"
- If your context has a lot of unnecessary data prune it prior to storage.
- If your context is large and is no longer needed remove it.
- Warning: Context is shared with each node downstream. Forks and broadcasts will significantly increase memory usage by a factor equal to the number of concurrent transactions. It is very important to keep a clean context with only what you need during these situations.
Flow Control
- Broadcasts are dangerous, in most cases there is another way to solve the problem
- Keep in mind the nesting limitations of a flow, broadcasting more broadcasts quickly burns up your resources and will cause errors
Events
- All flows with a Request node must have at least one response Node
- Data Changes can trigger a lot of flows, they should be followed immediately by a conditional statement to reduce executions
- Topics, publishing, and subscribing are the preferred method of handling pagination of large data sets
Integration
- The name of the node must indicate what it is calling (Ex: "Calling Plex DS - POs_Get (key:12345)")
- The description of the node must include the parameters and a description of the intent (Ex: "Pulling POs with status of Open")
- $integrate() is highly discouraged in transforms and will most likely be deprecated next year (The intent is to make all outbound calls pink in color for easier reference)
- It is highly recommended that a native node is used over the HTTP node. (Ex: don't use HTTP to call SalesForce unless the SalesForce node doesn't meet your needs)
IIOT
- Communication with the Device Gateway can be time consuming, it is recommend that tag reads triggered by a flow read multiple tags at once.
Need more help?
Ask the Fuuz community, or open a ticket with Fuuz support.