<?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: Setting task variables from Java in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/setting-task-variables-from-java/m-p/44216#M24292</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The task-assign event also gets fired every time you save a task (from the manage task dialog).&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;I think that's a bug - it should only fire task-assign, when the task is first assigned to a person, or subsequently re-assigned - not on every save.&amp;nbsp; I'll raise a JIRA issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;My requirement is in fact to update the task status automatically once the user has set a start date and saved the task.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately, there isn't a task-updated event to hook into - only task-end, but that's too late for you - the status is automatically set to completed, on task end, anyway.&amp;nbsp; I'll add a JIRA enhancement for task-updated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only thing that comes to mind is to override the task dialog bean in the web client, and add the start date/status behaviour there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We have thought about adding explicit "start/suspend task" buttons to the task dialog which maintain dates &amp;amp; status for the user.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Dec 2006 12:26:37 GMT</pubDate>
    <dc:creator>davidc</dc:creator>
    <dc:date>2006-12-01T12:26:37Z</dc:date>
    <item>
      <title>Setting task variables from Java</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/setting-task-variables-from-java/m-p/44213#M24289</link>
      <description>Hi,Can anyone tell me the "best" (recommended) way of updating task variables from Java ?I have tried using both the jBPM TaskInstance.setVariable() and the Alfresco WorkflowService.updateTask() methods, however I am not getting the required result.The property I need to update (my:status) is define</description>
      <pubDate>Wed, 22 Nov 2006 20:00:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/setting-task-variables-from-java/m-p/44213#M24289</guid>
      <dc:creator>fshipley</dc:creator>
      <dc:date>2006-11-22T20:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: Setting task variables from Java</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/setting-task-variables-from-java/m-p/44214#M24290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Frank,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Both of your solutions should work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The taskInstance.setVariable() method seems to update the property OK, because if I do a taskInstance.getVariable() straight after, I get the correct value … however it gets set back to the old value somewhere else along the line.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;How are you retrieving the value later on in the process?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll have a go at this myself, but can't guarantee when!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Nov 2006 12:09:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/setting-task-variables-from-java/m-p/44214#M24290</guid>
      <dc:creator>davidc</dc:creator>
      <dc:date>2006-11-23T12:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Setting task variables from Java</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/setting-task-variables-from-java/m-p/44215#M24291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi David,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your reply. Now I know I'm on the right track, I've done a few more tests…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It works OK when I set a variable from the task-create and task-end events. It also works from the very first task-assign event. The task-assign event also gets fired every time you save a task (from the manage task dialog). Setting a variable doesn't seem to work in those subsequent task-assign events (although I'm not 100% sure).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My requirement is in fact to update the task status automatically once the user has set a start date and saved the task. Maybe you have another solution or work-around.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please don't waste your time trying to reproduce my problem. Any ideas off the top of your head would be appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Frank&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Nov 2006 19:55:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/setting-task-variables-from-java/m-p/44215#M24291</guid>
      <dc:creator>fshipley</dc:creator>
      <dc:date>2006-11-23T19:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: Setting task variables from Java</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/setting-task-variables-from-java/m-p/44216#M24292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The task-assign event also gets fired every time you save a task (from the manage task dialog).&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;I think that's a bug - it should only fire task-assign, when the task is first assigned to a person, or subsequently re-assigned - not on every save.&amp;nbsp; I'll raise a JIRA issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;My requirement is in fact to update the task status automatically once the user has set a start date and saved the task.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately, there isn't a task-updated event to hook into - only task-end, but that's too late for you - the status is automatically set to completed, on task end, anyway.&amp;nbsp; I'll add a JIRA enhancement for task-updated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only thing that comes to mind is to override the task dialog bean in the web client, and add the start date/status behaviour there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We have thought about adding explicit "start/suspend task" buttons to the task dialog which maintain dates &amp;amp; status for the user.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Dec 2006 12:26:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/setting-task-variables-from-java/m-p/44216#M24292</guid>
      <dc:creator>davidc</dc:creator>
      <dc:date>2006-12-01T12:26:37Z</dc:date>
    </item>
  </channel>
</rss>

