<?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: Make Script Task Wait in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/make-script-task-wait/m-p/4933#M2334</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;B&gt;Ali Malik&lt;/B&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you explain your model/use case a bit more please? Essentially, what are you trying to model?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also for your script task, what is it doing? Can you share your script code?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="color: #555555; background-color: #ffffff; font-weight: 100;"&gt;I have checked they're all Synchronous, but still User Task2 pops up all of a sudden. Is script task supposed to be this way?&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="color: #555555; background-color: #ffffff; font-weight: 100;"&gt;Process instance execution reaches User Task 2 because the script task has been completed. This is expected. Again, please share a clearer description of what you're trying to achieve.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #555555; background-color: #ffffff; font-weight: 100;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #555555; background-color: #ffffff; font-weight: 100;"&gt;Thong Huynh&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #555555; background-color: #ffffff; font-weight: 100;"&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Feb 2017 04:13:09 GMT</pubDate>
    <dc:creator>thuynh</dc:creator>
    <dc:date>2017-02-07T04:13:09Z</dc:date>
    <item>
      <title>Make Script Task Wait</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/make-script-task-wait/m-p/4932#M2333</link>
      <description>Hi,I have an activiti workflow in which I go from User Task1 -&amp;gt; Groovy Script (Script Task) -&amp;gt; User Task2.&amp;nbsp;The question is I want to reach the User Task2 only when I know the Groovy Script has completed.The groovy script hasn't completed and the user task 2 gets activated. Maybe I need to set</description>
      <pubDate>Mon, 06 Feb 2017 20:44:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/make-script-task-wait/m-p/4932#M2333</guid>
      <dc:creator>ali_malik</dc:creator>
      <dc:date>2017-02-06T20:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: Make Script Task Wait</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/make-script-task-wait/m-p/4933#M2334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;B&gt;Ali Malik&lt;/B&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you explain your model/use case a bit more please? Essentially, what are you trying to model?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also for your script task, what is it doing? Can you share your script code?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="color: #555555; background-color: #ffffff; font-weight: 100;"&gt;I have checked they're all Synchronous, but still User Task2 pops up all of a sudden. Is script task supposed to be this way?&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="color: #555555; background-color: #ffffff; font-weight: 100;"&gt;Process instance execution reaches User Task 2 because the script task has been completed. This is expected. Again, please share a clearer description of what you're trying to achieve.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #555555; background-color: #ffffff; font-weight: 100;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #555555; background-color: #ffffff; font-weight: 100;"&gt;Thong Huynh&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #555555; background-color: #ffffff; font-weight: 100;"&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2017 04:13:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/make-script-task-wait/m-p/4933#M2334</guid>
      <dc:creator>thuynh</dc:creator>
      <dc:date>2017-02-07T04:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Make Script Task Wait</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/make-script-task-wait/m-p/4934#M2335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;B&gt;Thong Huynh&lt;/B&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my use case, I have a user task, Let's call it User Task 1. There's a button called "Re-assign". If you press this button, it takes you to User Task 2. If you don't, the workflow changes, but that's fine. When you do get to User Task 2, you select a new user to re-assign that task. When you press Submit, a Groovy script is called. In that script, the current user is being removed from the role that can execute User Task 1, and the new user is added to that role. But as soon as the script is executed, current user again sees User Task 1 and the new user&amp;nbsp;doesn't.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems like a concurrency issue, perhaps? Because when the current user sees User Task 1 again, and presses "Re-assign" again, the current user doesn't see the User Task 2, the new user now sees User Task 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Flow problem: New user should have seen User Task 1, and current user shouldn't have seen User Task 1 for the second time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope I got my point across, thank you for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2017 14:11:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/make-script-task-wait/m-p/4934#M2335</guid>
      <dc:creator>ali_malik</dc:creator>
      <dc:date>2017-02-07T14:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Make Script Task Wait</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/make-script-task-wait/m-p/4935#M2336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;B&gt;Ali Malik&lt;/B&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not quite. I'm still not understanding the bpmn model that you're trying to implement here. Are you implementing a 'Task Reassignment' workflow? Instead of listing out the steps of what you are doing, take a step back and explain the higher goal of what you're trying to achieve. It is important to understand the goals and get the process modelling right before we can talk about deeper technical pieces.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You stated the problem is that&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;New user should have seen User Task 1, and current user shouldn't have seen User Task 1 for the second time.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This is not a good problem statement unless you can attach a unit test that we can run and see the issue. Without a unit test,&amp;nbsp;it's difficult for anyone in this forum to help you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please spend time to write up a unit test that demonstrates your issue so people here can help you resolve it.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://www.jorambarrez.be/blog/2012/09/24/how-to-write-a-unit-test/" title="http://www.jorambarrez.be/blog/2012/09/24/how-to-write-a-unit-test/" rel="nofollow noopener noreferrer"&gt;How to write a unit test when creating an Activiti Jira issue | Small steps with big feet&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this makes sense,&lt;/P&gt;&lt;P&gt;Thong&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, 08 Feb 2017 02:30:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/make-script-task-wait/m-p/4935#M2336</guid>
      <dc:creator>thuynh</dc:creator>
      <dc:date>2017-02-08T02:30:47Z</dc:date>
    </item>
  </channel>
</rss>

