Bug 768499 - Freemarker Template generator in web designer creates invalid forms
Summary: Freemarker Template generator in web designer creates invalid forms
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: jBPM 5
Version: BRMS 5.3.0.GA
Hardware: All
OS: All
unspecified
high
Target Milestone: ---
: BRMS 5.3.0.GA
Assignee: Kris Verlaenen
QA Contact: Jiri Locker
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-16 20:18 UTC by Babak Mozaffari
Modified: 2021-04-09 12:48 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---


Attachments (Terms of Use)
Guvnor repository to show fixed version as well as files (52.14 KB, application/zip)
2011-12-16 20:18 UTC, Babak Mozaffari
no flags Details
Incorrect auto-generated task form (6.32 KB, application/octet-stream)
2011-12-16 20:19 UTC, Babak Mozaffari
no flags Details
Fixed task form (6.09 KB, application/octet-stream)
2011-12-16 20:19 UTC, Babak Mozaffari
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBPM-3475 0 None None None Never

Description Babak Mozaffari 2011-12-16 20:18:06 UTC
Description of problem:
When task and form variables have different names, the freemarket template form generated for a user task references process variables, therefore causing a runtime parsing error.
Furthermore, when a variable is both used for input and output, its value is not provided for users to edit and they are forced to copy and paste it from a table above.


Version-Release number of selected component (if applicable):
dev6


How reproducible:
Consistent


Steps to Reproduce:
1. Create a process with a user task that has different variable names than the process variables
2. Click on the user task and use the toolbar button "Generate Task Form Templates"
3. Run the process and view the task
  
Actual results:
HTTP 500 error, see attached FreemarkerError.jpg


Expected results:
Task form that shows input variables as read-only, has a blank field for typing output variables and shows the value of in/out variables so they may be edited.


Additional info:
Attached is a guvnor repository with a fixed working form. Also see the attached "VariableTask-taskform_wrong.flt" which produces the parsing error versus the fixed "VariableTask-taskform_working.flt" that makes in/out variables editable.

Comment 1 Babak Mozaffari 2011-12-16 20:18:50 UTC
Created attachment 547950 [details]
Guvnor repository to show fixed version as well as files

Comment 2 Babak Mozaffari 2011-12-16 20:19:16 UTC
Created attachment 547951 [details]
Incorrect auto-generated task form

Comment 3 Babak Mozaffari 2011-12-16 20:19:43 UTC
Created attachment 547952 [details]
Fixed task form

Comment 4 Tihomir Surdilovic 2012-01-02 21:08:31 UTC
I need more info on how to reproduce, specifically for step

1. Create a process with a user task that has different variable names than the
process variables

What are the process variables and types defined, and what are the data inputs and outputs and associations defined on the user task?

Thanks.

Comment 5 Tihomir Surdilovic 2012-01-02 21:09:01 UTC
assigning to bmozaffa to provide more info.

Comment 6 Babak Mozaffari 2012-01-02 23:36:54 UTC
Hey Tiho, here is what I'm testing with:

1- Process variable definition: "processVar:String"
2- User Task: "taskVar" for both DataInputSet and DataOutputSet
3- User Task: "processVar<->taskVar" added under Assignments (task name would end up as an association there too so comma separating this one)

At this point, generating task form templates results in the following line, which produces a runtime error:

<label for="name">taskVar</label>
<div class="div_checkbox">${processVar}</div>

Since this is used for the task, it should be ${taskVar} and not processVar which is unavailable at this stage. The mapping should have (and has) already taken place.

Comment 7 Tihomir Surdilovic 2012-01-03 06:23:13 UTC
Resolved and will be available in 2.1 (https://issues.jboss.org/browse/JBPM-3475)

Comment 8 Ryan Zhang 2012-01-09 10:04:13 UTC
5.3 ER2 still contains designer 2.0. So this fix probably is not included in ER2.


Note You need to log in before you can comment on or make changes to this bug.