Details
-
Bug
-
Resolution: Done
-
Major
-
7.23.0.Final
-
None
-
NEW
-
NEW
-
Description
Unable to use the Business rules strategy to auto-assign a user task to a given user by using task input variables in the assignment rules.
I tried to get the input variables but when I called "$task.getTaskData().getTaskInputVariables()" it returned a Map with a value of null.
My task has multiple input variables set, so it appears that the input variables are not loaded before the assignment rules are firing.
See my sample rule below:
rule "Sample rule"
when
$task: Task()
then
System.err.println("Found task with name ("+ $task.getName() +") to be assigned, task: " + $task);
// this returns null
Map<String, Object> inputVariables = $task.getTaskData().getTaskInputVariables();
System.err.println("task input variables: " + inputVariables);
insert(new Assignment("senior"));
end