Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-3496

should multiple nodes with the same name be allowed?

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Minor Minor
    • LATER
    • 3.0.0.cr1
    • jbpm
    • None
    • Workaround Exists
    • Hide

      Avoid creating multiple identical nodes of same type and name.

      Show
      Avoid creating multiple identical nodes of same type and name.

      Tested with JBoss Dev Studio Version: 2.0.0.CR1, Build id: R200812221144

      Steps to repro:

      1. Install JBDS.
      2. download http://www.jboss.org/downloading/?projectId=jbossjbpm&url=http://downloads.sourceforge.net/jbpm/jbpm-installer-3.3.0.GA.jar
      3. `java -jar jbpm-installer-3.3.0.GA.jar`. I installed into ~/jbpm-3.3.0.GA
      4. New > Other > Process Project
      5. Go into src/main/jpdl/simple and open processdefinition.xml with jBPM Graphical Process Designer
      6. Add a couple nodes, then connect them to the existing flow.
      7. Switch to Source tab and copy some nodes so you have multiple copies of some node and its transitions:

      <?xml version="1.0" encoding="UTF-8"?>

      <process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="simple">

      <start-state name="start-state1">
      <transition to="state1"></transition>
      </start-state>

      <state name="state1">
      <transition to="end-state2"></transition>
      </state>

      <state name="state1">
      <transition to="end-state2"></transition>
      </state>

      <end-state name="end-state2"></end-state>

      </process-definition>

      8. Save and close. Reopen in jBPM editor. Note that copied node appear ON TOP of original node, because the gpd.xml only contains one set of location data for the two nodes called "state1"

      9. Right-click on editor and select Validate.

      No errors are reported for this condition, but I'd argue that the model is in an invalid state if there can be two nodes sharing the same location data. Additionally, transitions are specific to nodes, even if they share a non-unique name. In the source above, I have one flow from start-state1 to state1 to end-state2, and another from state1 to end-state2 (without linkage to start-state1). Again, this suggests there may be something broken in the model, resolved by telling the user that s/he cannot have two nodes of the same type with the same name.

            kaers@redhat.com Koen Aers
            nickboldt Nick Boldt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: