<?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 Are there hooks within activiti engine? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/are-there-hooks-within-activiti-engine/m-p/83338#M55959</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello, I would like to do something like this: For every user task you create call my custom method (1).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Actually I could write additional code in our logic at two points to almost accomplish this: After creating a new process instance, look if the execution was stopped by a user task. And after completing a user task, do the same. But this only works from within our logic, so timer started process instances won't be handled by this (2).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, are there hooks to do something like (1), or is there a general way to handle the special case of timer started process instances (2)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Jul 2012 10:26:22 GMT</pubDate>
    <dc:creator>markusfaeth</dc:creator>
    <dc:date>2012-07-10T10:26:22Z</dc:date>
    <item>
      <title>Are there hooks within activiti engine?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/are-there-hooks-within-activiti-engine/m-p/83338#M55959</link>
      <description>Hello, I would like to do something like this: For every user task you create call my custom method (1).Actually I could write additional code in our logic at two points to almost accomplish this: After creating a new process instance, look if the execution was stopped by a user task. And after comp</description>
      <pubDate>Tue, 10 Jul 2012 10:26:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/are-there-hooks-within-activiti-engine/m-p/83338#M55959</guid>
      <dc:creator>markusfaeth</dc:creator>
      <dc:date>2012-07-10T10:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: Are there hooks within activiti engine?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/are-there-hooks-within-activiti-engine/m-p/83339#M55960</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;You can use TaskListeners &lt;/SPAN&gt;&lt;A href="http://activiti.org/userguide/#taskListeners" rel="nofollow noopener noreferrer"&gt;http://activiti.org/userguide/#taskListeners&lt;/A&gt;&lt;SPAN&gt;. I would use this, if you want to control (define) at design time of the process model, what code should be executed at runtime.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If it's always the same code, that shoud be run, you could have a look at pre- and post parse listeners. You'll find information on them in this forum.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;michael&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2012 11:23:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/are-there-hooks-within-activiti-engine/m-p/83339#M55960</guid>
      <dc:creator>gant</dc:creator>
      <dc:date>2012-07-10T11:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Are there hooks within activiti engine?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/are-there-hooks-within-activiti-engine/m-p/83340#M55961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you!&amp;nbsp; &lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://connect.hyland.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This sounds promising, i'll check that!&amp;nbsp; :geek:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2012 12:07:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/are-there-hooks-within-activiti-engine/m-p/83340#M55961</guid>
      <dc:creator>markusfaeth</dc:creator>
      <dc:date>2012-07-10T12:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Are there hooks within activiti engine?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/are-there-hooks-within-activiti-engine/m-p/83341#M55962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;BpmnParseListeners are perfect for this purpose. Thanks again!&amp;nbsp; &lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://connect.hyland.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is some of the code for all others who want to do this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;public class ParseListener implements BpmnParseListener {&lt;BR /&gt; public void parseUserTask(Element userTaskElement, ScopeImpl scope, ActivityImpl activity) {&lt;BR /&gt;&amp;nbsp; UserTaskActivityBehavior utab = (UserTaskActivityBehavior)activity.getActivityBehavior();&lt;BR /&gt;&amp;nbsp; utab.getTaskDefinition().addTaskListener("create", new CommonUserTaskCreateListener());&lt;BR /&gt; }&lt;BR /&gt; // other method implementations, all empty…&lt;BR /&gt;}&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;CommonUserTaskCreateListener is actually creating messages (portal internal message system) for portal users getting informed that a new task is available…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2012 13:50:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/are-there-hooks-within-activiti-engine/m-p/83341#M55962</guid>
      <dc:creator>markusfaeth</dc:creator>
      <dc:date>2012-07-10T13:50:57Z</dc:date>
    </item>
  </channel>
</rss>

