<?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: Any way to get reference to created task from task create listener? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/any-way-to-get-reference-to-created-task-from-task-create/m-p/164140#M117900</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What Frederik is saying is that the DelegateTask object is the Task object, so why can't you use the DelegateTask object?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It's true that you can't query for the task yet, because it was not flushed to the database yet. But the DelegateTask object is the object that will be persisted to the database and it already contains the id, so what would you need more?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Sep 2013 17:46:10 GMT</pubDate>
    <dc:creator>trademak</dc:creator>
    <dc:date>2013-09-06T17:46:10Z</dc:date>
    <item>
      <title>Any way to get reference to created task from task create listener?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/any-way-to-get-reference-to-created-task-from-task-create/m-p/164135#M117895</link>
      <description>Maybe its a silly question and the obvious answer might be that the task being queried for has not yet been committed to the database.The question is, why do I get back null‍ for the Task retrieved from the task query in the code below? I have hooked this as a listener for task create event on the c</description>
      <pubDate>Wed, 28 Aug 2013 22:12:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/any-way-to-get-reference-to-created-task-from-task-create/m-p/164135#M117895</guid>
      <dc:creator>neville_sequeir</dc:creator>
      <dc:date>2013-08-28T22:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: Any way to get reference to created task from task create listener?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/any-way-to-get-reference-to-created-task-from-task-create/m-p/164136#M117896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I happened to stumble on &lt;/SPAN&gt;&lt;A href="http://www.jorambarrez.be/blog/2012/10/25/call-a-service-in-a-service-tas/" rel="nofollow noopener noreferrer"&gt;http://www.jorambarrez.be/blog/2012/10/25/call-a-service-in-a-service-tas/&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using Activiti version 5.13, which should include the fix mentioned at that link.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Based on what is mentioned at the said link, I would expect my code to work. Or could it be that my code taskService.createTaskQuery() is somehow still being executed against a newly created transaction different from the one that is already running?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess its time to add some more break points &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Aug 2013 14:44:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/any-way-to-get-reference-to-created-task-from-task-create/m-p/164136#M117896</guid>
      <dc:creator>neville_sequeir</dc:creator>
      <dc:date>2013-08-29T14:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: Any way to get reference to created task from task create listener?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/any-way-to-get-reference-to-created-task-from-task-create/m-p/164137#M117897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Verified that no extra/unnecessary transactions are being created.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind of stuck on this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Could someone help please?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2013 18:22:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/any-way-to-get-reference-to-created-task-from-task-create/m-p/164137#M117897</guid>
      <dc:creator>neville_sequeir</dc:creator>
      <dc:date>2013-09-03T18:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Any way to get reference to created task from task create listener?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/any-way-to-get-reference-to-created-task-from-task-create/m-p/164138#M117898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Why do you need the Task object? you have access to the DelegateTask, which holds all info related to the current task…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 09:44:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/any-way-to-get-reference-to-created-task-from-task-create/m-p/164138#M117898</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-09-04T09:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: Any way to get reference to created task from task create listener?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/any-way-to-get-reference-to-created-task-from-task-create/m-p/164139#M117899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yeah, I know about DelegateTask.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However we are migrating from jBPM3, and long story short, being able to get a reference to the Activiti Task object from within the task listener will allow us to continue having certain functionality that we currently have.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What exactly is the reason the task service returns &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt; in my scenario? Is this is a bug? Should I report in Activiti JIRA?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 17:00:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/any-way-to-get-reference-to-created-task-from-task-create/m-p/164139#M117899</guid>
      <dc:creator>neville_sequeir</dc:creator>
      <dc:date>2013-09-04T17:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: Any way to get reference to created task from task create listener?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/any-way-to-get-reference-to-created-task-from-task-create/m-p/164140#M117900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What Frederik is saying is that the DelegateTask object is the Task object, so why can't you use the DelegateTask object?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It's true that you can't query for the task yet, because it was not flushed to the database yet. But the DelegateTask object is the object that will be persisted to the database and it already contains the id, so what would you need more?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Sep 2013 17:46:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/any-way-to-get-reference-to-created-task-from-task-create/m-p/164140#M117900</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2013-09-06T17:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Any way to get reference to created task from task create listener?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/any-way-to-get-reference-to-created-task-from-task-create/m-p/164141#M117901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Got it. Thanks for the clarification.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The queries executed using services like TaskService go directly to the database and the Task object, whose creation caused my listener to be called, has not been flushed to the db yet. I am kind of too used to the persistence context cache from JPA.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Performance being a crucial aspect for us, I was thinking if I get a reference to the Task object, I can avoid having to create another of our own class to copy the id and other properties from DelegateTask object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Would I be hoping against hope if I asked if there was way to cause the flush to happen before my task listener is called by Activiti ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As an alternative, will it be reasonable for me to hold a reference to the DelegateTask instead ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Sep 2013 18:37:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/any-way-to-get-reference-to-created-task-from-task-create/m-p/164141#M117901</guid>
      <dc:creator>neville_sequeir</dc:creator>
      <dc:date>2013-09-06T18:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: Any way to get reference to created task from task create listener?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/any-way-to-get-reference-to-created-task-from-task-create/m-p/164142#M117902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can flush, but you will need to cast to get hold of the DbSQLSession from the ProcessEngineConfigurationImpl. However, I wold strongly advise against it as it might have unforseen consequences.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't follow the reasoning why you want to keep a reference and why it has impact on performance. What's the use case you are trying to fulfil?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Sep 2013 07:42:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/any-way-to-get-reference-to-created-task-from-task-create/m-p/164142#M117902</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-09-13T07:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: Any way to get reference to created task from task create listener?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/any-way-to-get-reference-to-created-task-from-task-create/m-p/164143#M117903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi jbarrez,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please see&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://forums.activiti.org/content/spring-jpatransactionmanager-not-saving-activiti-entities-db" rel="nofollow noopener noreferrer"&gt;http://forums.activiti.org/content/spring-jpatransactionmanager-not-saving-activiti-entities-db&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;I have attached a small project to that thread on Tijs's request.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Sep 2013 15:28:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/any-way-to-get-reference-to-created-task-from-task-create/m-p/164143#M117903</guid>
      <dc:creator>neville_sequeir</dc:creator>
      <dc:date>2013-09-13T15:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Any way to get reference to created task from task create listener?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/any-way-to-get-reference-to-created-task-from-task-create/m-p/164144#M117904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt; &lt;/DIV&gt;&lt;DIV class=""&gt;How to catch event of record in the table, please tell me.&lt;/DIV&gt;&lt;DIV class=""&gt;Is it possible when creating a task,?&lt;BR /&gt;I want to send a message to the user that a task has been assigned to him?&lt;/DIV&gt;&lt;DIV class=""&gt; &lt;/DIV&gt;&lt;DIV class=""&gt;activiti 6&lt;/DIV&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;public class MyTaskCreateListener implements TaskListener {&lt;BR /&gt; @Override&lt;BR /&gt; public void notify(DelegateTask delegateTask) {&lt;BR /&gt; TaskService activitiTaskService = delegateTask.getExecution().getEngineServices().getTaskService();&lt;BR /&gt; Task theActivitiTask = activitiTaskService.createTaskQuery().taskId(delegateTask.getId()).singleResult();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sendMessageToUser(delegateTask.getId());&lt;BR /&gt; }&lt;BR /&gt;}&lt;BR /&gt;receive client:&lt;BR /&gt;activitiTaskService.createTaskQuery().taskId(new_taskId).singleResult() it null&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV class=""&gt;&lt;H6 id="toc-hId-861566871"&gt;&lt;CODE&gt;&amp;nbsp;&lt;/CODE&gt;&lt;/H6&gt;&lt;/DIV&gt;&lt;DIV class=""&gt; &lt;/DIV&gt;&lt;DIV class=""&gt; &lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2018 16:47:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/any-way-to-get-reference-to-created-task-from-task-create/m-p/164144#M117904</guid>
      <dc:creator>krolikzaia</dc:creator>
      <dc:date>2018-12-11T16:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: Any way to get reference to created task from task create listener?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/any-way-to-get-reference-to-created-task-from-task-create/m-p/164145#M117905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;PRE class="" data-fulltext="" data-placeholder="Перевод" dir="ltr" style="text-align: left; height: 72px;"&gt;&lt;SPAN lang="en"&gt;resolved&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;A _jive_internal="true" class="link-bare" href="https://community.alfresco.com/thread/224440-sending-an-email-after-user-task-is-created" rel="nofollow noopener noreferrer"&gt;/thread/224440-sending-an-email-after-user-task-is-created&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2018 20:53:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/any-way-to-get-reference-to-created-task-from-task-create/m-p/164145#M117905</guid>
      <dc:creator>krolikzaia</dc:creator>
      <dc:date>2018-12-11T20:53:21Z</dc:date>
    </item>
  </channel>
</rss>

