[kepler-dev] Adding a list property to a relation .....

jagan Jagan.Kommineni at infotech.monash.edu.au
Wed Apr 26 16:46:27 PDT 2006


Hi Edward,

It is good idea to put the list parameter into the Kepler library and 
drag over to the relation when ever is needed.

Could you mind to advise me how to proceed to add a property for the 
relation which is just rendered as wires between ports?


with regards,

Jagan Kommineni



Edward A. Lee wrote:

>
> I'm not sure I understand the objective here, but I would strongly
> discourage modifying TypedCompositeActor in this way.  At a minimum,
> you should subclass TypedCompositeActor and replace the instance
> of TypedCompositeActor in the kepler library with your subclass.
> But unless you want this parameter to appear in all relations,
> this is not a good idea either...
>
> One possibility would be to put the parameter itself in the kepler
> library and then drag and drop it onto a relation when you want it
> in the relation...  This will currently only work if the relation
> is visible as a diamond, but it could probably be made to work
> even for relations that are just rendered as wires between ports.
>
> Edward
>
> At 06:54 PM 4/25/2006, jagan wrote:
>
>> Hi Chad,
>>
>> I would like to add a list property to a relation. Currently I have 
>> modified
>> ptolemy II ( ptolemy.actor.TypedCompositeActor)
>>
>> The changes are as follows:
>> -----------------------------------------------------------------------
>>   public ComponentRelation newRelation(String name)
>>           throws NameDuplicationException {
>>       try {
>>           workspace().getWriteAccess();
>>
>>           TypedIORelation relation = new TypedIORelation(this, name);
>>
>>  StringParameter param = new StringParameter(relation, name);
>>     param.addChoice("Default");
>>     param.addChoice("webServiceStream");
>>     param.addChoice("webServiceFileCopy");
>>     param.addChoice("srbStream");
>>     param.addChoice("srbFileCopy");
>>     param.addChoice("gridFtpFileCopy");
>>
>>           return relation;
>>       } catch (IllegalActionException ex) {
>>           // This exception should not occur, so we throw a runtime
>>           // exception.
>>           throw new InternalErrorException(this, ex, null);
>>       } finally {
>>           workspace().doneWriting();
>>       }
>>   }
>> ------------------------------------------------------------------------
>>
>> with this change when I join two actors with a relation I can see a 
>> property attached with the relation same name as the relation.
>>
>> This makes a global change, I want this to happen only to specific 
>> relations or workflows.
>> --------------------------------------------------------------------------------------------------- 
>>
>>
>> In using Kepler with GriddLeS I need to put some configuration 
>> information which is obtained by parsing workflow definition file.
>>
>> So far I am doing this activity manually that means after storing the 
>> workflow definition,
>> I use seperate script to parse xml scipt and load data into the 
>> appropriate configuration file.
>>
>> I want to incorporate this into the workflow execution, ideally the 
>> director before starting griddles workflow
>> execution should need to update configuration file. I think in this 
>> case I need to make changes to Director or manager.
>> Alternatively I can put config actor and Composite Actor in the 
>> workflow with SDF director. The griddles
>> workflow actors inside the Composite Actor with either SDF or PN 
>> directors.
>>
>> In this senario the config actor needs name of the current workflow 
>> to parse current workflow definition.
>> Could you mind to tell me how to get the current name of the current 
>> workflow programmatically
>> (after saving the workflow definition)?
>>
>> Or is there any way I can get current workflow definition before 
>> storing into the file at runtime during the creation of workflow.
>>
>>
>> with regards,
>>
>> Jagan Kommineni
>>
>>
>>
>
> ------------
> Edward A. Lee
> Professor, Chair of the EE Division, Associate Chair of EECS
> 231 Cory Hall, UC Berkeley, Berkeley, CA 94720-1770
> phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
> eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal 




More information about the Kepler-dev mailing list