Connect pseudofield sources to use in pipeline

Created on 13 March 2025, 23 days ago

Problem/Motivation

Where a later process pipeline uses a field output as a source (@fieldname syntax), the origin of the input should be represented on the chart.

Steps to reproduce

Visible in screenshot at https://www.drupal.org/files/project-images/migrate_visualize-mermaidjs-... โ†’ - the field @_pub_date

Proposed resolution

If a process pipeline generates a source vertex with an @ prefix, and there is a matching destination vertex of the same name without the @ prefix, draw an edge from the destination to the source.

Remaining tasks

- Make it work
- Make it look sensible

User interface changes

API changes

Data model changes

๐Ÿ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand xurizaemon ลŒtepoti, Aotearoa ๐Ÿ

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @xurizaemon
  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand xurizaemon ลŒtepoti, Aotearoa ๐Ÿ
  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand xurizaemon ลŒtepoti, Aotearoa ๐Ÿ
  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand xurizaemon ลŒtepoti, Aotearoa ๐Ÿ

    Pseudofield edges are working now, but the chart isn't yet to my liking.

    The following module-generated Mermaid works on mermaid.live, but doesn't in the module's render of the same output. I'm having trouble activating the Elk layout renderer.

    ---
    # Generated with Migrate Visualize
    # https://drupal.org/project/migrate_visualize
    ---
    flowchart LR
    
    subgraph Source[fa:fa-cloud-download Source]
      source:meta:plugin["plugin: url"]
      source:field:id["id"]
      source:field:title["title"]
      source:field:link["link"]
      source:field:updated["updated"]
      source:field:data["data"]
      source:field:content["content"]
      source:field:constants_subtype["constants/subtype"]
      source:field:__path_parts_3["@_path_parts/3"]
      source:field:__path_parts_4["@_path_parts/4"]
      source:field:__term_names["@_term_names"]
    end
    
    subgraph Destination[fa:fa-cloud-upload Destination]
      destination:meta:plugin["plugin: entity:node"]
      destination:field:created["created"]
      destination:field:changed["changed"]
      destination:field:title["title"]
      destination:field:type["type"]
      destination:field:field_remote_id["field_remote_id"]
      destination:field:field_data["field_data"]
      destination:field:field_subtype["field_subtype"]
      destination:field:_path_parts["_path_parts"]
      destination:field:_term_names["_term_names"]
      destination:field:field_tags["field_tags"]
      destination:field:field_url["field_url"]
    end
    
    subgraph Process[fa:fa-cloud-upload Process]
      process:field:created["created"]
      process:field:created:1["format_date"]
      process:field:changed["changed"]
      process:field:changed:1["format_date"]
      process:field:title["title"]
      process:field:title:0["get"]
      process:field:type["type"]
      process:field:type:0["default_value"]
      process:field:field_remote_id["field_remote_id"]
      process:field:field_remote_id:0["get"]
      process:field:field_data["field_data"]
      process:field:field_data:1["callback: json_encode"]
      process:field:field_subtype["field_subtype"]
      process:field:field_subtype:1["entity_generate"]
      process:field:_path_parts["_path_parts"]
      process:field:_path_parts:1["skip_on_empty"]
      process:field:_path_parts:2["explode"]
      process:field:_term_names["_term_names"]
      process:field:_term_names:0["get"]
      process:field:_term_names:1["callback: array_filter"]
      process:field:_term_names:2["callback: array_unique"]
      process:field:field_tags["field_tags"]
      process:field:field_tags:1["entity_generate"]
      process:field:field_url["field_url"]
      process:field:field_url:0["get"]
    end
    
    source:field:updated --> process:field:created:1
    process:field:created:1 --> process:field:created
    process:field:created --> destination:field:created
    source:field:updated --> process:field:changed:1
    process:field:changed:1 --> process:field:changed
    process:field:changed --> destination:field:changed
    source:field:title --> process:field:title:0
    process:field:title:0 --> process:field:title
    process:field:title --> destination:field:title
    process:field:type:0 --> process:field:type
    process:field:type --> destination:field:type
    source:field:id --> process:field:field_remote_id:0
    process:field:field_remote_id:0 --> process:field:field_remote_id
    process:field:field_remote_id --> destination:field:field_remote_id
    source:field:data --> process:field:field_data:1
    process:field:field_data:1 --> process:field:field_data
    process:field:field_data --> destination:field:field_data
    source:field:constants_subtype --> process:field:field_subtype:1
    process:field:field_subtype:1 --> process:field:field_subtype
    process:field:field_subtype --> destination:field:field_subtype
    source:field:link --> process:field:_path_parts:1
    process:field:_path_parts:1 --> process:field:_path_parts:2
    process:field:_path_parts:2 --> process:field:_path_parts
    process:field:_path_parts --> destination:field:_path_parts
    source:field:__path_parts_3 --> process:field:_term_names:0
    source:field:__path_parts_4 --> process:field:_term_names:0
    process:field:_term_names:0 --> process:field:_term_names:1
    process:field:_term_names:1 --> process:field:_term_names:2
    process:field:_term_names:2 --> process:field:_term_names
    process:field:_term_names --> destination:field:_term_names
    source:field:__term_names --> process:field:field_tags:1
    process:field:field_tags:1 --> process:field:field_tags
    process:field:field_tags --> destination:field:field_tags
    source:field:link --> process:field:field_url:0
    process:field:field_url:0 --> process:field:field_url
    process:field:field_url --> destination:field:field_url
    
    destination:field:_term_names --> source:field:__term_names
    

    Mermaid.live rendering with Elk:

    Migrate Visualize rendering without Elk:

    Looks like I've broken the "copy source" JS with WIP also.

  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand xurizaemon ลŒtepoti, Aotearoa ๐Ÿ
  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand xurizaemon ลŒtepoti, Aotearoa ๐Ÿ
  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand xurizaemon ลŒtepoti, Aotearoa ๐Ÿ
  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand xurizaemon ลŒtepoti, Aotearoa ๐Ÿ
  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand xurizaemon ลŒtepoti, Aotearoa ๐Ÿ

  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand xurizaemon ลŒtepoti, Aotearoa ๐Ÿ
  • Pipeline finished with Skipped
    6 days ago
    #460744
  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand xurizaemon ลŒtepoti, Aotearoa ๐Ÿ
Production build 0.71.5 2024