[kepler-dev] [Bug 5146] modifying and saving the composite sinewave actor fails

bugzilla-daemon at ecoinformatics.org bugzilla-daemon at ecoinformatics.org
Thu Dec 16 17:13:10 PST 2010


http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5146

--- Comment #4 from Aaron <aschultz at nceas.ucsb.edu> 2010-12-16 17:13:10 PST ---
OK, some progress on this bug.  I've narrowed it down to being an issue with
the Sinewave actor being a class definition.  The proper way to deal with this
has not come to me yet but the facts are this:

After dragging sinewave to the canvas, and opening the actor in a new window
you can view the xml and see that it is a class definition that you are
editing:

<class name="Sinewave" extends="ptolemy.actor.TypedCompositeActor">
    <property name="_createdBy"   
         class="ptolemy.kernel.attributes.VersionAttribute" 
         value="8.1.devel">
    </property>
....
</class>

If you then edit and save it to an archive, extract the xml and view it you
will see that it gets saved as a CompositeClassEntity with a class attribute of
TypedCompositeActor along with a bunch of links at the bottom

<entity name="Sinewave" class="org.kepler.moml.CompositeClassEntity">
    <property name="entityId" 
        value="urn:lsid:kepler-project.org/ns/:513:243:2"
        class="org.kepler.moml.NamedObjId" />
    <property name="class" 
        value="ptolemy.actor.TypedCompositeActor"
        class="ptolemy.kernel.util.StringAttribute">
        <property name="id" value="null"
            class="ptolemy.kernel.util.StringAttribute" />
    </property>
....
    <link port="output" relation="relation3" />
    <link port="Ramp.output" relation="relation" />
    <link port="TrigFunction.input" relation="relation4" />
    <link port="TrigFunction.output" relation="relation3" />
    <link port="Const.output" relation="relation2" />
    <link port="AddSubtract.plus" relation="relation" />
    <link port="AddSubtract.plus" relation="relation2" />
    <link port="AddSubtract.output" relation="relation4" />
</entity>


Now if you change the ptolemy.actor.TypedCompositeActor to be
ptolemy.actor.lib.Sinewave and delete all the links at the bottom then
everything is hunky dory the next time you open the actor (don't forget to
clean your cache after replacing the kar).

So from here I will try to modify the ActorMetadata object (which is used when
saving CompositeEntities: see KARBuilder.handleInitiatorList()) to handle
InstantiableNamedObjects that are class definitions.  That should solve this
problem but may have side effects elsewhere.  If that doesn't work I will try
kludging the save system to recognize class definitions and handle it at a that
level.  Yet another way to possibly handle this is to recognize class
definitions when workflows are being opened in the KeplerGraphTableau.

to be continued...

-- 
Configure bugmail: http://bugzilla.ecoinformatics.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the Kepler-dev mailing list