Task Assignment question.,
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2014 05:49 PM
It is Friday evening and am hoping noone should answer this issue or question.,
But brief overview with this issue., am trying to do some work related to task assignments. Logging in as a super-user and trying to assign tasks to few users who will be in the system. Authentication is done external of activiti and am assuming this issue is not related,
Currently in the code am doing this
everything works well, yeah I know am catching the Exception object it is wrong, please ignore that.
But during this code excecution sometime I hit a scenario where the IdentityLink.getUser method is null. Any tghts on what other information I can provide to make this question better and how to go about resolving this issue. Please see screen for where it is throwing an exception.
justpaste.it/gk1l
But brief overview with this issue., am trying to do some work related to task assignments. Logging in as a super-user and trying to assign tasks to few users who will be in the system. Authentication is done external of activiti and am assuming this issue is not related,
Currently in the code am doing this
public void reAssignTasks(String[] tasks, String inboxOfUserSelected, String assignedToUser) throws ActivitiException { TaskQuery taskQuery = taskService.createTaskQuery(); try { for (String taskid : tasks) { Task task = taskQuery.taskId(taskid).singleResult(); task.setAssignee(assignedToUser); taskService.saveTask(task); } } catch (Exception excep) { log.error("Error raised when reassigning tasks in ExplorerTaskServiceImpl reAssignTasks", excep.fillInStackTrace()); throw new ActivitiException(excep.toString()); } }
everything works well, yeah I know am catching the Exception object it is wrong, please ignore that.
But during this code excecution sometime I hit a scenario where the IdentityLink.getUser method is null. Any tghts on what other information I can provide to make this question better and how to go about resolving this issue. Please see screen for where it is throwing an exception.
justpaste.it/gk1l
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2014 03:47 AM
In case you have processes with candidateGroups defined, the userId will be null. Make sure you check that, before comparing. Or - better programming practice - switch the .equals() clauses, calling the .equals() on the object you're sure of never being null (userId), inseatd of the other way around.
