<?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 the value of variable in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/setting-the-value-of-variable/m-p/14594#M6318</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Indeed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The engine API supports this. The REST-API doesn't expose this yet.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Jan 2011 09:45:05 GMT</pubDate>
    <dc:creator>frederikherema1</dc:creator>
    <dc:date>2011-01-17T09:45:05Z</dc:date>
    <item>
      <title>setting the value of variable</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/setting-the-value-of-variable/m-p/14586#M6310</link>
      <description>Hi,I have the following problem. In the 'DelegateExecution' I store a 'm' variable which is an object of the class Movie and for instance has a field title of type string. Then I display this value in a form using the following piece of code (user can change the value of the field):&amp;lt;input type="t</description>
      <pubDate>Thu, 13 Jan 2011 16:31:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/setting-the-value-of-variable/m-p/14586#M6310</guid>
      <dc:creator>opal</dc:creator>
      <dc:date>2011-01-13T16:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: setting the value of variable</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/setting-the-value-of-variable/m-p/14587#M6311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is it even possible? No ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jan 2011 08:52:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/setting-the-value-of-variable/m-p/14587#M6311</guid>
      <dc:creator>opal</dc:creator>
      <dc:date>2011-01-14T08:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: setting the value of variable</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/setting-the-value-of-variable/m-p/14588#M6312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can't reproduce it here locally.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you post a simple version of your form + process?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jan 2011 09:29:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/setting-the-value-of-variable/m-p/14588#M6312</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2011-01-14T09:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: setting the value of variable</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/setting-the-value-of-variable/m-p/14589#M6313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I will, but need some time to prepare sample.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jan 2011 09:49:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/setting-the-value-of-variable/m-p/14589#M6313</guid>
      <dc:creator>opal</dc:creator>
      <dc:date>2011-01-14T09:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: setting the value of variable</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/setting-the-value-of-variable/m-p/14590#M6314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, I've prepared simplified version o my process. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's the bpmn20.xml:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;BR /&gt;&amp;lt;definitions xmlns="&lt;A href="http://www.omg.org/spec/BPMN/20100524/MODEL" rel="nofollow noopener noreferrer"&gt;http://www.omg.org/spec/BPMN/20100524/MODEL&lt;/A&gt;"&lt;BR /&gt; xmlns:xsi="&lt;A href="http://www.w3.org/2001/XMLSchema-instance" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/A&gt;" xmlns:activiti="&lt;A href="http://activiti.org/bpmn" rel="nofollow noopener noreferrer"&gt;http://activiti.org/bpmn&lt;/A&gt;"&lt;BR /&gt; targetNamespace="&lt;A href="http://www.bpmnwithactiviti.org/movieOrder" rel="nofollow noopener noreferrer"&gt;http://www.bpmnwithactiviti.org/movieOrder&lt;/A&gt;"&amp;gt;&lt;BR /&gt;&lt;BR /&gt; &amp;lt;process id="movieOrder" name="Order a movie"&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;startEvent id="start" /&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;sequenceFlow sourceRef="start" targetRef="parseJson" /&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;serviceTask id="parseJson" name="Parse JSON" activiti:class="services.ParseJSONService" /&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;sequenceFlow sourceRef="parseJson" targetRef="assignTechnician" /&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;userTask id="assignTechnician" name="Assign the technician" activiti:candidateGroups="customers" activiti:formKey="assignTechnician.form" /&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;sequenceFlow sourceRef="assignTechnician" targetRef="createMovie" /&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;userTask id="createMovie" name="Create movie" activiti:formKey="createMovie.form"/&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;sequenceFlow sourceRef="createMovie" targetRef="end" /&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;endEvent id="end" /&amp;gt;&lt;BR /&gt; &amp;lt;/process&amp;gt;&lt;BR /&gt;&amp;lt;/definitions&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;SPAN&gt;In ParseJSONService I parse the incoming request and store m variable in the context.&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;public class ParseJSONService implements JavaDelegate {&lt;BR /&gt;&lt;BR /&gt; private GsonMapper gm = new GsonMapper();&lt;BR /&gt;&lt;BR /&gt; @Override&lt;BR /&gt; public void execute(DelegateExecution de) throws Exception {&lt;BR /&gt;&amp;nbsp; String mJson = (String) de.getVariable("movie");&lt;BR /&gt;&amp;nbsp; Movie m = gm.fromJson(mJson, Movie.class);&lt;BR /&gt;&amp;nbsp; de.setVariable("m", m);&lt;BR /&gt; }&lt;BR /&gt;}&lt;BR /&gt;&lt;/CODE&gt;&lt;SPAN&gt;Movie:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;public class Movie implements Serializable {&lt;BR /&gt;&lt;BR /&gt; private Integer id;&lt;BR /&gt; private String title;&lt;BR /&gt; private String genre;&lt;BR /&gt; private String spiCode;&lt;BR /&gt;&lt;BR /&gt; //public getters and setters&lt;BR /&gt;}&lt;BR /&gt;&lt;/CODE&gt;&lt;SPAN&gt;In assignTechnician.form I can edit some movie properties (the movie's properties are displaying well):&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;div&amp;gt;&lt;BR /&gt; &amp;lt;h1&amp;gt;Order&amp;lt;/h1&amp;gt;&lt;BR /&gt; &amp;lt;table&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Title&amp;lt;/td&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;input type="text" value="${m.title}"&amp;gt;&amp;lt;/td&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Genre&amp;lt;/td&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;input type="text" value="${m.genre}"&amp;gt;&amp;lt;/td&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;SPI&amp;lt;/td&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;input type="text" value="${m.spiCode}"&amp;gt;&amp;lt;/td&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;BR /&gt; &amp;lt;/table&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;SPAN&gt;I expect that on the createMovie.form I will see updated values of movie (changed in assignedTechnician.form) but this doesn't happen. createMovie.form:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;div&amp;gt;&lt;BR /&gt; &amp;lt;h1&amp;gt;Order&amp;lt;/h1&amp;gt;&lt;BR /&gt; &amp;lt;table&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Title&amp;lt;/td&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;${m.title}&amp;lt;/td&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Genre&amp;lt;/td&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;${m.genre}&amp;lt;/td&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;SPI&amp;lt;/td&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;${m.spiCode}&amp;lt;/td&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;BR /&gt; &amp;lt;/table&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;SPAN&gt;My question is: what should be done to see the updated properties o m object on the following forms in my process.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jan 2011 11:15:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/setting-the-value-of-variable/m-p/14590#M6314</guid>
      <dc:creator>opal</dc:creator>
      <dc:date>2011-01-14T11:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: setting the value of variable</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/setting-the-value-of-variable/m-p/14591#M6315</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;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jan 2011 07:40:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/setting-the-value-of-variable/m-p/14591#M6315</guid>
      <dc:creator>opal</dc:creator>
      <dc:date>2011-01-17T07:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: setting the value of variable</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/setting-the-value-of-variable/m-p/14592#M6316</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;BR /&gt;&lt;SPAN&gt;The problem is that your form doesn't really set the values from your movie-pojo, you have:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;td&amp;gt;&amp;lt;input type="text" value="${m.title}"&amp;gt;&amp;lt;/td&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;While the userguide mentions this, using the "name" attribute on the input-tag:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;input type="text" name="employeeName" value="" /&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;Currently the REST-API (and explorer) doesn't use the formProperties yet. If these are available, you can specify a mapping from a property on your form to a variable (or even an expression). More info on this can be found in the userguide.&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;activiti:formProperty id="title" expression="#{m.title}" required="true" /&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;As a current workaround, you could add a TaskListener to the userTask on event "end" that invokes setters on your movie-object with properties posted in the form.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jan 2011 08:13:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/setting-the-value-of-variable/m-p/14592#M6316</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2011-01-17T08:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: setting the value of variable</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/setting-the-value-of-variable/m-p/14593#M6317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Currently the REST-API (and explorer) doesn't use the formProperties yet.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;As far as I understand this functionality isn't supported yet?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The workaround might be good idea. Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jan 2011 09:39:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/setting-the-value-of-variable/m-p/14593#M6317</guid>
      <dc:creator>opal</dc:creator>
      <dc:date>2011-01-17T09:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: setting the value of variable</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/setting-the-value-of-variable/m-p/14594#M6318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Indeed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The engine API supports this. The REST-API doesn't expose this yet.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jan 2011 09:45:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/setting-the-value-of-variable/m-p/14594#M6318</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2011-01-17T09:45:05Z</dc:date>
    </item>
  </channel>
</rss>

