2 Replies Latest reply on Feb 25, 2010 3:52 AM by Flavio N.

    Update properties or fields in custom node

    Flavio N. Newbie

      I have a problem with custom nodes.

      I have a custom node which call execute method of MyClass (MyClass extends ActivityBehaviour).

      I need to set a property of the class to use inside the method:

       

      <custom class="sample.MyClass" name="MyClassNode">
        <property name="myObject">
           <object expr="#{my-object}" />
        </property>
       </custom>
      

       

      It appers the property is set correctly to my-object variable only the first time I run the process; following times the old (first) object is used; I test it and it never call again the property setter.

      No difference using field instead of property: only the first time the value is set.

       

      Is there any method to tell to the process to set field or property values EACH TIME the node is executed?

      Obviously I can refer to the variable inside the method, but I need to call my class in different point of the process using different value of myObject and I can't have the name of the variabile hard-coded.

       

      Thanx in advance