Hide Forgot
Description of problem: When you create a process and make a mistake in variable definition - as described in BZ 768127 - it does not allow you to save, showing a message prompting you to validate the process. Validating via the provided icon/button, I get a 'no validation errors' message. Version-Release number of selected component (if applicable): BRMS 5.3.0 ER4 Steps to Reproduce: 1. Create a process, Start -> Script Task -> End. 2. Add 'String a;' to DataInputSet (which obviously is not correct format). 3. Try to save and act according to the message - validate the process. Actual results: There are no validation errors. Expected results: Message about some validation error should be shown.
The input editors should be used. They allow users to visually create process variables and create correct string representations of the input.
(In reply to comment #1) > The input editors should be used. They allow users to visually create process > variables and create correct string representations of the input. Good to know there is a workaround - however, if we ran into this, the users are surely going to hit it as well. It should be fixed here, not worked around somewhere else.
I can't reproduce this issue. Manually entering "d;" into the data input set of a script task round-trips fine, and even the editor works (see screenshot). please help to reproduce.
Created attachment 568313 [details] screenshot
(In reply to comment #3) > I can't reproduce this issue. Manually entering "d;" into the data input set of > a script task round-trips fine, and even the editor works (see screenshot). > please help to reproduce. We currently have ER4 version available. With this version I can enter whatever I like into the variable editor - I can type in "String a;" as variable name, which is obviously incorrect. The process can't be saved then and the validation is still ok with it. I can also bypass the new variable editor by clicking next to the DataInputSet and typing right away (as opposed to clicking next to the DataInputSet and clicking the little triangle to bring up the editor). The results are the same. I'll try your(?) version from http://people.redhat.com/tsurdilo/designer/master/ and get back to you.
(In reply to comment #5) ... > I'll try your(?) version from > http://people.redhat.com/tsurdilo/designer/master/ and get back to you. That one I simply doesn't work properly for me. It opens but doesn't show the definition of already existing processes. Perspectives don't work. After adding a sequence flow it froze. That version can't possibly be what you are testing. Could you please send a link of your version of the designer?
Did you delete your browser cache before trying? Every time you upgrade Designer versions locally you should clear cache and do a <SHIFT>-refresh so that your browser picks up the new javascript and styles.
Also when you pick up a new war that you build from the 2.1.x branch or get from that url (which is correct), you have to explode it and edit /profiles/jbpm.xml to change <externalloadurl protocol="http" host="localhost:8080" subdomain="drools-guvnor/org.drools.guvnor.Guvnor/oryxeditor" usr="admin" pwd="admin"/> to <externalloadurl protocol="http" host="localhost:8080" subdomain="jboss-brms/org.drools.guvnor.Guvnor/oryxeditor" usr="admin" pwd="admin"/> then war it up again and deploy. This is because of the different url of Guvnor in BRMS.
Please verify this issue on ER5.
Issue persists. Try it with a single space as a variable. You can't save it - the message is displayed. If you validate it though, it says "There are no validation errors".
(In reply to comment #10) > Issue persists. Try it with a single space as a variable. You can't save it - > the message is displayed. If you validate it though, it says "There are no > validation errors". To be more precise, put the String " " into the DataInputSet field. The previously mentioned "String a;" works for this too.
Empty string values do break the validity of the created BPMN2. This is fixed now for data inputs and data outputs as described in this BZ. Committed to Designer master and it's 2.1.x branch.
Update status to ON_QA. Please verify them against ER6.
Unfortunately still not working. These scenarios are problematic, all done via the input editor: - ' ' as a variable name for the whole process (both of type String and with no type entered), - ' ' as a variable name in DataInputSet / DataOutputSet of a Script Task, with String as the variable type, - 'String a;' as a variable name for the whole process (both of type String and with no type entered), - 'String a;' as a variable name in DataInputSet/DataOutputSet of a Script Task (both of type String and with no type entered), - '"' as a variable name for the whole process (both of type String and with no type entered), - '"' as a variable name in DataInputSet / DataOutputSet of a Script Task, Using 'a;' seems to work. Though I think that using something like 'String a;' or '"' is an obvious mistake of the user and not so hard to see in smaller processes, the validation should still catch it, if such a mistake does not allow you to save and upon saving it instead calls for a validation. The same goes for the ' ' - this moreover is very hard to spot even in a small process. It is also quite easily done without knowing about it. There are surely other 'magic strings' that could be used to see this bug - a good example is '<tag/>' - though crazy, it shows the bug (and </tag> or <tag> break the editor, until you close it and open it again). Perhaps some kind of constraint on the characters entered into those fields is in order? If you allow only alphanumeric characters, perhaps with - and _, it would still work with a vast majority of variable names needed. Nobody (I hope) expects the validation to uncover every little bit of slight against who-knows-what, but it should not clash like this with whatever validation is done upon saving.
Fix committed to Designer 2.3.x production branch. Input fields for mentioned data inputs no longer allow any input, but filter through only a-zA-Z0-9 and "-" and ".".
Sorry but still happening. (i) in Designer says the Designer version is 2.2.1.Final.
Tried once more with the current build, Designer version 2.3.1-DEV, had to replace Script task with User task to get the DataInputSet field, but the I got the same issue. I could write whatever I wanted directly into the field (not the editor). Using the Editor for Data Input is safer (I could not use any of these: ";,:/<>{}()), though it still allows you to use space as a character, which breaks it again.
Yes the issue is fixed within the editor. No-one is really going to use straight text input into the text field. Are you sure spaces break things again? Could you clear your browser cache and try again - if persists please upload a test bpmn2 so can reproduce. thanks
spaces are not going to be recognized. If you put "a b" as the name of your data input in the editor, the editor will change that to "ab". Please provide a reproduce for this as I am not sure how to. Should I set this bug back to modified?
Created attachment 614798 [details] process with whitespace in datainputset definition This process was done in the Designer, then saved via BPMN2 -> Save to file. Validation showed only missing process image, taskform and task name. Once I supplied those, validation didn't show any warnings. But it still could not be saved in Guvnor and I couldn't import it (even after server restart). It is rather simple: Start -> UserTask -> End The UserTask has one item in DataInputSet, name is "sth and sth else" (without the "") and type is String. I was able to write this in the Editor.
Oh and yes, I cleared my cache yesterday before working on this some more. It didn't change a thing. Perhaps there is some commit in the Designer 2.3.x branch that is needed for this and didn't get into the 2.3.1-DEV? Just a thought.
Still the same - spaces are allowed in the DataInputSet even in the editor, as I said before. Steps I took: (clear browser cache, start the (standalone ER3 version) server, log in to Guvnor, decline sample repo) - create a new process (in an empty repo) - add a start node, task node, end node (connected) - click the task node - select user as the task type - put krisv as the actor - put humantask as the task name - click next to DataInputSet, then on the arrow next to the field to bring up the editor - click Add Data Input - put a b as the name and String as the type - now, when the cursor is not inside the name field, it looks like a b, with only 1 space; clicking into the field again shows it with the original 5 spaces - click Ok - DataInputSet shows a b:String when the cursor is not in the text field, a b:String when you click into it - click validation - task forms and process image are missing - generate taskforms - click PNG at the bottom to generate the image - validate again - There are no validation errors message is shown - try to save changes: Unable to perform user action due to error(s). Validate your process before saving, and view server logs to see error details. ERROR [STDERR] org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Unresolved reference 'bInputItem'. (inputStream://dummyUriWithValidSuffix.xml, 13, 193) ERROR [STDERR] at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:83) ... ERROR [STDERR] Caused by: org.eclipse.emf.ecore.xmi.UnresolvedReferenceException: Unresolved reference 'bInputItem'. (inputStream://dummyUriWithValidSuffix.xml, 13, 193) ERROR [STDERR] at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardReferences(XMLHandler.java:1154) ... ERROR [JbpmProfileImpl] java.lang.NullPointerException at org.jbpm.designer.bpmn2.impl.Bpmn2JsonMarshaller.marshallDefinitions(Bpmn2JsonMarshaller.java:205) ... If you could look at the process I added with comment 22 - as it is, it cannot be imported into Guvnor/Designer, even though it was made using the Designer. The really problematic parts seem to be on lines 12 and 14: <bpmn2:dataInput id="_BBD827D9-225C-44B8-B183-2B579D33FBAC_sth and sth elseInput" drools:dtype="String" itemSubjectRef="__BBD827D9-225C-44B8-B183-2B579D33FBAC_sth and sth elseInputItem" name="sth and sth else"/> <bpmn2:dataInputRefs>_BBD827D9-225C-44B8-B183-2B579D33FBAC_sth and sth elseInput</bpmn2:dataInputRefs> The name attribute is okay, even with the spaces, but the id and itemSubjectRef attributes in dataInput element and the content of the dataInputRefs element cannot contain spaces. When I substituted spaces in those places, the process was imported. Unfortunately, it still could not be saved.