11-22-2011 04:44 AM
public class CreateTaskListener implements TaskListener {
private static ProcessEngine processEngine = ActivitiEngine.getInstance();
private static final Logger log = Logger.getLogger(CreateTaskListener.class.toString());
public void notify(DelegateTask task) {
List<String> taskGroups = new ArrayList<String>();
List<IdentityLink> identityLinks = processEngine.getTaskService().getIdentityLinksForTask(task.getId());
for (IdentityLink identityLink : identityLinks) {
if (identityLink.getType().equals(IdentityLinkType.CANDIDATE)) {
taskGroups.add(identityLink.getGroupId());
}
}
log.info(identityLinks.size());
}
}
22.11.2011 11:15:01 org.activiti.engine.impl.interceptor.CommandContext close
SEVERE: Error while closing command context
java.lang.NullPointerException
at org.activiti.engine.impl.cmd.GetIdentityLinksForTaskCmd.execute(GetIdentityLinksForTaskCmd.java:46)
at org.activiti.engine.impl.cmd.GetIdentityLinksForTaskCmd.execute(GetIdentityLinksForTaskCmd.java:30)
at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
at org.activiti.engine.impl.TaskServiceImpl.getIdentityLinksForTask(TaskServiceImpl.java:135)
at com.myCompany.CreateTaskListener.notify(CreateTaskListener.java:30)
at org.activiti.engine.impl.delegate.TaskListenerInvocation.invoke(TaskListenerInvocation.java:34)
at org.activiti.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37)
at org.activiti.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:25)
at org.activiti.engine.impl.bpmn.helper.ClassDelegate.notify(ClassDelegate.java:90)
at org.activiti.engine.impl.delegate.TaskListenerInvocation.invoke(TaskListenerInvocation.java:34)
at org.activiti.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37)
at org.activiti.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:25)
at org.activiti.engine.impl.persistence.entity.TaskEntity.fireEvent(TaskEntity.java:512)
at org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior.execute(UserTaskActivityBehavior.java:70)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:44)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
….
11-22-2011 11:57 AM
TaskEntity task = (TaskEntity) delegateTask;
List<IdentityLinkEntity> identityLinks = task.getIdentityLinks();
11-23-2011 01:19 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.