WorkflowInputNodeEditor
Overview
The WorkflowInputNodeEditor is a user interface component designed for Vantage's analytics and data platform. It serves as an editing panel for the Workflow Input node, enabling users to select a source workflow whose output will serve as the input for this node's data. This component dynamically retrieves workflow options, displays relevant output nodes, and manages user selections, facilitating a robust integration between multiple workflows.
Purpose
The primary purpose of the WorkflowInputNodeEditor is to provide a seamless interface for users to select from existing workflows within the Vantage platform, allowing them to leverage output data from one workflow in another. This component enhances workflow connectivity and promotes efficient data management and processing.
Settings
1. Source Workflow ID
- Name:
sourceWorkflowId - Input Type: String
- Description: This setting represents the unique identifier of the selected source workflow. Changing this field will trigger a reload of available output nodes based on the newly selected workflow. If a new workflow is chosen, the associated output node ID will be reset.
- Default Value:
null
2. Source Output Node ID
- Name:
sourceOutputNodeId - Input Type: String
- Description: This setting holds the identifier for a specific output node of the selected source workflow. It is utilized to fetch and display only relevant output nodes related to the chosen workflow. Users can select an output node from a list, and changing this value will affect which output data is utilized downstream.
- Default Value:
null
3. Workflow List (Dynamic)
- Name:
workflows - Input Type: Array of Objects
- Description: This setting contains a dynamic list of available workflows fetched from the backend API. The list is filtered to exclude the current workflow to prevent circular dependencies. The object structure includes identifiers and metadata for each workflow, such as titles and descriptions.
- Default Value: An empty array
[]
4. Error Handling
- Name:
error - Input Type: String
- Description: This setting captures any error messages that arise during the fetching of workflows or output nodes. It is displayed to the user when applicable and helps in user troubleshooting and experience.
- Default Value:
null
5. Loading State
- Name:
loading - Input Type: Boolean
- Description: This state indicates whether the component is currently in the process of fetching data. A true value displays loading indicators, informing users that data retrieval is in progress, while a false value indicates data has been successfully fetched or static displays are active.
- Default Value:
false
6. Search Term
- Name:
search - Input Type: String
- Description: This input allows users to filter available workflows by entering search terms. The filtering happens based on workflow titles and descriptions, enhancing user experience by providing easy navigation through potentially large lists of workflows.
- Default Value: An empty string
''
7. Output Nodes List
- Name:
outputNodes - Input Type: Array of Objects
- Description: This setting contains a list of available output nodes from the selected source workflow. It is dynamically populated based on the user's selected workflow and updates automatically if the source changes. Only nodes of type
outputs/workflowOutputare considered, ensuring that extraneous nodes are excluded. - Default Value: An empty array
[]
8. Loading Outputs State
- Name:
loadingOutputs - Input Type: Boolean
- Description: This flag indicates whether the component is in the process of loading output nodes related to the specified source workflow. It is similar to the
loadingstate but specifically pertains to outputs, offering user feedback during data retrieval. - Default Value:
false
How It Works
The WorkflowInputNodeEditor manages data fetching, state, and user interactions:
-
Data Fetching: Upon component mount, it sends a request to fetch the list of available workflows. If the request is successful, it stores the workflows in a local state. If a user selects a workflow, the component further queries for the specific output nodes associated with that workflow.
-
Dynamic Rendering: The component updates its UI dynamically in response to user selections. When a workflow is selected, and it contains multiple output nodes, the component allows users to select among those outputs.
-
User Interactions: Users can search for workflows, select workflows and output nodes interactively, and clear selections as needed. The tooltips enhance the user experience by providing additional context regarding each option.
-
Error Handling: The component effectively handles loading states and error cases, informing users of any issues encountered during data retrieval, thus improving usability and reliability.
Use Cases & Examples
Use Case 1: Data Aggregation Across Workflows
A company has multiple workflows collecting data from different sources. By using the WorkflowInputNodeEditor, they can easily configure a new workflow to aggregate data from an existing analysis workflow and process it for reporting, leveraging the latest output data from that workflow.
Use Case 2: Workflow Monitoring and Alerting
In a business that relies on real-time data monitoring, the WorkflowInputNodeEditor can be employed to set up a monitoring workflow. The monitoring workflow can then analyze specific outputs of operational workflows and trigger alerts on performance metrics, therefore helping in proactive decision-making.
Example Configuration
To set up a monitoring workflow that utilizes output data from an existing workflow titled "Data Processing Workflow", the configuration would look something like this:
{
"sourceWorkflowId": "123abc",
"sourceOutputNodeId": "outputNode1"
}Where:
- sourceWorkflowId: Set to the identifier of "Data Processing Workflow".
- sourceOutputNodeId: Configured to "outputNode1", denoting the specific output node from which the new workflow will ingest data.
By utilizing this configuration, the monitoring workflow will effectively pull in the required data whenever it runs.