<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Autowired object(userService) is null within CustomTaskListener code in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/autowired-object-userservice-is-null-within-customtasklistener/m-p/25289#M10946</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm confused. Can you share a simple bpmn xml showing your Task Listener configuration? Otherwise, please find attached a simple process showing the use of task listener.&lt;/P&gt;&lt;P&gt;Ciju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 May 2017 14:01:33 GMT</pubDate>
    <dc:creator>cjose</dc:creator>
    <dc:date>2017-05-08T14:01:33Z</dc:date>
    <item>
      <title>Autowired object(userService) is null within CustomTaskListener code</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/autowired-object-userservice-is-null-within-customtasklistener/m-p/25286#M10943</link>
      <description>Hi,I am writing a custom TaskListener with the below code: I have hooked this TaskListener to Complete event of a User Task. I noticed that all the Autowired objects are null.I am not efficient in Spring, am I missing a step by which I can properly Autowire these objects? Please assist!Regards.Sampl</description>
      <pubDate>Fri, 05 May 2017 21:32:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/autowired-object-userservice-is-null-within-customtasklistener/m-p/25286#M10943</guid>
      <dc:creator>paiyyavj13</dc:creator>
      <dc:date>2017-05-05T21:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: Autowired object(userService) is null within CustomTaskListener code</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/autowired-object-userservice-is-null-within-customtasklistener/m-p/25287#M10944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which version are you using?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 May 2017 23:34:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/autowired-object-userservice-is-null-within-customtasklistener/m-p/25287#M10944</guid>
      <dc:creator>cjose</dc:creator>
      <dc:date>2017-05-05T23:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Autowired object(userService) is null within CustomTaskListener code</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/autowired-object-userservice-is-null-within-customtasklistener/m-p/25288#M10945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;B&gt;Ciju Joseph&lt;/B&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The versions are as below:&lt;/P&gt;&lt;P&gt;&amp;lt;activiti.version&amp;gt;1.5.3&amp;lt;/activiti.version&amp;gt;&lt;BR /&gt; &amp;lt;activiti.engine.version&amp;gt;5.21.0.3&amp;lt;/activiti.engine.version&amp;gt;&lt;BR /&gt; &amp;lt;spring.version&amp;gt;4.1.6.RELEASE&amp;lt;/spring.version&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Deployment is on Alfresco Activiti Enterprise 1.5.3, tried the same with Activiti Process Services 1.6 too with same problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was reading in the admin guide and community regarding bean injections into service task through expressions and JavaDelegate. But in my case it is a TaskListener... I am not quite sure how to go about it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I read a community post:&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/thread/226867"&gt;Injecting a Service in a TaskListener returns Null&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where &lt;B&gt;Dirla Vasile&lt;/B&gt;‌ mentions: "&lt;EM style="background-color: #ffffff; border: 0px; color: #727174;"&gt;in order to have properly injected the services you should use expression or delegateExpression.&lt;/EM&gt;&lt;BR style="color: #727174; background-color: #ffffff;" /&gt;&lt;EM style="background-color: #ffffff; border: 0px; color: #727174;"&gt;if you really need to use "class" for setting the listener, then you have to use Expression for the userService and evaluate it at runtime in the notify method.&lt;/EM&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any pointers from your end would help!!!!&lt;/P&gt;&lt;P&gt;Appreciate your assistance..... Thank you....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 May 2017 14:46:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/autowired-object-userservice-is-null-within-customtasklistener/m-p/25288#M10945</guid>
      <dc:creator>paiyyavj13</dc:creator>
      <dc:date>2017-05-06T14:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Autowired object(userService) is null within CustomTaskListener code</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/autowired-object-userservice-is-null-within-customtasklistener/m-p/25289#M10946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm confused. Can you share a simple bpmn xml showing your Task Listener configuration? Otherwise, please find attached a simple process showing the use of task listener.&lt;/P&gt;&lt;P&gt;Ciju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 May 2017 14:01:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/autowired-object-userservice-is-null-within-customtasklistener/m-p/25289#M10946</guid>
      <dc:creator>cjose</dc:creator>
      <dc:date>2017-05-08T14:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Autowired object(userService) is null within CustomTaskListener code</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/autowired-object-userservice-is-null-within-customtasklistener/m-p/25290#M10947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ciju,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your example bpmn xml helped me fix the problem.&lt;/P&gt;&lt;P&gt;I was calling the &lt;EM&gt;TaskListener&lt;/EM&gt; by mentioning the class name and not through &lt;EM&gt;delegateExpression&lt;/EM&gt;. Once I removed the &lt;EM&gt;class name&lt;/EM&gt; and used &lt;EM&gt;delegateExpression&lt;/EM&gt; alone then the Autowired Objects were initialized properly.&lt;/P&gt;&lt;P&gt;Sorry I couldn't explain it better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yet again... Thank you...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 May 2017 15:20:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/autowired-object-userservice-is-null-within-customtasklistener/m-p/25290#M10947</guid>
      <dc:creator>paiyyavj13</dc:creator>
      <dc:date>2017-05-08T15:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: Autowired object(userService) is null within CustomTaskListener code</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/autowired-object-userservice-is-null-within-customtasklistener/m-p/25291#M10948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bean injection won't work with "class". When you use Java Delegates, Task Listeners and Event Listeners it is important to understand the usage of "class", "delegate expression" and "expression". Check this out for more details&lt;A href="https://community.alfresco.com/community/bpm/blog/2016/11/15/activiti-enterprise-developer-series-service-tasks-java-delegates" rel="nofollow noopener noreferrer"&gt;https://community.alfresco.com/community/bpm/blog/2016/11/15/activiti-enterprise-developer-series-service-tasks-java-delegates&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ciju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 May 2017 15:26:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/autowired-object-userservice-is-null-within-customtasklistener/m-p/25291#M10948</guid>
      <dc:creator>cjose</dc:creator>
      <dc:date>2017-05-08T15:26:06Z</dc:date>
    </item>
  </channel>
</rss>

