AnsweredAssumed Answered

diagram unique Id generation issue

Question asked by yangyang.qian on Apr 7, 2011
Latest reply on Apr 16, 2011 by trademak
I had noticed that sometimes, when I've been working on multiple Activiti diagrams across multiple days, that the unique Ids generated for the workflow objects will overlap and repeat. The diagram compiles, but when I try to later run the process the engine complains that there are multiple workflow elements with the same id (i.e. two sequenceFlows both with id="flow12"). And if I inadvertently delete one of the repeated elements via right-click-delete or trash-ban, it screws up the diagram …

here might be a way to recreate the issue …

1) assume any id counter starting point, i.e. X = 0
2) create diagram D1,   start –> manual task 1 –> manual task 2 –> end   .  The unique id counter is at X + 3 (i.e. id="flow3"). Save the diagram. Close diagram.
3) create diagram D2, also same process      start –> manual task 1 –> manual task 2 –> end.  The unique id counter should be at X + 6 (i.e. id="flow6"). Save diagram. Close diagram.
4) reopen D1,   add a sequenceFlow from manual task 1 to end twice (delete one, then add it again).   The unique id counter should be at X + 8 (i.e. id="flow8"). Save diagram. Close diagram.
5) close and reopen eclipse

here is where I started getting some issues …

6) reopen D2,   add a sequenceFlow from manual task 1 to end. The unique id counter is at X + 7 … I guess because last time D2's max id was X + 6. Save and close D2.
7) reopen D1,    delete any  sequenceFlow and re-add it. The unique id counter is at X + 8 … I guess because it was just at X + 7?
8) now, D1 has two instances of X + 8 (i.e. id="flow8") …


I've often juggled working on multiple processes at the same time … and it definitely takes me more than a single sitting to finish some processes. The result is that these duplications sometimes get so bad that I have to give up on fixing the xml and just start the diagram over from scratch …

I've noticed this issue since release 5.2 (I started in 5.0 but my processes weren't so complicated then and thus issue probably never had a chance to manifest) but I have no clue why it's happening …

Is this a bug in the designer plugin? Or my eclipse environment? Or just that my workstation hates me  :cry: ?


(currently running on Activiti Eclipse BPMN 2.0 Designer 5.4.0   on    Eclipse helios for JavaEE - 3.6.2 )


Thanks!

Outcomes