Open NathalieC opened 4 years ago
In https://github.com/process-analytics/bpmn-visualization-js/issues/592#issuecomment-1156515207, we proposed to use the modelFilter
option to select the diagram
bpmnVisualization.load(diagram, {
modelFilter: {
diagram: {
index: 0,
// or one of the following option
// id: 'id1',
},
pools: [
{id: 'id1'},
{name: 'name2',},
{id: 'id2'},
],
},
});
In bpmn-visualization@0.6.0, the library displays the first BPMN Diagram found in the BPMN input source (see #510). There is currently no way to choose a specific one when the source contains several diagrams.
By configuration, the developer integrating the library (Fred) could have a possibility to identify them with information used as parameters.
In the implementation example, we should be able to show that using a BPMN file with more than 2 diagrams, Fred could use a way to identify the diagrams, pass that information to the library, and display the specific diagram. Linked to #592
API proposal: see https://github.com/process-analytics/bpmn-visualization-js/issues/729#issuecomment-1242768071