[kepler-users] Problem with PN director

Edward A. Lee eal at eecs.berkeley.edu
Tue Jun 21 07:53:56 PDT 2011


Something's fishy here.
Such a model should work fine in PN.
Note that hasToken() _alaways_ returns true in PN.
The get() method blocks when there is no input.

Looks like something is terminating the threads
using a TerminateProcessException. How is your model
supposed to be stopped?

Edward


On 6/21/11 1:18 AM, Vincenzo Forchi wrote:
> 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
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eal.vcf
Type: text/x-vcard
Size: 330 bytes
Desc: not available
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20110621/f546a9b2/attachment.vcf>


More information about the Kepler-users mailing list