[jboss-user] [jBPM] - Unable to Autowire in AssignmentHandler
kh4m khurram
do-not-reply at jboss.com
Wed May 9 05:09:21 EDT 2012
kh4m khurram [https://community.jboss.org/people/kh4m] created the discussion
"Unable to Autowire in AssignmentHandler"
To view the discussion, visit: https://community.jboss.org/message/734450#734450
--------------------------------------------------------------
Hi good noon,
I am facing problem in my CustomAssignmentHandler class that implements AssignmentHandler
> package com.tabs.bcrs.bpm.handler;
>
> import org.jbpm.api.model.OpenExecution;
> import org.jbpm.api.task.Assignable;
> import org.jbpm.api.task.AssignmentHandler;
> import org.springframework.beans.factory.annotation.Autowired;
> import org.springframework.stereotype.Component;
>
> import com.tabs.bcrs.custombpm.service.BPMCustomService;
>
> @Component
> public class CustomAssignmentHandler implements AssignmentHandler {
>
>
> @Autowired
> BPMCustomService bpmCustomService;
>
>
> String assignee;
>
> /**
> *
> */
> private static final long serialVersionUID = 7980992364382900445L;
>
> public void assign(Assignable assignable, OpenExecution openExecution)
> throws Exception {
> System.out.println("Assignee: " + assignee);
> //assignable.addCandidateUser("userId");
> assignable.addCandidateGroup(assignee);
> openExecution.createVariable("node", openExecution.getProcessInstance().getActivity().getName());
>
>
>
> bpmCustomService.getTaskListOfSpecificGrp("ChecklistWindowGroup");
>
>
> }
>
>
The problem is my object bpmCustomService generates NullPointer Exception as it seems it is not properly autowired using @Autowired. Can anybody help me out please??
Your help is appreciated.
Khurram
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/734450#734450]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120509/b683e9ff/attachment-0001.html
More information about the jboss-user
mailing list