<?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: SubmitTaskFormData in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/submittaskformdata/m-p/30108#M15443</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, not sure this is what you mean, but here's an example how you can work with that part of the API in a unit test. Obviously, if you're not running a test you need a different way to get to the TaskService (via the process engine), but this should give you an idea:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;final TaskService taskService = activitiRule.getTaskService();&lt;BR /&gt;final TaskQuery taskQuery = taskService.createTaskQuery();&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;taskQuery.taskName("nameOfMyTask");&lt;BR /&gt;List&amp;lt;Task&amp;gt; tasks = taskQuery.list();&lt;BR /&gt;assertEquals(1, tasks.size());&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;String taskId = tasks.get(0).getId();&lt;BR /&gt;Map&amp;lt;String,Object&amp;gt; taskVars = new HashMap&amp;lt;String,Object&amp;gt;();&lt;BR /&gt;taskVars.put("amount", 5);&lt;BR /&gt;taskVars.put("customerName", "John Doe");&lt;BR /&gt;taskVars.put("type", "iPhone");&lt;BR /&gt;taskService.complete(taskId, taskVars);&lt;BR /&gt;&lt;BR /&gt;tasks = taskQuery.list();&lt;BR /&gt;assertEquals(0, tasks.size());&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Mar 2011 11:27:26 GMT</pubDate>
    <dc:creator>tiesebarrell</dc:creator>
    <dc:date>2011-03-18T11:27:26Z</dc:date>
    <item>
      <title>SubmitTaskFormData</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/submittaskformdata/m-p/30107#M15442</link>
      <description>Hi,i got a use-case, to be able to complete user task that have forms without the activiti exploreri searched the java-docs and found a method called SubmitTaskFormData. ("Completes a task with the user data that was entered as properties in a task form.")as parameters there are the task-ID and a ma</description>
      <pubDate>Fri, 18 Mar 2011 09:16:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/submittaskformdata/m-p/30107#M15442</guid>
      <dc:creator>piseven</dc:creator>
      <dc:date>2011-03-18T09:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: SubmitTaskFormData</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/submittaskformdata/m-p/30108#M15443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, not sure this is what you mean, but here's an example how you can work with that part of the API in a unit test. Obviously, if you're not running a test you need a different way to get to the TaskService (via the process engine), but this should give you an idea:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;final TaskService taskService = activitiRule.getTaskService();&lt;BR /&gt;final TaskQuery taskQuery = taskService.createTaskQuery();&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;taskQuery.taskName("nameOfMyTask");&lt;BR /&gt;List&amp;lt;Task&amp;gt; tasks = taskQuery.list();&lt;BR /&gt;assertEquals(1, tasks.size());&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;String taskId = tasks.get(0).getId();&lt;BR /&gt;Map&amp;lt;String,Object&amp;gt; taskVars = new HashMap&amp;lt;String,Object&amp;gt;();&lt;BR /&gt;taskVars.put("amount", 5);&lt;BR /&gt;taskVars.put("customerName", "John Doe");&lt;BR /&gt;taskVars.put("type", "iPhone");&lt;BR /&gt;taskService.complete(taskId, taskVars);&lt;BR /&gt;&lt;BR /&gt;tasks = taskQuery.list();&lt;BR /&gt;assertEquals(0, tasks.size());&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2011 11:27:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/submittaskformdata/m-p/30108#M15443</guid>
      <dc:creator>tiesebarrell</dc:creator>
      <dc:date>2011-03-18T11:27:26Z</dc:date>
    </item>
  </channel>
</rss>

