import org.jbpm.instantiation.Delegation;
public class TaskControllerDbTest extends AbstractDbTestCase {
public void testTaskControllerWithVariableAccesses() {
ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
"<process-definition>" +
" <task-node name='t'>" +
" <task name='clean ceiling'>" +
" <controller>" +
" <variable name='a' access='read,write' mapped-name='x' />" +
" <variable name='b' access='read,write' mapped-name='y' />" +
" <variable name='c' access='read,write' />" +
" </controller>" +
" </task>" +
" </task-node>" +
"</process-definition>"
);
processDefinition = saveAndReload(processDefinition);
TaskNode taskNode = (TaskNode) processDefinition.getNode("t");
Task task = taskNode.getTask("clean ceiling");
TaskController taskController = task.getTaskController();
assertNotNull(taskController);
assertNull(taskController.getTaskControllerDelegation());
List variableAccesses = taskController.getVariableAccesses();