Alvin, <div><br></div><div>One simple way to get your desired results is to use the PN director. You'll need to control the number of firings by setting the firingCountLimit in your constant (array) actor.</div><div>I've attached an example.</div>
<div><br></div><div>Good luck!</div><div><br></div><div>Jon <br><br><div class="gmail_quote">On Wed, Nov 14, 2012 at 7:11 PM,  <span dir="ltr"><<a href="mailto:kepler-users-request@kepler-project.org" target="_blank">kepler-users-request@kepler-project.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send Kepler-users mailing list submissions to<br>
        <a href="mailto:kepler-users@kepler-project.org">kepler-users@kepler-project.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users" target="_blank">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:kepler-users-request@kepler-project.org">kepler-users-request@kepler-project.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:kepler-users-owner@kepler-project.org">kepler-users-owner@kepler-project.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Kepler-users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1.  ArrayToSequence Actor (Alvin Sebastian)<br>
   2. Re:  ArrayToSequence Actor (Edward A. Lee)<br>
   3. Re:  ArrayToSequence Actor (Sean Riddle)<br>
   4. Re:  ArrayToSequence Actor (Alvin Sebastian)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Thu, 15 Nov 2012 09:23:10 +1000<br>
From: Alvin Sebastian <<a href="mailto:a.sebastian@qut.edu.au">a.sebastian@qut.edu.au</a>><br>
To: "<a href="mailto:kepler-users@kepler-project.org">kepler-users@kepler-project.org</a>"<br>
        <<a href="mailto:kepler-users@kepler-project.org">kepler-users@kepler-project.org</a>><br>
Subject: [kepler-users] ArrayToSequence Actor<br>
Message-ID:<br>
        <<a href="mailto:60495E34E2CF58448A44DE567C6FAF24492A298084@QUTEXMBX03.qut.edu.au">60495E34E2CF58448A44DE567C6FAF24492A298084@QUTEXMBX03.qut.edu.au</a>><br>
Content-Type: text/plain; charset="us-ascii"<br>
<br>
Hi All,<br>
<br>
I am a new Kepler user who somehow stuck at how to do a specific thing in Kepler.<br>
I am using a SDF director to run a simple sequential workflow only once. However, in the middle of the workflow, there would be an actor that outputs an array with arbitrary length. I want to process each element of the array using another actor all in the same iteration, and it seems the easiest way to do that is by using the ArrayToSequence actor. However, the actor requires arrayLength parameter to be set prior to running the workflow. Is there a way to make the arrayLength parameter dynamic and automatically set to the length of the array received by the input port?<br>

<br>
Regards,<br>
<br>
Alvin<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20121115/fc574277/attachment-0001.html" target="_blank">http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20121115/fc574277/attachment-0001.html</a>><br>

<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Wed, 14 Nov 2012 15:26:10 -0800<br>
From: "Edward A. Lee" <<a href="mailto:eal@eecs.berkeley.edu">eal@eecs.berkeley.edu</a>><br>
To: Alvin Sebastian <<a href="mailto:a.sebastian@qut.edu.au">a.sebastian@qut.edu.au</a>><br>
Cc: "<a href="mailto:kepler-users@kepler-project.org">kepler-users@kepler-project.org</a>"<br>
        <<a href="mailto:kepler-users@kepler-project.org">kepler-users@kepler-project.org</a>><br>
