AnsweredAssumed Answered

Spring autowired failing inside execute method

Question asked by akashraveendran on Aug 26, 2016
Latest reply on Aug 27, 2016 by akashraveendran
Hi,

I have class called CallUpdateContact which implements JavaDelegate and I use the execute function inside this class from a service task in my bpmn.
Inside the CallUpdateContact class, I have an autowired a service class but when I try to use this autowired service class object I get a null pointer exception corresponding to the autowired service class. I tried to many ways to solve (namely removing autowired annotation and giving reference bean in xml, trying to get the object using the application context etc.) but none of them worked and my problem still persists. In the bpmn file initially i has used activiti:class="<class-path>". Then I even tried changing it to activiti:delegateExpression="${callUpdateContact}" but still the problem persists. Can anyone help me out in this. I get a feeling it this issue has something to do with the way spring beans are to called in activiti.

Outcomes