Details
-
Bug Report
-
Resolution: Fixed
-
L3 - Default
-
None
-
None
Description
The base elements of all Model APIs have to following code snippet in there constructor:
public CmmnElementImpl(ModelTypeInstanceContext instanceContext) { super(instanceContext); if (getId() == null) { setId(ModelUtil.getUniqueIdentifier(getElementType())); } }
This generates a Random ID if no ID is set. It isn't a good idea to do this in the constructor as it is also called on read of a file. So if the file doesn't contain an ID for the process/case/decision a new random one will be generated. Which differs between reads.
Instead we could generate this ID only if the model API is used to create elements.