elsa-workflows / elsa-studio

A modular, extensible dashboard application framework
MIT License
176 stars 83 forks source link

Add Feature to View Child and Descendant Workflow Instances in Elsa Studio #152

Open sfmskywalker opened 7 months ago

sfmskywalker commented 7 months ago

Summary: Implement a that enables users to view all child workflow instances related to a specific parent workflow instance, including all descendant workflows.

Details:

Expected Benefits:

This feature request arises from the need to enhance visibility and control over workflow instances, especially in complex scenarios where workflows are dynamically spawning other workflows. Implementing this feature would significantly contribute to the usability and robustness of Elsa Studio's workflow management capabilities.

glime-ai[bot] commented 7 months ago

To implement a feature that enables users to view all child workflow instances related to a specific parent workflow instance, including all descendant workflows, the following steps could be taken:

  1. Parent-Child Relationship Tracking: Ensure that each workflow instance has metadata that tracks its parent workflow instance ID. This relationship should be maintained recursively for all descendants.

  2. UI Enhancements: Update the Elsa Studio user interface to include a new section or tab within the workflow instance details page that lists all child workflow instances. This could be a tree view or a list that allows users to expand each item to see further descendants.

  3. API Support: Extend the backend API to support queries that retrieve all child instances for a given parent instance ID. This may involve recursive database queries or the use of a graph database that better supports hierarchical data.

  4. Filtering and Search: Implement filtering options in the UI that allow users to search for workflow instances based on their parent instance ID. This will enable users to filter the instance list to only show children and descendants of a specific workflow.

  5. Linking Instances: Provide hyperlinks or buttons that allow users to navigate from a child instance back to its parent and vice versa. This improves navigation and makes it easier to trace the workflow execution path.

  6. Performance Considerations: Since fetching all descendants could potentially involve loading a large number of records, consider implementing lazy loading or pagination to improve performance.

  7. Access Control: Ensure that access to child workflow instances is governed by the same security and permission checks as their parent instances to maintain data integrity and security.

  8. Documentation and User Guides: Update the Elsa documentation to include guides on how to use the new feature, and provide examples of how to navigate and manage child workflow instances.

  9. Testing: Thoroughly test the new feature to ensure it works correctly and efficiently, especially in scenarios with deeply nested workflows.

  10. Feedback Loop: After the initial release, gather user feedback and make iterative improvements to the feature based on real-world usage.

This feature would indeed provide significant benefits in terms of user experience, efficiency, and oversight for workflow management within Elsa Studio. It addresses the need for better visibility and control over complex workflow hierarchies, which is crucial for effective monitoring and debugging.