[kepler-dev] Re: Building a specialized composite actor (Ilkay Altintas)
Edward A. Lee
eal at eecs.berkeley.edu
Wed Oct 13 15:02:40 PDT 2004
At 01:03 PM 10/13/2004 -0700, Werner G. Krebs wrote:
>Since we want to present this to scientists (who would be allowed to
>reconfigure other parts of the workflow, but not the composite actor) we
>need to make this composite actor "write-protected." The scientist would
>be allowed to change parameters of actors in this special composite actor,
>but not delete any of the sub-actors, or change the way they are connected
>(since the underlying legacy software that will actually be executing this
>workflow does not support these other configurations or the XML files they
>might produce, breaking the work-flow.) Unlocking the actor would bring up
>a warning dialog that this is for experts and that any changes to the
>composite actor might break legacy software elsewhere in the system. This
>is fairly user-friendly solution, in that it allows scientists to use the
>full power of Kepler for the monitoring parts of the system, but prevents
>them from (accidentally) modifying the special composite actor
>representing the workflow implemented in legacy software.
One simple way to (mostly) accomplish this with no change to the source
code is to define the composite actor as an actor-oriented class,
and then create a subclass and offer to the scientists instances
of this subclass. If they look inside the composite, they will
the actors outlined in a pink dashed line, and any attempt to
remove actors or connections will trigger an exception.
They are allowed, however, to add actors, change parameter values,
add annotations, and, under certain circumstances, add connections.
If you find the "What's new in Version 4.0" page (accessible from
the quick tour), there is a demo (NoisySinewave) labeled
"Hierarchical classes, subclasses, and inner classes."
This illustrates this approach. Look inside the InstanceOfNoisySinewave
and try to make changes to it...
Edward A. Lee, Professor
518 Cory Hall, UC Berkeley, Berkeley, CA 94720
phone: 510-642-0455, fax: 510-642-2739
eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal
More information about the Kepler-dev