<?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 modifying workflow task properties in javascript in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/modifying-workflow-task-properties-in-javascript/m-p/182766#M135896</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Folks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to introduce a REST web service for controlling workflows using the web scripts framework.&amp;nbsp; I've found it relatively straightforward to write GET requests which expose the workflow state, but I am having problems controlling the workflow.&amp;nbsp; There are methods such as [definition].startWorkflow(), which will take some task properties as an argument, but I need to be able to pass in further workflow properties as the process executes.&amp;nbsp; I have been able to execute the following code with success:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var task = workflow.getTaskByID(taskID);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;task.properties["someProperty"] = "someValue";&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but this property only persists for the duration of the existance of the javascript task object.&amp;nbsp; I need to persist this information in Alfresco somehow.&amp;nbsp; I've looked at the source code for the java objects which back the javascript api, and can't find anything like a commit() or save() method, or see any persistance annotations.&amp;nbsp; How can I get my properties to persist between requests?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or am I approaching workflow task model properties in the wrong way?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any advice gratefully appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Richard&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Oct 2008 12:08:57 GMT</pubDate>
    <dc:creator>r1ch4rd</dc:creator>
    <dc:date>2008-10-29T12:08:57Z</dc:date>
    <item>
      <title>modifying workflow task properties in javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modifying-workflow-task-properties-in-javascript/m-p/182766#M135896</link>
      <description>Hi Folks,I am trying to introduce a REST web service for controlling workflows using the web scripts framework.&amp;nbsp; I've found it relatively straightforward to write GET requests which expose the workflow state, but I am having problems controlling the workflow.&amp;nbsp; There are methods such as [definition].</description>
      <pubDate>Wed, 29 Oct 2008 12:08:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modifying-workflow-task-properties-in-javascript/m-p/182766#M135896</guid>
      <dc:creator>r1ch4rd</dc:creator>
      <dc:date>2008-10-29T12:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: modifying workflow task properties in javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modifying-workflow-task-properties-in-javascript/m-p/182767#M135897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Most of the other Javascript types have a save() method on them that you can use to persist the data.&amp;nbsp; You might just want to try that (if you haven't already).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm having a strange problem in that I can't even get a reference to the workflow object.&amp;nbsp; I get the following exception:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;11:30:02,552 INFO&amp;nbsp; [web.scripts.DeclarativeWebScript] Caught exception &amp;amp; redirecting to status template: Failed to execute script 'workspace://SpacesStore//Co&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mpany Home/Data Dictionary/Web Scripts Extensions/d3/tasks/endTask.post.js': Failed to execute script 'workspace://SpacesStore//Company Home/Data Dictionary/W&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;eb Scripts Extensions/d3/tasks/endTask.post.js':&lt;/SPAN&gt;&lt;STRONG&gt; ReferenceError: "workflow" is not defined&lt;/STRONG&gt;&lt;SPAN&gt;. (AlfrescoScript#7)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm afraid I'm going to find out that this workflow object isn't exposed in 2.2, but only in 3.0.&amp;nbsp; Can you please share with me the version you are using?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2008 19:37:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modifying-workflow-task-properties-in-javascript/m-p/182767#M135897</guid>
      <dc:creator>risenhoover</dc:creator>
      <dc:date>2008-11-13T19:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: modifying workflow task properties in javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modifying-workflow-task-properties-in-javascript/m-p/182768#M135898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have the same problem. You have solved?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Emanuela&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2009 10:28:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modifying-workflow-task-properties-in-javascript/m-p/182768#M135898</guid>
      <dc:creator>emmy</dc:creator>
      <dc:date>2009-02-09T10:28:32Z</dc:date>
    </item>
  </channel>
</rss>

