Thanks Bertram, that looks like it will hit the spot.I really need to spend some time reading up on all the different domain types :).
On Wed, Nov 5, 2008 at 4:30 PM, Bertram Ludaescher <[EMAIL PROTECTED]>wrote: > 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.. > > Bertram > > > On Tue, Nov 4, 2008 at 6:40 PM, Tristan King <[EMAIL PROTECTED]>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: [EMAIL PROTECTED] www: http://eresearch.jcu.edu.au >> > > -- Tristan King Research Officer, eResearch Centre James Cook University, Townsville Qld 4811 Australia Phone: +61747816902 E-mail: [EMAIL PROTECTED] www: http://eresearch.jcu.edu.au