<?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 Skip doesn't work when user task assigned to group in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/skip-doesn-t-work-when-user-task-assigned-to-group/m-p/220626#M173756</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Running 5.21 with postgresql DB.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a very simple process with 2 steps. First is a groovy script to enable skip by setting _ACTIVITI_SKIP_EXPRESSION_ENABLED to true. Second is a user task with a skip expression. The start form prompts whether or to skip the user task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If the user task is assigned to a person (i.e. initiator) and the initiator elects to skip the user task, all works well. See snippet below. The complete process is in the Skip_Initiator_Task.bpmn_.txt attachment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;userTask id="userTask1" name="User Task 1" activiti:assignee="${initiator}" activiti:skipExpression="${skipUserTask1 == true}"&amp;gt;&amp;lt;/userTask&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;If the user task is assigned to a group (e.g. engineering) and the initiator elects to skip the user task, the process fails and we get a traceback. See snippet below. The complete process is in the Skip_Group_Task.bpmn_.txt attachment. See tracebacks in tracebacks.txt attachment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;userTask id="userTask1" name="User Task 1" activiti:candidateGroups="engineering" activiti:skipExpression="${skipUserTask1 == true}"&amp;gt;&amp;lt;/userTask&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this a known issue? I know that I could work around this using gateways. However, I would really like to leverage skip for my purpose.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Aug 2016 11:42:11 GMT</pubDate>
    <dc:creator>dan1</dc:creator>
    <dc:date>2016-08-08T11:42:11Z</dc:date>
    <item>
      <title>Skip doesn't work when user task assigned to group</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/skip-doesn-t-work-when-user-task-assigned-to-group/m-p/220626#M173756</link>
      <description>Running 5.21 with postgresql DB.I have a very simple process with 2 steps. First is a groovy script to enable skip by setting _ACTIVITI_SKIP_EXPRESSION_ENABLED to true. Second is a user task with a skip expression. The start form prompts whether or to skip the user task.If the user task is assigned</description>
      <pubDate>Mon, 08 Aug 2016 11:42:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/skip-doesn-t-work-when-user-task-assigned-to-group/m-p/220626#M173756</guid>
      <dc:creator>dan1</dc:creator>
      <dc:date>2016-08-08T11:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: Skip doesn't work when user task assigned to group</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/skip-doesn-t-work-when-user-task-assigned-to-group/m-p/220627#M173757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Finally got back around to looking at this. I was able to work around the issue I was having. This thread is related to the issue:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://forums.activiti.org/content/completing-task-within-createlistener" rel="nofollow noopener noreferrer"&gt;https://forums.activiti.org/content/completing-task-within-createlistener&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;lmazurk's post is similar to how I worked around my issue. I'm using a TASK_CREATED event listener which assigns and completes the task if the skip expression evaluates to true. In order for this to work, _ACTIVITI_SKIP_EXPRESSION_ENABLED must be false. And you can't invoke taskService.complete within the existing transaction or you get the traceback I attached to original post. Instead the code creates a timer task that actually invokes taskService.complete. This gives the engine a chance to complete the transaction.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately, this is a bit hacky and requires use of internal code.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2016 12:19:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/skip-doesn-t-work-when-user-task-assigned-to-group/m-p/220627#M173757</guid>
      <dc:creator>dan1</dc:creator>
      <dc:date>2016-08-23T12:19:19Z</dc:date>
    </item>
  </channel>
</rss>

