<?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 DelegateExecution.setVariable loses inherited attributes in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/delegateexecution-setvariable-loses-inherited-attributes/m-p/44857#M24821</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;I've an issue Using Activiti 5.6. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I set in the DelegateExecution an object wich extends of a superclass, I lost the inherited attributes&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;public class Animal{&lt;BR /&gt;&amp;nbsp; private String color;&lt;BR /&gt;&amp;nbsp; (getters&amp;amp;setters)&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;public class Cat extends Animal{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; private String name;&lt;BR /&gt;&amp;nbsp; (getters&amp;amp;setters)&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;public class AnimalTask&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; implements JavaDelegate {&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; public void execute(DelegateExecution execution) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cat cat = new Cat();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cat.setColor = "cyan";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cat.setName = "Tom";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; execution.setVariable("ANIMAL", cat);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&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;/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;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;/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;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;(My flow ends with a UserTask): &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// The inherited attribute&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;execution.getVariable("ANIMAL").getColor() is null &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// The other attribute&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;execution.getVariable("ANIMAL").getName() is "Tom"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tryied both; making Animal abstract and concrete.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rufini.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Oct 2011 20:57:11 GMT</pubDate>
    <dc:creator>rufini</dc:creator>
    <dc:date>2011-10-03T20:57:11Z</dc:date>
    <item>
      <title>DelegateExecution.setVariable loses inherited attributes</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/delegateexecution-setvariable-loses-inherited-attributes/m-p/44857#M24821</link>
      <description>Hi,I've an issue Using Activiti 5.6. If I set in the DelegateExecution an object wich extends of a superclass, I lost the inherited attributespublic class Animal{&amp;nbsp; private String color;&amp;nbsp; (getters&amp;amp;setters)}public class Cat extends Animal{&amp;nbsp;&amp;nbsp; private String name;&amp;nbsp; (getters&amp;amp;setters)}public class</description>
      <pubDate>Mon, 03 Oct 2011 20:57:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/delegateexecution-setvariable-loses-inherited-attributes/m-p/44857#M24821</guid>
      <dc:creator>rufini</dc:creator>
      <dc:date>2011-10-03T20:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: DelegateExecution.setVariable loses inherited attributes</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/delegateexecution-setvariable-loses-inherited-attributes/m-p/44858#M24822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The variables are serialized. Serialized objects are created differently than regular ones, not really an activiti-issue, more of an Java-general thing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Check this out: &lt;/SPAN&gt;&lt;A href="http://www.javapractices.com/topic/TopicAction.do?Id=70" rel="nofollow noopener noreferrer"&gt;http://www.javapractices.com/topic/TopicAction.do?Id=70&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2011 06:27:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/delegateexecution-setvariable-loses-inherited-attributes/m-p/44858#M24822</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2011-10-05T06:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: DelegateExecution.setVariable loses inherited attributes</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/delegateexecution-setvariable-loses-inherited-attributes/m-p/44859#M24823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It's true, Frederik!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Implementing Serializable on the superclass "Animal" fixed the issue (the subclass "Cat" was already implementing it)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rufini&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2011 13:11:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/delegateexecution-setvariable-loses-inherited-attributes/m-p/44859#M24823</guid>
      <dc:creator>rufini</dc:creator>
      <dc:date>2011-10-05T13:11:46Z</dc:date>
    </item>
  </channel>
</rss>

