<?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: timer boundary event and expired activity in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/timer-boundary-event-and-expired-activity/m-p/124888#M87874</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have had a quite similar requirement. What I did in order to have the taskID available, was to add a taskListener to the user task. I used the &amp;lt;code&amp;gt;ScriptTaskListener&amp;lt;/code&amp;gt; for the task-&amp;lt;code&amp;gt;create&amp;lt;/code&amp;gt; event. See the following example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;blockcode&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;userTask id="T0" name="T0" activiti:assignee="kermit"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;extensionElements&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activiti:taskListener event="create" class="org.activiti.engine.impl.bpmn.listener.ScriptTaskListener"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activiti:field name="script"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activiti:string&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tid = task.getId(); // test access to task instance&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/activiti:string&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/activiti:field&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activiti:field name="language" stringValue="groovy" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/activiti:taskListener&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/extensionElements&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/userTask&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/blockcode&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now you have the taskID available in the instance variable &amp;lt;code&amp;gt;tid&amp;lt;/code&amp;gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 08 Jun 2013 22:37:56 GMT</pubDate>
    <dc:creator>mjacobi</dc:creator>
    <dc:date>2013-06-08T22:37:56Z</dc:date>
    <item>
      <title>timer boundary event and expired activity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/timer-boundary-event-and-expired-activity/m-p/124883#M87869</link>
      <description>Dear all,Is there any way, in the context of timer boundary event (cancelActiviti=true) or in its outgoing transition, to catch the activiti id of the expired activiti? I have an expired task and I need access to the task id. Alternatively, is a deterministic historic query to get it?Thanks,Dimitris</description>
      <pubDate>Thu, 09 May 2013 04:35:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/timer-boundary-event-and-expired-activity/m-p/124883#M87869</guid>
      <dc:creator>mandas</dc:creator>
      <dc:date>2013-05-09T04:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: timer boundary event and expired activity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/timer-boundary-event-and-expired-activity/m-p/124884#M87870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The history of the activities are not yet committed to the database at the time the boundary-event is triggered. However, when not canceling the activiti, the parent-execution (containing the activityId of the task that is currently active in that execution) is available. You can use the DelegateExecution (casted to ExecutionImpl) to call "public ExecutionImpl getParent()" (or subsequently parent of parent in case of boundary-event on sub-processes).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does this help?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 May 2013 07:59:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/timer-boundary-event-and-expired-activity/m-p/124884#M87870</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-05-13T07:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: timer boundary event and expired activity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/timer-boundary-event-and-expired-activity/m-p/124885#M87871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Actually we definitely need to cancel the activiti. So, to my understanding, in that transactional context the user task will have been deleted. What I 'm doing is adding another service task after the timer (async=true) and do the following :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;HistoricTaskInstance expiredTask = historyService.createHistoricTaskInstanceQuery()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .processInstanceId(execution.getProcessInstanceId())&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .finished()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .taskDeleteReason("deleted").singleResult();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However this works in our case because that task we are querying is the only task in the process. I 'll try with cancel activiti to false and delete the task in the listener after the expiration timer and I 'll let you know.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dimitris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 May 2013 08:43:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/timer-boundary-event-and-expired-activity/m-p/124885#M87871</guid>
      <dc:creator>mandas</dc:creator>
      <dc:date>2013-05-13T08:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: timer boundary event and expired activity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/timer-boundary-event-and-expired-activity/m-p/124886#M87872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Actually, my initial question was wrong. I 've falsely written about activiti id (which can be get from the execution either with cancel=true or false). My need is to get the task id of the expired task, is this possible?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry for the inconvenience,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dimitris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 May 2013 11:10:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/timer-boundary-event-and-expired-activity/m-p/124886#M87872</guid>
      <dc:creator>mandas</dc:creator>
      <dc:date>2013-05-13T11:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: timer boundary event and expired activity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/timer-boundary-event-and-expired-activity/m-p/124887#M87873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Do you mean the task id in the xml definition? Or the database id of the task?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I assume the database id. I don't see an easy way to retrieve that id straight away. Probably with a BpmnParseHandler on the timer you might be able to store the id on which the timer is defined. But it's a long shot.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2013 08:08:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/timer-boundary-event-and-expired-activity/m-p/124887#M87873</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-05-14T08:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: timer boundary event and expired activity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/timer-boundary-event-and-expired-activity/m-p/124888#M87874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have had a quite similar requirement. What I did in order to have the taskID available, was to add a taskListener to the user task. I used the &amp;lt;code&amp;gt;ScriptTaskListener&amp;lt;/code&amp;gt; for the task-&amp;lt;code&amp;gt;create&amp;lt;/code&amp;gt; event. See the following example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;blockcode&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;userTask id="T0" name="T0" activiti:assignee="kermit"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;extensionElements&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activiti:taskListener event="create" class="org.activiti.engine.impl.bpmn.listener.ScriptTaskListener"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activiti:field name="script"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activiti:string&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tid = task.getId(); // test access to task instance&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/activiti:string&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/activiti:field&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activiti:field name="language" stringValue="groovy" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/activiti:taskListener&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/extensionElements&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/userTask&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/blockcode&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now you have the taskID available in the instance variable &amp;lt;code&amp;gt;tid&amp;lt;/code&amp;gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Jun 2013 22:37:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/timer-boundary-event-and-expired-activity/m-p/124888#M87874</guid>
      <dc:creator>mjacobi</dc:creator>
      <dc:date>2013-06-08T22:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: timer boundary event and expired activity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/timer-boundary-event-and-expired-activity/m-p/124889#M87875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's a valid solution that mjacobi suggests and requires no actual java-coding..&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jun 2013 15:02:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/timer-boundary-event-and-expired-activity/m-p/124889#M87875</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-06-10T15:02:18Z</dc:date>
    </item>
  </channel>
</rss>

