It might be worthwhile to explain the difference between a non-repetitive process with a repetitive trigger (such as Get Running Sum Sequence) and a repetitive process with a non-repetitive trigger (such as Calculate Running Sum Element).
A non repetitive process with repetitive trigger executes once regardless of the number of inputs passed to it's repetitive trigger(s) (if you think of a process as a function in other languages, with its triggers as function parameter, then a repetitive trigger can be though of as a parameter passing an array of unspecified size). This means that all non-repetitive elements in the process will execute once (in other words Data Structure will initialize once to 0).
A repetitive process will execute as many times as it's trigger receives input (and if the process has multiple triggers it will execute once for each combination of inputs).
So if Get Running Sum Sequence receives n inputs, it will still be executed once, first initializing the Data Structure and then executing the Calculate Running Sum Element sub-process nX1=n times (the X1 is due to the Control trigger which receives one input only).
I hope this clears up things a bit (rather than confuses) - either way you're welcome to enquire further.
I also recommend you make use of the trace (visual debugging) capabilities available in Tersus which should make it clearer when and how many times any element is executed.
Regards,
David
To use the full functionality of this web site, JavaScript needs to be turned on.
For best results, use the Firefox browser..
Copyright © 2003-2017 - Tersus Software Ltd., All rights reserved. Terms of Use License Graphic design by EmaraDesign