Hi
i need in my code to recognize the ‘default flow’ Sequence Flow
for example

i have 2 sequenceFlows (one is default flow, the second is regular)
How i can find it in code.
export function isDefaultSequenceFlow(element): boolean {
return is(element, 'bpmn:SequenceFlow') && isDefaultFlow(element);
}
export function isDefaultFlow(element): boolean {
// TODO
}
How to do it (in code)?
We have a similar helper function internally: UnsetDefaultFlowBehavior#isDefaultFlow
function isDefaultFlow(connection, source) {
if (!is(connection, 'bpmn:SequenceFlow')) {
return false;
}
var sourceBo = getBusinessObject(source),
sequenceFlow = getBusinessObject(connection);
return sourceBo.get('default') === sequenceFlow;
}
The core aspect here is, that the source
of the sequence flow indicates it in its default
property.
1 Like