<?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 Saving Form Properties and variables when starting a process in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/saving-form-properties-and-variables-when-starting-a-process/m-p/181110#M134240</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 want to save 'form properties' and 'variables' together when starting a process. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The first task after 'start event' is a script task, that uses a variable that is saved in starting the process.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found two possible (not working) solutions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1- Starting process with RuntimeService.startProcessInstanceById (with variables), then saving form properties with FormService.saveFormData: It's not possible, we have only FormService.saveFormData for tasks, not processInstances.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-java line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;ProcessInstance startProcessInstanceById(String processDefinitionId, String businessKey, Map&amp;lt;String, Object&amp;gt; variables) ;&lt;BR /&gt;void saveFormData(String taskId, Map&amp;lt;String, String&amp;gt; properties);&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;2- Submitting form properties with FormService.submitStartFormData, then saving variables with RuntimeService.setVariables: It's not possible, FormService.submitStartFormData has no 'variables' argument. So it starts process without saving variables (and the script task will throw an exception).&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-java line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;ProcessInstance submitStartFormData(String processDefinitionId, String businessKey, Map&amp;lt;String, String&amp;gt; properties);&lt;BR /&gt;void setVariables(String executionId, Map&amp;lt;String, ? extends Object&amp;gt; variables);&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What should i do?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Nov 2014 12:30:29 GMT</pubDate>
    <dc:creator>mf</dc:creator>
    <dc:date>2014-11-10T12:30:29Z</dc:date>
    <item>
      <title>Saving Form Properties and variables when starting a process</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/saving-form-properties-and-variables-when-starting-a-process/m-p/181110#M134240</link>
      <description>Hi,I want to save 'form properties' and 'variables' together when starting a process. The first task after 'start event' is a script task, that uses a variable that is saved in starting the process.I found two possible (not working) solutions:1- Starting process with RuntimeService.startProcessInsta</description>
      <pubDate>Mon, 10 Nov 2014 12:30:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/saving-form-properties-and-variables-when-starting-a-process/m-p/181110#M134240</guid>
      <dc:creator>mf</dc:creator>
      <dc:date>2014-11-10T12:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Saving Form Properties and variables when starting a process</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/saving-form-properties-and-variables-when-starting-a-process/m-p/181111#M134241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Form properties are variables, they are stored as variables after submitting them. Why would you want to separate these two out?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Nov 2014 19:20:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/saving-form-properties-and-variables-when-starting-a-process/m-p/181111#M134241</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2014-11-18T19:20:42Z</dc:date>
    </item>
  </channel>
</rss>

