[kepler-users] Problem with PN director
Vincenzo Forchi
vforchi at eso.org
Tue Jun 21 01:18:42 PDT 2011
Hi All,
I have a problem with the PN director on kepler 2.2. I have a simple workflow: string constant ->
file reader -> custom actor.
The string constant fires only once, but my acotr is triggered twice, and the second times it fails
because there is no token on the input port. I defined the token consumption rate for the input
port, I have overridden prefire to return true only if a token is present on the input port, but the
actor is still fired twice.
This is a snippet from my fire method:
System.out.println(myPort.hasToken(0));
String xml = ((StringToken) myPort.get(0)).stringValue();
This is the command line output, I caught the exception and printed the stack trace
[run] true
[run] ERROR (org.kepler.gui.MenuMapper:getActionFor:269) Exception trying to create an Action
for classname: <org.kepler.gui.RunWithFeedbackChkBoxAction>:
[run] java.lang.IllegalArgumentException: RunWithFeedbackChkBoxAction constructor could not
get actions for DEBUG->ANIMATE EXECUTION or DEBUG->STOP ANIMATING
(java.lang.reflect.InvocationTargetException)
[run] ERROR (org.kepler.gui.MenuMapper:getActionFor:269) Exception trying to create an Action
for classname: <org.kepler.gui.RunWithFeedbackChkBoxAction>:
[run] java.lang.IllegalArgumentException: RunWithFeedbackChkBoxAction constructor could not
get actions for DEBUG->ANIMATE EXECUTION or DEBUG->STOP ANIMATING
(java.lang.reflect.InvocationTargetException)
[run] ptolemy.actor.process.TerminateProcessException:
[run] at ptolemy.domains.pn.kernel.PNQueueReceiver.get(PNQueueReceiver.java:198)
[run] at ptolemy.actor.IOPort.get(IOPort.java:885)
[run] at MyClass.fire(MyClass.java:119)
[run] at ptolemy.actor.process.ProcessThread.run(ProcessThread.java:229)
The very same code works flawlessly with the DDF director: any ideas?
Thanks and cheers,
Vincenzo
--
Vincenzo Forchi European Southern Observatory
Karl-Schwarzschild-Strasse 2, D-85748 Garching bei Muenchen, Germany.
Email: vforchi at eso.org Tel: +49 89 32006136 Fax: +49 89 3202362
More information about the Kepler-users
mailing list