[
https://jira.jboss.org/jira/browse/JBPM-2755?page=com.atlassian.jira.plug...
]
Ronald van Kuijk commented on JBPM-2755:
----------------------------------------
Patch for test:
Index: src/test/java/org/jbpm/test/task/TaskPropertiesTest.java
===================================================================
--- src/test/java/org/jbpm/test/task/TaskPropertiesTest.java (revision 6151)
+++ src/test/java/org/jbpm/test/task/TaskPropertiesTest.java (working copy)
@@ -24,6 +24,9 @@
*/
package org.jbpm.test.task;
+import java.util.HashMap;
+import java.util.Map;
+
import org.jbpm.api.ProcessDefinition;
import org.jbpm.api.task.Task;
import org.jbpm.test.JbpmTestCase;
@@ -33,6 +36,7 @@
* Testcase to check if properties can be resolved through a {@link Task}.
*
* @author Joram Barrez
+ * @author Ronald van Kuijk
*/
public class TaskPropertiesTest extends JbpmTestCase {
@@ -50,6 +54,7 @@
" <transition to='work hard for the money' />" +
" </fork>" +
" <task name='select destination' assignee='" + ACTOR +
"'>" +
+ " <description>Description for 'select destination' with
#{timeframe}</description>" +
" <transition to='wait' />" +
" </task>" +
" <task name='work hard for the money' assignee='" + ACTOR2
+ "_not_the_same'>" +
@@ -60,9 +65,14 @@
public void testGetActivityName() {
Task task = startProcessInstanceAndReturnTaskFor(ACTOR);
- assertEquals("select destination", task.getActivityName());
+ assertEquals("select destination", task.getActivityName());
}
+ public void testGetDescription() {
+ Task task = startProcessInstanceAndReturnTaskFor(ACTOR);
+ assertEquals("Description for 'select destination' with
Springbreak", task.getDescription());
+ }
+
public void testGetProcessDefinitionThroughTask() {
Task task = startProcessInstanceAndReturnTaskFor(ACTOR);
@@ -75,7 +85,10 @@
private Task startProcessInstanceAndReturnTaskFor(String actor) {
deployJpdlXmlString(PROCESS);
- executionService.startProcessInstanceByKey("VacationTrip");
+ Map<String, String> vars = new HashMap<String, String>();
+ vars.put("timeframe", "Springbreak");
+ executionService.startProcessInstanceByKey("VacationTrip",vars);
+
return taskService.findPersonalTasks(actor).get(0);
}
EL support in task's <description> tag
--------------------------------------
Key: JBPM-2755
URL:
https://jira.jboss.org/jira/browse/JBPM-2755
Project: jBPM
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Affects Versions: jBPM 4.3
Reporter: henry donnell
Assignee: Tom Baeyens
Fix For: jBPM 4.4
it would be helpful to be able to use EL in the <description> tag of the (human)
task node.
This will allow to create dynamical task descriptions based on the process variables.
Example:
<task name="review_task">
<description>Review order nr.#{order.nr} from customer
#{order.customer.name}</description>
</task>
The main purpose is to make human task descriptions in the task list more readable and
user-friendly.
Because if you have 20 task instances of the same task and they are all called
"Review order from customer" it is really hard to see at a first glance which
task is related to which customer.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira