<?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: CDI: Howto 'pause' an user task with flush of variables in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/cdi-howto-pause-an-user-task-with-flush-of-variables/m-p/116441#M82154</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think a user task is paused by default, since task is of 'block' element, which will block the process execution until you implicity push it ahead. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can store variables with taskService after you starting a task, and retrieve it back anytime later.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 May 2012 08:28:33 GMT</pubDate>
    <dc:creator>rogerofyan</dc:creator>
    <dc:date>2012-05-21T08:28:33Z</dc:date>
    <item>
      <title>CDI: Howto 'pause' an user task with flush of variables</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cdi-howto-pause-an-user-task-with-flush-of-variables/m-p/116440#M82153</link>
      <description>Hello,on a JSF mask i use &amp;lt;f:event type="preRenderView" listener="#{businessProcess.startTask(taskId, true)}" /&amp;gt;‍‍‍to start the user task and &amp;lt;h:commandButton action="#{businessProcess.completeTask(true)}" value="Complete" /&amp;gt;‍‍‍to complete the user task. I now want to add a button where</description>
      <pubDate>Sun, 20 May 2012 20:51:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cdi-howto-pause-an-user-task-with-flush-of-variables/m-p/116440#M82153</guid>
      <dc:creator>chris_joelly</dc:creator>
      <dc:date>2012-05-20T20:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: CDI: Howto 'pause' an user task with flush of variables</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cdi-howto-pause-an-user-task-with-flush-of-variables/m-p/116441#M82154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think a user task is paused by default, since task is of 'block' element, which will block the process execution until you implicity push it ahead. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can store variables with taskService after you starting a task, and retrieve it back anytime later.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 May 2012 08:28:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cdi-howto-pause-an-user-task-with-flush-of-variables/m-p/116441#M82154</guid>
      <dc:creator>rogerofyan</dc:creator>
      <dc:date>2012-05-21T08:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: CDI: Howto 'pause' an user task with flush of variables</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cdi-howto-pause-an-user-task-with-flush-of-variables/m-p/116442#M82155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;yes, storing the variables using the TaskService is possible, but as the businessProcess.startTask and businessProcess.completeTask create a scope and association of the execution to the scope (i think Conversation scope) this scope needs to be closed and the association removed as well.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 May 2012 12:05:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cdi-howto-pause-an-user-task-with-flush-of-variables/m-p/116442#M82155</guid>
      <dc:creator>chris_joelly</dc:creator>
      <dc:date>2012-05-21T12:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: CDI: Howto 'pause' an user task with flush of variables</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cdi-howto-pause-an-user-task-with-flush-of-variables/m-p/116443#M82156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Chris,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The following should work:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;public class Controller {&lt;BR /&gt;&lt;BR /&gt; @Inject&lt;BR /&gt; private BusinessProcessAssociationManager associationManager;&lt;BR /&gt; &lt;BR /&gt; @Inject &lt;BR /&gt; private TaskService taskService;&lt;BR /&gt; &lt;BR /&gt; public void pauseUserTask() {&lt;BR /&gt;&amp;nbsp; Task task = associationManager.getTask();&lt;BR /&gt;&amp;nbsp; if(task == null) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; throw new RuntimeException("Not working on a task");&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; // flush the variables&lt;BR /&gt;&amp;nbsp; Map&amp;lt;String, Object&amp;gt; changedVariables = associationManager.getBeanStore().getAllAndClear();&lt;BR /&gt;&amp;nbsp; if(changedVariables.size()&amp;gt;0) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; taskService.setVariables(task.getId(), changedVariables);&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; // remove the association with the current task. &lt;BR /&gt;&amp;nbsp; associationManager.disAssociate();&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt;}&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2012 06:33:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cdi-howto-pause-an-user-task-with-flush-of-variables/m-p/116443#M82156</guid>
      <dc:creator>meyerd</dc:creator>
      <dc:date>2012-05-24T06:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: CDI: Howto 'pause' an user task with flush of variables</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cdi-howto-pause-an-user-task-with-flush-of-variables/m-p/116444#M82157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Daniel,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for the hint with the associationManager. I already tried to extend the BusinessProcess bean but did not think of using the BusinessProcessAssociationManager.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When i think of the conversation and association:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it safe to end an active conversion as well when i pause/suspend an user task?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And when the user does not leave the form and continue his work (within the session timeout of course),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;how can i recover from it? I think there should be some kind of resume as well after the pause/suspend?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Or is it better to redirect the user to the task list from which he can work on another task or restart the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"paused" task which then starts a new conversation and association cleanly?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, Chris&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;btw: BusinessProcess.startTask(String taskId, boolean beginConversation) ignores the argument beginConversation.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 May 2012 19:40:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cdi-howto-pause-an-user-task-with-flush-of-variables/m-p/116444#M82157</guid>
      <dc:creator>chris_joelly</dc:creator>
      <dc:date>2012-05-27T19:40:56Z</dc:date>
    </item>
  </channel>
</rss>

