Bug 813367

Summary: FreeMarker & Human Tasks clash on #{expression}
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Zuzana Krejčová <zkrejcov>
Component: jBPM 5Assignee: Kris Verlaenen <kverlaen>
Status: VERIFIED --- QA Contact:
Severity: urgent Docs Contact:
Priority: unspecified    
Version: BRMS 5.3.0.GACC: rzhang
Target Milestone: ER7   
Target Release: BRMS 5.3.0.GA   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
runtime error from server log
none
error instead of the task form
none
repo used to test none

Description Zuzana Krejčová 2012-04-17 15:12:03 UTC
Created attachment 578067 [details]
runtime error from server log

Description of problem:
In human tasks, we can use #{expression} to make the task properties dynamic. FreeMarker uses the same syntax for it's own purposes - namely "Numerical interpolation" (http://freemarker.sourceforge.net/docs/ref_depr_numerical_interpolation.html). 
When you use #{expression} in a human task in the Designer and generate task form templates there, the '#{expression}' is put directly into the form, as it is. Trying to use that form (for example in the jBPM Console) then results in an error in server log and http 500.


Version-Release number of selected component (if applicable):
BRMS 5.3.0 ER5



Steps to Reproduce:
1. Create a process in the Designer, perhaps like the example - Evaluation. The actorId for the self evaluation should be of the #{expression} form.
2. Save and click Generate Task Form Templates. Build the package.
3. In the Console, start the process and get to the human task. Try to view it.
  

Actual results:
HTTP error 500, runtime exception in server log.


Expected results:
Task form.

Comment 1 Zuzana Krejčová 2012-04-17 15:13:18 UTC
Created attachment 578068 [details]
error instead of the task form

Comment 2 Zuzana Krejčová 2012-04-17 15:18:27 UTC
Created attachment 578069 [details]
repo used to test

The process used is the Evaluation, the problematic part is the Self Evaluation task and PerformanceEvaluation-taskform, which contains the following lines (the other form is okay):

...
<div id="container">
	...
	<div id="content">
		<fieldset>
            <legend>Task Info</legend>
            	<label for="name">Owners</label>
            	<div class="div_checkbox">

											#{employee}
					              		            	
            	</div>
            	<label for="name">Actor ID</label>
            	<div class="div_checkbox"></div>
            	<label for="name">Group</label>
            	<div class="div_checkbox"></div>
            	<label for="name">Skippable</label>
            	<div class="div_checkbox">true</div>
            	<label for="name">Priority</label>
            	<div class="div_checkbox"></div>
            	<label for="name">Comment</label>
            	<div class="div_checkbox">Please perform a self-evalutation.</div>
            <div class="clear"></div>
          </fieldset>
...
</div>

Comment 3 Tihomir Surdilovic 2012-04-22 04:52:30 UTC
Fixed in Designer master and 2.2.x branches.

Comment 4 Ryan Zhang 2012-04-23 07:35:55 UTC
Update status to ON_QA. Please verify them against ER6.

Comment 5 Ryan Zhang 2012-04-23 07:58:20 UTC
Confirmed that not picked in ER6. Change status back.

Comment 6 Ryan Zhang 2012-05-14 08:15:58 UTC
The fixed for this issue should be included in ER7. Please do verification on it.