Use Relational Data Node in Pathways

From FojiSoft Docs

The Use Relational Data node in FojiSoft Pathways allows workflows to retrieve and use rows of data from a relational table. This node is designed to facilitate data manipulation and process automation, enabling workflows to operate on specific rows of relational data dynamically and store any changes made back into the table.


Node Properties

1. Name

  • Description: A unique identifier for the node within the workflow.
  • Usage: Provide a clear, descriptive name to indicate the purpose of this node (e.g., "Process Pending Claims" or "Handle Customer Data").
  • Example: "Update Invoice Records"

2. Variable

  • Description: Defines the variable name that will store the retrieved row of data for use in the workflow.
  • Usage: Use a meaningful name to make the variable easy to reference in downstream nodes.
  • Example: current_invoice

3. Table

  • Description: Specifies the relational table from which the data rows will be retrieved and modified.
  • Usage: Select the table containing the data to be used in the workflow.
  • Example: Invoices

How It Works

  1. Data Retrieval:
    • The node retrieves a specific row of data from the selected relational table based on the workflow's input or criteria.
    • The row is stored in the variable specified in the Variable field.
  2. Data Processing:
    • Downstream nodes can access and manipulate the data stored in the variable to perform actions like updates, conditional logic, or notifications.
  3. Data Update:
    • If changes are made to the variable's data, those updates are automatically written back to the relational table.

Use Case Examples

1. Update Invoice Status

  • Name: Update Invoice Status
  • Variable: current_invoice
  • Table: Invoices
  • Workflow Steps:
    1. Retrieve each unpaid invoice using this node.
    2. Use conditional logic in downstream nodes to determine if the invoice should be marked as "Paid" based on payment data.
    3. Save the updated status back to the Invoices table.

2. Handle Customer Information

  • Name: Process Customer Data
  • Variable: customer_data
  • Table: Customers
  • Workflow Steps:
    1. Retrieve specific customer data for processing (e.g., account updates, notifications).
    2. Update fields such as last_contacted_date or status.
    3. Write the updated data back to the Customers table.

Best Practices

  1. Use Descriptive Variable Names:
    • Clearly name the variable to reflect the type of data being retrieved for better workflow readability and maintainability.
  2. Target the Right Table:
    • Ensure the selected table matches the context of the workflow and contains the required data.
  3. Test Data Updates:
    • Verify that any changes made to the variable during the workflow are correctly written back to the table.
  4. Minimize Changes:
    • Only update the fields in the data row that need to be modified to avoid unintended overwrites.

The Use Relational Data node is a powerful tool for integrating relational data manipulation directly into workflows, allowing for seamless data retrieval, processing, and updates within Pathways. This functionality is crucial for automating repetitive data tasks and ensuring data consistency across operations.