[kepler-dev] array to sequence question

Bertram Ludaescher ludaesch at ucdavis.edu
Tue Nov 4 22:30:58 PST 2008

Hi Tristan:

You can *uncheck* the "enforceArrayLength" parameter of the ArrayToSequence
actor (see attached snapshot).

Then you can generate a token *stream* t1, t2, ..., tn from a *single* array
token {t1, ..., tn}, without knowing the length n of the array.

Of course you won't be able to use SDF in this scenario, but DDF will serve
you fine: In the attached snapshot, note how 3 tokens 5,7,6 are created from
a single array token {5,7,6}.

In fact, what you need is a  "workflow pattern" that we've encountered quite
a bit ourselves. For example, consider an actor that executes a command "ls
-1". Often we want to execute a "job" on each generated output from "ls -1".

In a sense, by generating one token per "job", we can do a kind of
"iteration" over the original array...

hope this helps..


On Tue, Nov 4, 2008 at 6:40 PM, Tristan King <tristan.king at jcu.edu.au>wrote:

> Hi,
> I'm helping someone build a workflow and in it they have an arraytoken of
> strings which they wish to write to a file. Since none of the file writing
> actors can accept arrays (please correct me if i'm wrong), we had a look at
> the ArrayToSequence actor.
> this works fine, except for the constraint that the size of the array has
> to be specified, and since the size of our array is unknown, we cannot set
> it.
> Is it possible to change the behaviour of the ArrayToSequence actor to
> dynamically set the rate of token output based on the input to the actor?
> Modifying the fire method to set the arrayLength variable to the length of
> the received token seemed to work, but if the array was made larger the
> second firing of the actor would fail.
> So, is it possible to build an actor with our desired functionality, or
> does the nature of SDF scheduling prevent this (and please excuse my lack of
> knowledge on sdf theory :))
> I suggested we could write a file writing actor to manage arraytokens, but
> she want's to do some processing of each string before writing the data, so
> converting it to a sequence is a more convenient solution.
> Cheers,
> -Tristan
> --
> Tristan King
> Research Officer,
> eResearch Centre
> James Cook University, Townsville Qld 4811
> Australia
> Phone: +61747816902
> E-mail: tristan.king at jcu.edu.au www: http://eresearch.jcu.edu.au
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercury.nceas.ucsb.edu/ecoinformatics/pipermail/kepler-dev/attachments/20081104/bdf91712/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2008-11-04_2220-a2s.pdf
Type: application/pdf
Size: 145581 bytes
Desc: not available
URL: <http://mercury.nceas.ucsb.edu/ecoinformatics/pipermail/kepler-dev/attachments/20081104/bdf91712/attachment-0001.pdf>

More information about the Kepler-dev mailing list