Once we are able to create "flattened" Camunda models and expanded external event models, we need to be able to build joined models for when there are multiple sources provided in the generation configuration. Note that we need to determine the order in which each source should appear on the joined diagram. We can't look through all traces for this because we can't correlate up front, but we might be able to determine an order (graph) by looking through a sample across sources.
- When a model generation has multiple sources configured, we create a model containing each of the sources
- If a trace cannot be found in a source, it should be included but we wouldn't expect it to be "joined" to other sources
- All nodes in the generated model should be mapped
- If possible, when a process and its embedded process are both part of the source configuration, they should be included as so on the flattened model
- We can determine the source order by sampling across stored traces