[kepler-dev] Help on the "Is Present" actor
jing
tao at nceas.ucsb.edu
Fri Mar 4 11:19:08 PST 2011
Hi, devs:
I am trying to develop a workflow which will use Database Query actor.
I choose "array" as the input type of the Database Query actor. So the
actor will output an array if it can get a result after running the
given query. But it will output nothing (no token will be sent, i guess)
if it can NOT get a result after running the given query.
I try to differential these two scenarios. I think "Is Present" actor
will be a good one. So I added the "Is Present" actor just after the
Database Query actor and a Display actor to print out the result of the
"Is Present" actor.
I did two tests:
1. Sent a query which results the Database Query actor getting
something. Then the Display showed "true" value. Things looked good.
2. Sent a query which results the Database Query actor getting nothing.
Then nothing happened after finishing the execution. The Display wasn't
opened at all. It seems the 'false" token from the "Is Present" actor
wasn't sent to the Display.
I looked the documentation of the "Is Present" and it says:
The IsPresent actor outputs "true" or "false" depending on whether it
has received a data token or not.
This is exact what i want. I want it to output false when the actor
doesn't receive a token from the Database Query actor. But it didn't.
Did I miss anything?
Any suggestion and comment will be highly appreciated. By the way, I am
using the PN director.
Thank you very much!
Regards,
Jing
More information about the Kepler-dev
mailing list