Problem/Motivation
When I have a series of sub-processes, they don't get linked in the graph.
It seems to be because each sub-process is handled separately form the others, and since they don't have a 'source' attribute (aside from the very first sub-process), the code doesn't know how to find the previous/source vertex.
Steps to reproduce
Create a migration with the following bit in `process`:
process:
nid:
# Look up the node.
- plugin: entity_lookup
entity_type: node
bundle_key: type
bundle: article
value_key: field_uuid
source: raw/article_uuid
# Skip if we don't find this node.
- plugin: skip_on_empty
method: row
Proposed resolution
Make `MigrateGraph::graphProcessPlugin()` return the vertex it just created, and pass that vertex to the next call for the next sub-process in the same chain.
Remaining tasks
Implement solution.
User interface changes
N/A
API changes
N/A
Data model changes
N/A
Comments
Comment #2
khaled.zaidan commentedHere's a patch with the fix proposed in the description.
Also before and after screenshots of a test migration.
Comment #3
khaled.zaidan commentedComment #4
khaled.zaidan commentedHere's a modified patch that also links processes to their source if it's from another process.
Comment #8
xurizaemonThanks heaps Khaled! Nice fix.
Comment #9
xurizaemonComment #10
xurizaemon