AnsweredAssumed Answered

Spring service class not injected in Activiti listener?

Question asked by vamsinipun on Dec 27, 2017
Latest reply on Apr 20, 2018 by salaboy

Hi,

 

I am using activiti in spring web application. Now, i am facing an issue. if i inject spring service class in activiti listener then it showing an error at runtime.

 

 

My java listener code is

 

@Component
public class MyEventListener implements TaskListener {

@Autowired
ILocalConveyanceService localConveyanceService;

 

@Override
public void notify(DelegateTask delegateTask) {
    System.out.println("Task listener called");
    System.out.println("delegateTask: "+delegateTask.getProcessInstanceId());
    List<TblLocalConveyance> all = localConveyanceService.getAll();
    for (TblLocalConveyance tblLocalConveyance : all) {
                   System.out.println("LCNo: "+tblLocalConveyance.getLcNo());
    }

  }

}

 

Please help me out this.

Outcomes