On Aug 20, 6:59 am, Neal McWhorter <
neal.mcwhor...@gmail.com> wrote:
> Rice,
>
> I think you've misinterpreted the id attribute of BaseElement. The spec
> says:
>
> id: string
> This attribute is used to uniquely identify BPMN elements. The id is
> REQUIRED if this element is referenced or intended to be referenced by
> something else. If the element is not currently referenced and is never
> intended
> to be referenced, the id MAY be omitted
>
> So not only is there no guarantee of uniqueness, there isn't any guarantee
> that it will even be set. There IS an implied guarantee that any id that is
> REFERENCED must be unique or else execution would be impossible because it
> wouldn't be possible to resolve between multiple elements with the same id.
> The idea here was to not require unique ids for things that were never
> referenced by id. I think it would have been better if the spec guaranteed
> uniqueness if the id was set and then made the id optional, but it doesn't.
> I would suggest that doing this is a best practice from an XML generation
> standpoint.
>
> In the example that you cite, setting the attribute is definitely optional
> and in fact serves no real purpose so I wouldn't expect the id attribute to
> be set but it isn't an error to set it and for it to be non-unique.
>