]
Koen Aers resolved GPD-231.
---------------------------
Resolution: Out of Date
Editing task node's name in source view breaks XML, if node is
used.
--------------------------------------------------------------------
Key: GPD-231
URL:
https://issues.jboss.org/browse/GPD-231
Project: jBPM GPD
Issue Type: Bug
Components: jpdl
Affects Versions: jBPM jPDL Designer 3.1.3.SP2
Environment: Windows XP SP3, Eclipse 3.3
Reporter: N/A N/A
Assignee: Koen Aers
Fix For: jBPM jPDL Designer 3.x
When switching to source code view and manually editing a task node's name which is
used by an existing transition, breaks the XML. You can enter whatever you like, but the
task's name attribute stays the same while the transition's to-attribute is
cluttered with parts of the characters you have enter. Depending on whether you use
backspace, the cursor may also jump around in the document, erasing some unrelated code.
Here is an example:
BEFORE
<start-state name="First step">
<task name="First step" swimlane="Role">
<controller>
<variable access="read,write,required" name="someVar"
mapped-name="Some Var"/>
</controller>
</task>
<transition to="Second step"/>
</start-state>
<task-node name="Second Step"> <!-- CHANGE THIS -->
<task name="Second Step" swimlane="Second role">
<controller>
<variable access="read,write,required" name="someOtherVar"
mapped-name="Some Other Var"/>
</controller>
</task>
<transition to="Third step"/>
</task-node>
AFTER
<start-state name="First step">
<task name="First step" swimlane="Role">
<controller>
<variable access="read,write,required" name="someVar"
mapped-name="Some Var"/>
</controller>
</task>
<transition to="Second"/> <!-- broken -->
</start-state>
<task-node name="Second Ste> <!-- broken -->
<task nme="Second Step" swimlane="Second role"> <!--
broken (nme instead of name) -->
<controller>
<variable access="read,write,required" name="someOtherVar"
mapped-name="Some Other Var"/>
</controller>
</task>
<transition to="Third step"/>
</task-node>
Another option is adding something to the node's name... First look at the original
once more, when trying to add " Part 1" to "Second Step" (so it should
be Second Step Part 1) we get this as the result:
<start-state name="First step">
<task name="First step" swimlane="Role">
<controller>
<variable access="read,write,required" name="someVar"
mapped-name="Some Var"/>
</controller>
</task>
<transition to="Second step Part 1"/> <!-- changed, even though i
edited the task-node's name-attribute -->
</start-state>
<task-node name="Second Step"> <!-- unchanged -->
<task name="Second Step" swimlane="Second role">
<controller>
<variable access="read,write,required" name="someOtherVar"
mapped-name="Some Other Var"/>
</controller>
</task>
<transition to="Third step"/>
</task-node>
This can be worked around by first changing the transition's to-attribute to
something that isn't used, but it's nonetheless a bug which causes some grief.