Kepler: Issueshttps://projects.ecoinformatics.org/ecoinfo/https://projects.ecoinformatics.org/ecoinfo/ecoinfo/favicon.ico?14691340362005-01-03T18:19:44ZEcoinformatics Redmine
Redmine Bug #1851 (Resolved): save atomic and composite actors in the new actor libraryhttps://projects.ecoinformatics.org/ecoinfo/issues/18512005-01-03T18:19:44ZWibke Sudholtwibke@oci.unizh.ch
<p>Cutted and pasted from email conversation:</p>
<p>On 03.01.2005 18:34, "Chad Berkley" <<a class="email" href="mailto:berkley@nceas.ucsb.edu">berkley@nceas.ucsb.edu</a>> wrote:</p>
<blockquote>
<p>Hi Shawn, Ilkay and Wibke,</p>
<p>This is probably our problem. There are several problems like this that <br />i've been finding as i've been working with our newly re-worked actor <br />library system. The best thing to do at this point is to enter a bug <br />and we can prioritize it and hopefully work on it at the kepler meeting <br />at the end of the month. I think there are several other bugs like this <br />so maybe we can fix them all at the same time.</p>
<p>chad</p>
<p>Shawn Bowers wrote:</p>
<blockquote>
<p>I'm not really sure what is causing your problem, but the actor library <br />uses the file basicKeplerActorLibrary.xml and not basicKeplerLibrary.xml.</p>
<p>This file is basically just wrapped by a <group> without any additional <br />"wrapper" (i.e., the UserLibrary stuff).</p>
<p>Shawn</p>
<p>Ilkay Altintas wrote:</p>
<blockquote>
<p>Hi Chad and Shawn,</p>
<p>Wibke had some problems with the cloning of the composite actors to <br />the actor library.<br />All the details are given below. I thought you guys would help her <br />better than me.</p>
<p>I tried the same thing that she is trying to do under the regular PTII <br />and it seems to work.<br />Please let me or her (cce'd) know if it is something we are missing or <br />unaware.</p>
<p>Wibke: The explanation below is great. Thanks so much for sending it.</p>
<p>Thanks everybody,<br />-ilkay</p>
<p>Begin forwarded message:</p>
<p>*From: *Wibke Sudholt <<a class="email" href="mailto:Wibke.Sudholt@web.de">Wibke.Sudholt@web.de</a>><br />*Date: *December 20, 2004 12:41:30 AM PST<br />*To: *Ilkay Altintas <<a class="email" href="mailto:altintas@sdsc.edu">altintas@sdsc.edu</a>><br />*Subject: Reuse of composite actors again
*<br />Hi Ilkay,</p>
<p>I think the problem with the reuse of composite actors is a problem<br />of the<br />new actor tree/ontology layout in Kepler.</p>
<p>According to the Ptolemy II documentation</p>
<p>(<a class="external" href="http://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIlatest/ptII4.0.1/doc/design/">http://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIlatest/ptII4.0.1/doc/design/</a></p>
<p>usingVergil/index.htm), things should basically work as described <br />in my<br />previous email. For example, the user library may look like this<br />(see also<br /><a class="external" href="http://ptolemy.eecs.berkeley.edu/~cxh/ptpub/addinganactor.htm">http://ptolemy.eecs.berkeley.edu/~cxh/ptpub/addinganactor.htm</a>):</p>
<p><entity name="UserLibrary" class="ptolemy.moml.EntityLibrary"><br /><configure><br /><group><br /><entity name="CompositeActor" class="myActors.CompositeActor"/><br /></group><br /></configure><br /></entity></p>
<p>So, the library is processed by ptolemy.moml.EntityLibrary via a<br />configure<br />group. This according to the documentation suppresses evaluation of<br />the MoML<br />commands as far as I understand. Thus when using<br />myActors.CompositeActor by<br />dragging & dropping onto the workspace, the MoML content under<br />entity is<br />used in the workflow exactly as it is put in the library.</p>
<p>In contrast, in Kepler the library basicKeplerLibrary.xml in the <br />Kepler<br />configs dir basically looks like this:</p>
<p><entity name="actor library" class="ptolemy.kernel.CompositeEntity"><br /><group><br />...<br /></group><br /></entity></p>
<p>In the middle (...) entities are imported via external files.<br />Differences<br />are that Kepler (1) uses the master class<br />ptolemy.kernel.CompositeEntity and<br />(2) directly implements the MoML entities, not via configure. As far<br />as I<br />understand, this does not suppress the evaluation of the MoML while<br />dragging<br />& dropping onto the workspace. In my case (see below) this leads <br />to the<br />source link being resolved and consequently the sub-entities of the<br />composite actor appearing two times in the workflow (one time via<br />the source<br />link copied and one time directly after resolving the link). This <br />might<br />perhaps explain the problems I observe when trying to include <br />composite<br />actor classes into the Kepler actor tree as described in my previous<br />email.</p>
<p>This is as far as I could find out up to now. I am of course not<br />really sure<br />if this is the reason for the problems or if I misunderstand<br />something here.<br />But I would be very happy if you could clarify this for me, since<br />you are<br />the much better Kepler expert than I am :-) and I am really stuck <br />here<br />currently ...</p>
<p>Thanks a lot,</p>
<p>Wibke</p>
<hr />
<p>Hi Ilkay,</p>
<p>I think I finally found a possibility to reuse/link composite actors.</p>
<p>One has to include something like the following into the xml file <br />which<br />describes the library for the actor tree:</p>
<p><entity class="resurgence.ClassTest" name="Class Test" <br />source="ptolemy/configs/kepler/resurgence/ClassTest.xml"><br /><property class="org.ecoinformatics.seek.util.NamedObjId" <br />name="entityId" value="urn:lsid:ecoinformatics.org:kepler.1302.1"/><br /></entity></p>
<p>The "source" attribute makes that the class MoML file (here<br />"ptolemy/configs/kepler/resurgence/ClassTest.xml") is reloaded each<br />time I<br />use a workflow which uses the entity.</p>
<p>To make changes in the classes work, one has to recompile<br />kepler-configs.jar, however.</p>
<p>Unfortunately, there are still problems with this setup. First of <br />all,<br />somehow a workflow generated on the workspace does not only get the<br />"entity" <br />entry from above, but also the contents of the ClassTest.xml file<br />included<br />(although it is still linked to this file, too, and the link works <br />e.g.<br />after changes and when looking inside a composite actor). Second,<br />whenever I<br />use ports and links etc. inside the class and not only just <br />entities, I<br />cannot dragg&dropp the actor to the workspace anymore and the<br />program hangs.<br />To me this actually looks like this might even be a bug in Ptolemy<br />or Kepler<br />...</p>
<p>Do you perhaps know how to solve this or could you forward this to a<br />person<br />who might know?</p>
<p>Thanks a lot,</p>
<p>Wibke</p>
</blockquote></blockquote></blockquote>