Summary

Implement entity context sessions that allow FlowDrop playground workflows to be initialized with any Drupal entity (nodes, taxonomy terms, custom entities) as context data. This enables workflows to operate on specific content items, making FlowDrop a powerful tool for content validation, transformation, and entity-aware automation.

Business Value

  • Enables content-specific workflows that validate, transform, or analyze individual Drupal entities
  • Supports content moderation workflows where AI can review specific articles or pages
  • Allows building entity-aware automation that responds to the actual content structure
  • Provides foundation for integrating FlowDrop into content authoring experiences

Features Implemented

  • Entity Loading: Load any Drupal entity type (node, taxonomy_term, user, etc.) into playground context
  • Revision Support: Optionally load specific entity revisions for version-aware workflows
  • Entity Serialization: Full entity data including all fields serialized for workflow access
  • Access Control: Strict permission checks ensure users can only access entities they have view access to
  • Flexible Session Naming: Auto-generated names from entity labels or custom session names

Technical Implementation

  • New NodeSessionService as the core service managing entity-context playground sessions
  • Support for RevisionableStorageInterface to load specific entity revisions
  • Entity context stored in session metadata with dedicated entity_context key
  • Metadata includes: entity_type, entity_id, bundle, revision_id, is_default_revision, label, uuid
  • Integration with FlowDrop's EntitySerializer for complete entity data extraction

Supported Entity Types

  • Content entities (nodes, taxonomy terms, users, media, etc.)
  • Custom entity types defined by contrib or custom modules
  • Any entity type registered with Drupal's EntityTypeManager

Comments

joevagyok created an issue. See original summary.

joevagyok’s picture

Title: dd entity context support to initialize playground sessions with Drupal entity data » Add entity context support to initialize playground sessions with Drupal entity data
d34dman’s picture

Version: » 1.x-dev
Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.