<?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  Exception while invoking TaskListener: null in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/exception-while-invoking-tasklistener-null/m-p/13113#M5766</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I implement the TaskListener, i gotr the exception while task being created.&lt;/P&gt;&lt;P&gt;code are&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;long workflowTaskId=0l;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; long compId=0l;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; @Override&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; public void notify(DelegateTask arg0) {&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; // TODO Auto-generated method stub&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; workflowTaskId=Long.parseLong(arg0.getId());&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; compId=Long.parseLong(arg0.getTenantId());&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt; System.out.println("Company ID "+compId);&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;System.out.println("%%%%%%%Activiti Working*****************"+ arg0.getProcessInstanceId()+" "+arg0.getName()+arg0.getId());&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;getMethod();&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; }&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;private void getMethod(){&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;try{&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; Company company = CompanyLocalServiceUtil.getCompanyByMx(PropsUtil.get(PropsKeys.COMPANY_DEFAULT_WEB_ID));&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; //compId = company.getGroup().getGroupId(); &lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; }catch(PortalException e){}&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; catch (SystemException se) {&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; // TODO: handle exception&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; }&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; try{&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;System.out.println("workflowTaskId "+workflowTaskId);&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; System.out.println(WorkflowTaskManagerUtil.getWorkflowTask(compId, workflowTaskId));&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; System.out.println(WorkflowTaskManagerUtil.getWorkflowTask(compId, workflowTaskId).getOptionalAttributes());&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; System.out.println(WorkflowTaskManagerUtil.getWorkflowTask(compId, workflowTaskId).getOptionalAttributes().get("entryClassPK"));&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;String classPk= WorkflowTaskManagerUtil.getWorkflowTask(compId, workflowTaskId).getOptionalAttributes().get("entryClassPK").toString();&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; System.out.println("classPk "+classPk);&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; long fileEntryId=DLFileVersionLocalServiceUtil.getFileVersion(Long.parseLong(classPk)).getFileEntryId();&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; System.out.println("fileEntryId "+fileEntryId);&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; String name=DLFileVersionLocalServiceUtil.getFileVersion(Long.parseLong(classPk)).getTitle();&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; System.out.println("name "+name);&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; long chapfoldId=DLFileVersionLocalServiceUtil.getFileVersion(Long.parseLong(classPk)).getFolderId();&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; System.out.println("chapfoldId "+chapfoldId);&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; long bkfoldId=DLFolderLocalServiceUtil.fetchFolder(chapfoldId).getParentFolderId();&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; System.out.println("MytaskcreateListener Called \nworkflowTaskId "+workflowTaskId+"\nclassPk "+classPk+"\nfileEntryId "+fileEntryId+"\tname " +name+"\tbook "+bkfoldId );&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;}catch(PortalException p){}&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; catch (SystemException see) {&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; // TODO: handle exception&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; }&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Apr 2017 15:13:35 GMT</pubDate>
    <dc:creator>praveenshanmuga</dc:creator>
    <dc:date>2017-04-17T15:13:35Z</dc:date>
    <item>
      <title>Exception while invoking TaskListener: null</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/exception-while-invoking-tasklistener-null/m-p/13113#M5766</link>
      <description>I implement the TaskListener, i gotr the exception while task being created.code arelong workflowTaskId=0l; long compId=0l; @Override public void notify(DelegateTask arg0) { // TODO Auto-generated method stub workflowTaskId=Long.parseLong(arg0.getId()); compId=Long.parseLong(arg0.getTenantId()); Sys</description>
      <pubDate>Mon, 17 Apr 2017 15:13:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/exception-while-invoking-tasklistener-null/m-p/13113#M5766</guid>
      <dc:creator>praveenshanmuga</dc:creator>
      <dc:date>2017-04-17T15:13:35Z</dc:date>
    </item>
    <item>
      <title>Re:  Exception while invoking TaskListener: null</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/exception-while-invoking-tasklistener-null/m-p/13114#M5767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What event do you have the tasklistener registered against?&lt;/P&gt;&lt;P&gt;If it is the assign event, you may not have a fully populated task which could lead to such an NPE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Apr 2017 16:16:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/exception-while-invoking-tasklistener-null/m-p/13114#M5767</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2017-04-17T16:16:49Z</dc:date>
    </item>
    <item>
      <title>Re:  Exception while invoking TaskListener: null</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/exception-while-invoking-tasklistener-null/m-p/13115#M5768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;event : &lt;EM&gt;&lt;STRONG&gt;create&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the Bpmn's xml code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;lt;userTask id="usertask1" name="Update Due Date" activiti:candidateGroups="Administrator,Power User"&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;lt;extensionElements&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; &amp;lt;activiti:taskListener event="create" class="com.library.model.listeners.MyTaskCreateListener" /&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; &amp;lt;/extensionElements&amp;gt; &lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; &amp;lt;/userTask&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Apr 2017 04:07:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/exception-while-invoking-tasklistener-null/m-p/13115#M5768</guid>
      <dc:creator>praveenshanmuga</dc:creator>
      <dc:date>2017-04-18T04:07:08Z</dc:date>
    </item>
    <item>
      <title>Re:  Exception while invoking TaskListener: null</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/exception-while-invoking-tasklistener-null/m-p/13116#M5769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, so it isnt the partially populated task object that is the problem.&lt;/P&gt;&lt;P&gt;Perhaps you have no tenant associated. Can you tell us what line the NPE is coming from (i.e. stack trace)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Greg&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Apr 2017 14:52:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/exception-while-invoking-tasklistener-null/m-p/13116#M5769</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2017-04-18T14:52:11Z</dc:date>
    </item>
    <item>
      <title>Re:  Exception while invoking TaskListener: null</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/exception-while-invoking-tasklistener-null/m-p/13117#M5770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="color: #727174; background-color: #ffffff; border: 0px; font-weight: bold;"&gt;&lt;EM style="border: 0px; font-weight: inherit;"&gt;String classPk= WorkflowTaskManagerUtil.getWorkflowTask(compId, workflowTaskId).getOptionalAttributes().get("entryClassPK").toString();&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #727174; background-color: #ffffff; border: 0px; font-weight: bold;"&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The above mentioned line make NPE, and give warning is &lt;EM&gt;&lt;STRONG&gt;cannot find&amp;nbsp;taskId&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2017 04:39:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/exception-while-invoking-tasklistener-null/m-p/13117#M5770</guid>
      <dc:creator>praveenshanmuga</dc:creator>
      <dc:date>2017-04-19T04:39:41Z</dc:date>
    </item>
    <item>
      <title>Re:  Exception while invoking TaskListener: null</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/exception-while-invoking-tasklistener-null/m-p/13118#M5771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, so I see now why you wont attach a stack trace.&lt;BR /&gt;It appears as though you are using the Liferay-Activiti connector and the error is coming out of the Liferay code.&lt;/P&gt;&lt;P&gt;Can you confirm the workflowTaskId is populated with a valid id?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx,&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2017 16:58:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/exception-while-invoking-tasklistener-null/m-p/13118#M5771</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2017-04-19T16:58:38Z</dc:date>
    </item>
    <item>
      <title>Re:  Exception while invoking TaskListener: null</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/exception-while-invoking-tasklistener-null/m-p/13119#M5772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The populated workflowTaskId is a valid id, its confirmed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Apr 2017 06:53:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/exception-while-invoking-tasklistener-null/m-p/13119#M5772</guid>
      <dc:creator>praveenshanmuga</dc:creator>
      <dc:date>2017-04-20T06:53:32Z</dc:date>
    </item>
    <item>
      <title>Re:  Exception while invoking TaskListener: null</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/exception-while-invoking-tasklistener-null/m-p/13120#M5773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If that's the case then the issue lies within the Liferay library.&lt;/P&gt;&lt;P&gt;Not sure I can hlp with that have never used the plugin, perhaps someone else on teh forum has worked with the Liferay module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Apr 2017 11:35:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/exception-while-invoking-tasklistener-null/m-p/13120#M5773</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2017-04-20T11:35:13Z</dc:date>
    </item>
  </channel>
</rss>