Subject: Re: [kepler-users] ArrayToSequence Actor<br>
Message-ID: <<a href="mailto:50A42892.5000507@eecs.berkeley.edu">50A42892.5000507@eecs.berkeley.edu</a>><br>
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"<br>
<br>
<br>
You could use IterateOverArray.<br>
<br>
Edward<br>
<br>
<br>
On 11/14/12 3:23 PM, Alvin Sebastian wrote:<br>
> Hi All,<br>
><br>
> I am a new Kepler user who somehow stuck at how to do a specific thing<br>
> in Kepler.<br>
><br>
> I am using a SDF director to run a simple sequential workflow only once.<br>
> However, in the middle of the workflow, there would be an actor that<br>
> outputs an array with arbitrary length. I want to process each element<br>
> of the array using another actor all in the same iteration, and it seems<br>
> the easiest way to do that is by using the ArrayToSequence actor.<br>
> However, the actor requires arrayLength parameter to be set prior to<br>
> running the workflow. Is there a way to make the arrayLength parameter<br>
> dynamic and automatically set to the length of the array received by the<br>
> input port?<br>
><br>
> Regards,<br>
><br>
> Alvin<br>
><br>
><br>
><br>
> _______________________________________________<br>
> Kepler-users mailing list<br>
> <a href="mailto:Kepler-users@kepler-project.org">Kepler-users@kepler-project.org</a><br>
> <a href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users" target="_blank">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users</a><br>
><br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: eal.vcf<br>
Type: text/x-vcard<br>
Size: 330 bytes<br>
Desc: not available<br>
URL: <<a href="http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20121114/8f6ab9de/attachment-0001.vcf" target="_blank">http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20121114/8f6ab9de/attachment-0001.vcf</a>><br>

<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Wed, 14 Nov 2012 15:32:00 -0800<br>
From: Sean Riddle <<a href="mailto:swriddle@gmail.com">swriddle@gmail.com</a>><br>
To: Alvin Sebastian <<a href="mailto:a.sebastian@qut.edu.au">a.sebastian@qut.edu.au</a>><br>
Cc: "<a href="mailto:kepler-users@kepler-project.org">kepler-users@kepler-project.org</a>"<br>
        <<a href="mailto:kepler-users@kepler-project.org">kepler-users@kepler-project.org</a>><br>
Subject: Re: [kepler-users] ArrayToSequence Actor<br>
Message-ID:<br>
        <CAAjdownfKV5X=<a href="mailto:OEvNnJvDZzZDRnyWT2NtntAjEeRpiN0-p5UYQ@mail.gmail.com">OEvNnJvDZzZDRnyWT2NtntAjEeRpiN0-p5UYQ@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
If the boolean parameter "enforceArrayLength" is set to false, the<br>
arrayLength parameter will have no effect, and it will work dynamically as<br>
you would expect. This does violate the contract implicit in SDF, though,<br>
that each actor has a constant token production and consumption rate. If<br>
the actor is only invoked once, though, I doubt that will be a problem.<br>
<br>
- Sean<br>
<br>
On Wed, Nov 14, 2012 at 3:23 PM, Alvin Sebastian <<a href="mailto:a.sebastian@qut.edu.au">a.sebastian@qut.edu.au</a>>wrote:<br>
<br>
> Hi All,****<br>
><br>
> ** **<br>
><br>
> I am a new Kepler user who somehow stuck at how to do a specific thing in<br>
> Kepler.****<br>
><br>
> I am using a SDF director to run a simple sequential workflow only once.<br>
> However, in the middle of the workflow, there would be an actor that<br>
> outputs an array with arbitrary length. I want to process each element of<br>
> the array using another actor all in the same iteration, and it seems the<br>
> easiest way to do that is by using the ArrayToSequence actor. However, the<br>
> actor requires arrayLength parameter to be set prior to running the<br>
> workflow. Is there a way to make the arrayLength parameter dynamic and<br>
> automatically set to the length of the array received by the input port? *<br>
> ***<br>
><br>
> ** **<br>
><br>
> Regards,****<br>
><br>
> ** **<br>
><br>
> Alvin****<br>
><br>
> _______________________________________________<br>
> Kepler-users mailing list<br>
> <a href="mailto:Kepler-users@kepler-project.org">Kepler-users@kepler-project.org</a><br>
> <a href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users" target="_blank">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users</a><br>
><br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20121114/eada377f/attachment-0001.html" target="_blank">http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20121114/eada377f/attachment-0001.html</a>><br>

<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Thu, 15 Nov 2012 10:11:03 +1000<br>
From: Alvin Sebastian <<a href="mailto:a.sebastian@qut.edu.au">a.sebastian@qut.edu.au</a>><br>
To: "<a href="mailto:kepler-users@kepler-project.org">kepler-users@kepler-project.org</a>"<br>
        <<a href="mailto:kepler-users@kepler-project.org">kepler-users@kepler-project.org</a>><br>
