<?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 inject Custom bean in a custom class that implement taskListner interface in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/inject-custom-bean-in-a-custom-class-that-implement-tasklistner/m-p/141083#M37632</link>
    <description>&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;I'm creating a new workflow and in a userTask I'm using&amp;nbsp;activiti:taskListener to invoke MyCustomClass&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;!-- begin&amp;nbsp; &amp;nbsp; --&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" size="2" color="#000000"&gt;&amp;lt;userTask id="STEPID" name="STEPNAME" activiti:candidateGroups="MY_GROUP" activiti:formKey="tw:formKEY" &amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" size="2" color="#000000"&gt;&amp;lt;!-- some valid work here --&amp;gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" size="2" color="#000000"&gt;&amp;lt;extensionElements&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" size="2" color="#000000"&gt;&amp;lt;activiti:taskListener event="create" class="myPackage.MyClass"&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" size="2" color="#000000"&gt;&amp;lt;activiti:field name="myBean" expression="${myBeanId}"&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" size="2" color="#000000"&gt;&amp;lt;/activiti:field&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" size="2" color="#000000"&gt;&amp;lt;/activiti:taskListener&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial black,avant garde" size="2" color="#000000"&gt;&amp;lt;/extensionElements&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" size="2" color="#000000"&gt;&amp;lt;/userTask&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;!-- end&amp;nbsp; ---&amp;gt;&lt;/P&gt;&lt;P&gt;and in&amp;nbsp;.MyClass I've declared a property (onther bean )&lt;/P&gt;&lt;P&gt;&amp;lt;!-- begin --&amp;gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="impact,chicago" size="3" color="#000000"&gt;public class MyClass implmentes TaskListner{&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="impact,chicago" size="3" color="#000000"&gt;&amp;nbsp; private Expression myBean&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="impact,chicago" size="3" color="#000000"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;@Overrid&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="impact,chicago" size="3" color="#000000"&gt;&amp;nbsp; &amp;nbsp;public void notify(DelegateTask arg0) {&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="impact,chicago" size="3" color="#000000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MyBean&amp;nbsp;mb = (MyBean) myBean.getValue(arg0);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="impact,chicago" size="3" color="#000000"&gt;&amp;nbsp; &amp;nbsp;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="impact,chicago" size="3" color="#000000"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;lt;!-- begin --&amp;gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and i've declared my bean in service-context.xml like these&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="impact,chicago" color="#000000"&gt;&amp;lt;bean id="myBeanId" class="onther.package.MyBean" &amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="impact,chicago" color="#000000"&gt;&amp;lt;/bean&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;and i'm using AIO&amp;nbsp;archetype&lt;/P&gt;&lt;P&gt;and when i invoke CreatStep i have the follwing error:&lt;/P&gt;&lt;P&gt;&lt;FONT face="impact,chicago" color="#000000"&gt;Exception while invoking TaskListener: Unknown property used in expression: ${myBeanId}&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Feb 2024 17:17:55 GMT</pubDate>
    <dc:creator>alaeddine</dc:creator>
    <dc:date>2024-02-15T17:17:55Z</dc:date>
    <item>
      <title>inject Custom bean in a custom class that implement taskListner interface</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/inject-custom-bean-in-a-custom-class-that-implement-tasklistner/m-p/141083#M37632</link>
      <description>&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;I'm creating a new workflow and in a userTask I'm using&amp;nbsp;activiti:taskListener to invoke MyCustomClass&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;!-- begin&amp;nbsp; &amp;nbsp; --&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" size="2" color="#000000"&gt;&amp;lt;userTask id="STEPID" name="STEPNAME" activiti:candidateGroups="MY_GROUP" activiti:formKey="tw:formKEY" &amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" size="2" color="#000000"&gt;&amp;lt;!-- some valid work here --&amp;gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" size="2" color="#000000"&gt;&amp;lt;extensionElements&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" size="2" color="#000000"&gt;&amp;lt;activiti:taskListener event="create" class="myPackage.MyClass"&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" size="2" color="#000000"&gt;&amp;lt;activiti:field name="myBean" expression="${myBeanId}"&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" size="2" color="#000000"&gt;&amp;lt;/activiti:field&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" size="2" color="#000000"&gt;&amp;lt;/activiti:taskListener&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial black,avant garde" size="2" color="#000000"&gt;&amp;lt;/extensionElements&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" size="2" color="#000000"&gt;&amp;lt;/userTask&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;!-- end&amp;nbsp; ---&amp;gt;&lt;/P&gt;&lt;P&gt;and in&amp;nbsp;.MyClass I've declared a property (onther bean )&lt;/P&gt;&lt;P&gt;&amp;lt;!-- begin --&amp;gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="impact,chicago" size="3" color="#000000"&gt;public class MyClass implmentes TaskListner{&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="impact,chicago" size="3" color="#000000"&gt;&amp;nbsp; private Expression myBean&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="impact,chicago" size="3" color="#000000"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;@Overrid&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="impact,chicago" size="3" color="#000000"&gt;&amp;nbsp; &amp;nbsp;public void notify(DelegateTask arg0) {&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="impact,chicago" size="3" color="#000000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MyBean&amp;nbsp;mb = (MyBean) myBean.getValue(arg0);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="impact,chicago" size="3" color="#000000"&gt;&amp;nbsp; &amp;nbsp;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="impact,chicago" size="3" color="#000000"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;lt;!-- begin --&amp;gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and i've declared my bean in service-context.xml like these&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="impact,chicago" color="#000000"&gt;&amp;lt;bean id="myBeanId" class="onther.package.MyBean" &amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="impact,chicago" color="#000000"&gt;&amp;lt;/bean&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;and i'm using AIO&amp;nbsp;archetype&lt;/P&gt;&lt;P&gt;and when i invoke CreatStep i have the follwing error:&lt;/P&gt;&lt;P&gt;&lt;FONT face="impact,chicago" color="#000000"&gt;Exception while invoking TaskListener: Unknown property used in expression: ${myBeanId}&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 17:17:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/inject-custom-bean-in-a-custom-class-that-implement-tasklistner/m-p/141083#M37632</guid>
      <dc:creator>alaeddine</dc:creator>
      <dc:date>2024-02-15T17:17:55Z</dc:date>
    </item>
  </channel>
</rss>

