Closed strangelookingnerd closed 4 weeks ago
Found one bug related to event definitions without refs, cf. https://github.com/bpmn-io/bpmnlint/pull/137/commits/16c1774429c49ba63fae9d94d102d311e9a2325c.
Ensured we stop traversing early (https://github.com/bpmn-io/bpmnlint/pull/137/commits/e239e32d6f4e0f2b91e269575cbf9299888f4555).
Found one bug related to event definitions without refs, cf. 16c1774.
Good catch, did not think of that.
Further im not 100% sure that these checks only apply to Error, Escalation and Message but maybe also other elements.
I assume it should also apply for Signal
? Or do you see a reason to not apply to it?
I assume it should also apply for
Signal
? Or do you see a reason to not apply to it?
Yes, it should also apply to Signal
- oversight on my end. Added it in ca307d3
Decision: We'll call this rule global
as it handles consistent usage of relevant global elements. We may re-consider the name in the future, once we're smarter.
Thanks for helping me getting this merged 👍🏼
Hey @nikku,
after our short discussion from yesterday I had a go at implementing a rule to validate event references:
I have provided test cases for the rules that demonstrate they actually work as intented. I did not yet provide a documentation because I wanted to make sure that the implementation is correct before documenting it. I was struggeling a bit with validating the usage of a reference and I'm certain that my approach could be improved (see https://github.com/strangelookingnerd/bpmnlint/blob/4e3515167c8d201088cef3a1304bc19be19ec2bb/rules/event-reference.js#L52-L103) Further im not 100% sure that these checks only apply to
Error
,Escalation
andMessage
but maybe also other elements.This PR sure still is a little rough on the edges, but I'd be happy to further improve it in order to be merged.