Description of problem: Modeler automatically changes an input character to '_' Steps to Reproduce: 1. Create a new business process using a modeler 2. open "properties" for the business process 3. enter "-testName" in "Data Items" -> "Global List for Process" -> "Global Variable Details"/"Variable Details" -> "Name" text field Actual results: '-' character will be automatically replaced with '_'(under score) Expected results: User can input any characters as what they types. If there is a validation function, please show error messages on "Problems" window. Additional info: I tested with "web designer" comes with BPMS 6.0.3: - there is no automatic input character modification - If I input '-' as the first letter for a global variable name and save it, validation error[1] will display on the problems window [1] [ERR 102] Line 2:14 mismatched input '-' in global
If there is a regular expression for "Name" text field, please let me know. I'll guide to our customer as an workaround. (User can input letters by following the regular expression) Thx
Since global names and variable names are used as parameter names in generated code, they should use the same rules as Java parameter names, so start with a letter or _ and then letters, numbers or _. Bob, would it be possible to validate this in the properties editor?
This is tricky because global and variable names are also used as the BPMN2 element IDs, which are used to identify references to these objects. If the user enters an invalid ID the link is essentially broken and the file becomes corrupt. Validation is OK, as long the user corrects the problem before closing the editor. If the file is saved with an invalid ID, it is basically hosed. The only way I can think of to prevent this is to force IDs to always be valid. Note that there is still an issue with creating duplicate IDs; for example I can imagine a scenario where more than one Task defines a data output parameter named "Result". This is strictly not valid BPMN because multiple data output objects will have the same ID. Since the XML loader uses these IDs to resolve object references, there's no guarantee that the correct objects will be resolved.
When attempting to insert an invalid character into the ID field, an error message is displayed in the Status Bar (at bottom of Eclipse Workbench window) and the character is ignored. Fixed in community build for Luna 1.1.1.201501262023
Hi, bob. I test the fix using luna 4.4.1 with modeler(for luna 1.1.1.201501282123), and want to share my test result with you. [OK test] 1: open modeler and access Properties -> DataItems -> LocalVariablesList 2: click "+" and access LocalVariableDetails -> Name 3: delete default characters, and enter a- result: message is displayed in the Status Bar (at bottom of Eclipse Workbench window) [fail test] 1: open modeler and access Properties -> DataItems -> LocalVariablesList 2: click "+" and access LocalVariableDetails -> Name 3: On the text editor(different program), type a- and copy "a-" using Ctl+c 3: delete default characters, and paste copied characters by using Ctl+v result: "a_" is entered to the field without any error message. // invalid character '-' is replaced with '_' I did "Ctl+c and Ctl+v test" for Properties -> Process -> Id too. In the attribute, error message is displayed in the Status bar. // This is expected behavior. Could you check my test result please?
Yes, looks like copy/paste of a string with invalid characters was causing problems. Fixed in Luna build 1.1.2.201502091842 download.eclipse.org/bpmn2-modeler/updates/luna/1.1.2/ Fixed in Kepler build 1.0.4.201502091849 download.eclipse.org/bpmn2-modeler/updates/kepler/1.0.4/
Not included in jbds-8.0.2.GA_jbdsis-8.0.0.CR2
Test concerning this issue: https://github.com/jbosstools/jbosstools-integration-stack-tests/blob/master/tests/org.jboss.tools.bpmn2.ui.bot.test/src/org/jboss/tools/bpmn2/ui/bot/complex/test/testcase/ComplexSpecialCharactersAndLenghtsTest.java
Verified on jbds-8.1.0.CR1_jbdsis-8.0.1.CR1 - BPMN2 Modeler 1.1.2.Final