[kepler-dev] question about getting the Manager responsible for executing a workflow

Edward A. Lee eal at eecs.berkeley.edu
Wed Mar 28 13:18:07 PDT 2007

When I replied yesterday, I forgot that I had recently added
a capability to CompositeActor, where anything that implements Executable
can "piggyback" on the execution of the composite actor.  See the
addPiggyback(Executable) method of CompositeActor.  This is used,
for example, by SharedParameter to execute validate() when the top-level
container is preinitialized().


At 01:36 PM 3/27/2007, Karen L Schuchardt wrote:
>Hi all,
>I have a class that implements ExecutionListener.  My class also 
>implements AbstractSettableAttribute and is an object within a 
>workflow.  I would like it to get access to the Manager responsible for 
>executing the workflow so it can call addExecutionListener and take 
>action as events occur.
>In an earlier version of Kepler, I was able to "hack" the validate() 
>method of my class (subclass of AbstractSettableAttribtue) to add all 
>the listeners there.  However this method no longer seems to be called 
>at prerun time.  If I try to do it in the constructor of my object, the 
>Manager is null.  That is:
>CompositeActor topLevel = (CompositeActor)getContainer();
>System.out.println("CONT: " + topLevel);
>Manager manager = topLevel.getManager();
>System.out.println("MAN: " + manager);
>will result in null being printed for the manager.
>What is the proper way to get a hold of the Manager so that I can become 
>a listener before the workflow I'm part of  executes?  Or should I be 
>thinking of doing this in a different way?  Suggestions welcome.
>I tried to look at examples of other classes that call 
>addExecutionListener but these all seem to be applications that have 
>access to more information.
>Kepler-dev mailing list
>Kepler-dev at ecoinformatics.org

Edward A. Lee
Chair of EECS and Robert S. Pepper Distinguished Professor
231 Cory Hall, UC Berkeley, Berkeley, CA 94720-1770
phone: 510-642-0253, fax: 510-642-2845
eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal  

More information about the Kepler-dev mailing list