[kepler-users] [kepler-dev] stopping workflow,
Tristan King
tristan.king at jcu.edu.au
Tue Jan 1 16:27:53 PST 2008
You may need to modify your first actor to have another output port,
which outputs "true" if the End of File has been reached, and "false" if
it has not. this can then be put through a Boolean Switch, which can
then send a token to the "Stop" actor.
I've attached a workflow that performs a similar task to what you're
trying to do.
Your only other option is to make sure actor1 reads in the entire file
before sending the data to actor2.
Hope this helps
-Tristan
On Thu, 2007-12-27 at 13:40 +0200, [BE] Ufuk Utku Turuncoglu wrote:
> hi,
>
> i try to construct simple workflow which has two custom actor. the first
> one reads data (actor1) and send to other one (actor2) to create an
> file. so, actor1 sends data in each time step sperately. The problem is,
> when i use the sdf actor with iterations parameter as 0, the workflow is
> not stop and do same work again and again. if i try to set iteration
> parameter as 1, the actor1 only reads first time step data and stops.
> so, i need to get some suggestions. how can i stop workflow when the
> actor1 complates its work (reads all time step data)? is it neccecary to
> trigger stop actor from actor2 after finishing their job? i think, i
> check the port using hasToken method in actor2 and if it has not any
> token i could send a trigger message to stop actor. The part of the code
> for each actor as follows,
>
> actor1 sends data as,
>
> for (int i=0; i <data.lenght(); i++) {
> variable.send(0, new ObjectToken(ncf));
> }
>
> actor2 gets data as,
>
> if (data.hasToken(0)) {
> ObjectToken obj = (ObjectToken) data.get();
> }
>
> Any suggestion will be helpful,
>
> happy christmas
>
> --ufuk
> _______________________________________________
> Kepler-dev mailing list
> Kepler-dev at ecoinformatics.org
> http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: binary-file-copy.xml
Type: application/xml
Size: 35419 bytes
Desc: not available
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20080102/ef39d3b3/attachment.xml>
More information about the Kepler-users
mailing list