4 Replies Latest reply on Feb 18, 2009 8:21 AM by kukeltje

    setting the name on a transaction fails

    tbee

      Setting the name of a transition to the value it already has, results in an exception:

      Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: couldn't set name 'state2_to_join1' on transition 'Transition(state2_to_join1)'cause the from-node of this transition has already another leaving transition with the same name
      at org.jbpm.graph.def.Transition.setName(Transition.java:223)
      at nl.innovationinvestments.jbpm.Jbpm3Editor$1.invoke(Jbpm3Editor.java:131)
      at com.mxgraph.util.mxEventSource.fireEvent(Unknown Source)
      at com.mxgraph.util.mxEventSource.fireEvent(Unknown Source)
      at com.mxgraph.model.mxGraphModel$1.dispatch(Unknown Source)
      at com.mxgraph.model.mxGraphModel.endUpdate(Unknown Source)
      at com.mxgraph.swing.mxGraphComponent.labelChanged(Unknown Source)
      at com.mxgraph.swing.view.mxCellEditor.stopEditing(Unknown Source)
      at com.mxgraph.swing.mxGraphComponent.stopEditing(Unknown Source)
      at com.mxgraph.swing.mxGraphComponent$6.mouseReleased(Unknown Source)
      at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:273)
      ....


      The exception is quite right, the leaving transition is itself. This naturally is easily fixable, by comparing if the name is identical, but IMHO is the check not correct; it should not validate against itself.