[kepler-dev] Actor Ports and Parameters

Dan Higgins higgins at nceas.ucsb.edu
Tue Apr 11 11:27:41 PDT 2006

Hi All,

    In a recent discussion with Matt about some of the Niche Model/GARP 
workflows, Matt made the following request

"try to change parameters to ports where possible so that the
       component more accurately describes its data input requirements"

First, I would like to disagree with idea that ports should always be 
used for passing data to an actor. Using parameters is often better, 
especially for variables that do not change during the workflow. Using 
parameters can greatly simplify the required connections in a workflow, 
making it easier to understand. (Also, Edward has a new attribute in PT 
that displays parameters outside the actor if you really need to see them.)

In some cases, however, you may want to pass a parameter to an actor 
through a port, but the actor does not happen to have an input port for 
all the parameters it uses! So I was thinking that I needed to rewrite 
the java to add a port, until I remember the 'PortParameter'. You can 
wrap a Composite around any actor, add a PortParameter to that 
Composite, give it a name (and a default value), and put a Director 
inside the Composite. You can then use the PortParameter name inside the 
actor to configure the Parameter. The PortParameter value will be passed 
to the actor, and from the outside of the Composite you have have an 
actor with a new port! (See 
$Kepler/workflows/test/PortParameter_Example.xml). So you can 
effectively add ports for internal parameters without rewriting any Java 


Dan Higgins                                  higgins at nceas.ucsb.edu
http://www.nceas.ucsb.edu/    Ph: 805-893-5127
National Center for Ecological Analysis and Synthesis (NCEAS) Marine Science Building - Room 3405
Santa Barbara, CA 93195

More information about the Kepler-dev mailing list