Subject: Re: [kepler-users] ArrayToSequence Actor<br>
Message-ID:<br>
        <<a href="mailto:60495E34E2CF58448A44DE567C6FAF24492A29809A@QUTEXMBX03.qut.edu.au">60495E34E2CF58448A44DE567C6FAF24492A29809A@QUTEXMBX03.qut.edu.au</a>><br>
Content-Type: text/plain; charset="us-ascii"<br>
<br>
Thanks for all the responses.<br>
<br>
I have looked into IterateOverArray, but the documentation is not very clear and I have no idea at all of how to use it. It has no input nor output ports by default.<br>
<br>
Setting "enforceArrayLength" to false while using SDF does not work at all. With DDF, it works but it also keeps iterating indefinitely. How do I create a workflow where an actor can consume any number of input token dynamically without keep repeating?<br>

<br>
As a simple example using SDF director (iterations set to 1), I have a constant actor with value {1,2,3}. I connect the output port of that actor to the input port of ArrayToSequence, and then connect a Display actor to it. What I want is an output of:<br>

1<br>
2<br>
3<br>
whenever I click the run button once.<br>
This would be very easy if I set the value of arrayLength to 3, but is there any other way to achieve the same result without having to know the length of the input array before running the workflow?<br>
<br>
<br>
Alvin<br>
<br>
<br>
<br>
From: Sean Riddle [mailto:<a href="mailto:swriddle@gmail.com">swriddle@gmail.com</a>]<br>
Sent: Thursday, 15 November 2012 9:32 AM<br>
To: Alvin Sebastian<br>
Cc: <a href="mailto:kepler-users@kepler-project.org">kepler-users@kepler-project.org</a><br>
Subject: Re: [kepler-users] ArrayToSequence Actor<br>
<br>
If the boolean parameter "enforceArrayLength" is set to false, the arrayLength parameter will have no effect, and it will work dynamically as you would expect. This does violate the contract implicit in SDF, though, that each actor has a constant token production and consumption rate. If the actor is only invoked once, though, I doubt that will be a problem.<br>

<br>
- Sean<br>
On Wed, Nov 14, 2012 at 3:23 PM, Alvin Sebastian <<a href="mailto:a.sebastian@qut.edu.au">a.sebastian@qut.edu.au</a><mailto:<a href="mailto:a.sebastian@qut.edu.au">a.sebastian@qut.edu.au</a>>> wrote:<br>
Hi All,<br>
<br>
I am a new Kepler user who somehow stuck at how to do a specific thing in Kepler.<br>
I am using a SDF director to run a simple sequential workflow only once. However, in the middle of the workflow, there would be an actor that outputs an array with arbitrary length. I want to process each element of the array using another actor all in the same iteration, and it seems the easiest way to do that is by using the ArrayToSequence actor. However, the actor requires arrayLength parameter to be set prior to running the workflow. Is there a way to make the arrayLength parameter dynamic and automatically set to the length of the array received by the input port?<br>

<br>
Regards,<br>
<br>
Alvin<br>
<br>
_______________________________________________<br>
Kepler-users mailing list<br>
<a href="mailto:Kepler-users@kepler-project.org">Kepler-users@kepler-project.org</a><mailto:<a href="mailto:Kepler-users@kepler-project.org">Kepler-users@kepler-project.org</a>><br>
<a href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users" target="_blank">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users</a><br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20121115/1b4e2552/attachment.html" target="_blank">http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20121115/1b4e2552/attachment.html</a>><br>

<br>
------------------------------<br>
<br>
_______________________________________________<br>
Kepler-users mailing list<br>
<a href="mailto:Kepler-users@kepler-project.org">Kepler-users@kepler-project.org</a><br>
<a href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users" target="_blank">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users</a><br>
<br>
<br>
End of Kepler-users Digest, Vol 90, Issue 10<br>
********************************************<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>---------------------------------<br>Jonathan Boright<br>Research Scientist<br>ISciences, LLC<br>61 Main Street, Suite 200<br>Burlington, VT 05401<br>802 864-2999<br>
<a href="mailto:boright@isciences.com" target="_blank">boright@isciences.com</a><br><a href="http://www.isciences.com" target="_blank">http://www.isciences.com</a><br><a href="http://www.terraviva.net" target="_blank">http://www.terraviva.net</a><br>

</div>