[kepler-dev] 1st and 2nd run of the same workflow give different outputs

Edward A. Lee eal at eecs.berkeley.edu
Fri Apr 16 17:00:51 PDT 2010


If there is an input value, PortParameter will use it.
However, the input value won't be available until after
the initialization phase since inputs aren't available
until after the initialization phase.

It should be possible to design a variant of PortParameter
that has an initialValue parameter and sets the associated
ParameterPort to have that value in the initialization phase.
To do this, it would need to implement Initializable and
override its setContainer() method to call addInitializable()
on the container.

It should be possible even to do this is a backward compatible
way, where the behavior would be exactly as today if no
initialValue is provided.

Any volunteers to do this?  It would be a nice programming
exercise.

Edward


On 4/16/10 2:53 PM, Gongjing Cao wrote:
> Edward, thanks for answering my question:)
>
> Is there any way that the PortParameter can accept the input value
> instead of using the initial value even in the 1st run of the workflow?
>
> Gongjing
>
> On Fri, Apr 16, 2010 at 2:23 PM, Edward A. Lee <eal at eecs.berkeley.edu
> <mailto:eal at eecs.berkeley.edu>> wrote:
>
>
>     This is how PortParameter works.
>
>     When an input arrives on the port during a run, its value
>     is stored in the corresponding parameter, overwriting the
>     previous value. Thus, by the end of the run, there is no
>     longer any record of the initial value.
>
>     It is arguable whether it should actually work this way,
>     but the fact is, this is how it works.
>
>     Edward
>
>
>
>     On 4/16/10 10:34 AM, Gongjing Cao wrote:
>
>         Hi,
>
>         I came to an interesting workflow when I try to use
>         PortParameter. It
>         generates different outputs at the 1st run and the 2nd (and
>         after) run.
>
>         Seems the PortParameter only take the default value in the 1st run,
>         instead of taking the value which is passed from the previous actor.
>
>         Does anybody know why? How can I let this workflow always give
>         the right
>         output as in 2nd run.
>
>         Thanks!
>
>         Gongjing
>
>
>
>         _______________________________________________
>         Kepler-dev mailing list
>         Kepler-dev at kepler-project.org <mailto:Kepler-dev at kepler-project.org>
>         http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eal.vcf
Type: text/x-vcard
Size: 351 bytes
Desc: not available
URL: <http://mercury.nceas.ucsb.edu/kepler/pipermail/kepler-dev/attachments/20100416/25dcc3d2/attachment-0001.vcf>


More information about the Kepler-dev mailing list