The RangeGen Generator produces an increasing value from startRange to endRange or to long.MAX_VALUE when the end range is not specified. Once the endRange has been reached, the value is reset to the startRange.
The following parameters may be configured for the RangeGen Generator. Items with an asterisk* are required.
- startRange* - Defines the initial starting value for the number generator.
- endRange - Defines the maximum value that may be generated before starting from the start range again. If the endRange value is not specified, it is set to long.MAX_VALUE.
- jumpAmount* - Defines the amount to add to the currently generated value.
- waitAmount* - Defines the number of iterations the Generator should wait before incrementing jumpAmount.
- iterate - Based on the Boolean value, determines when to generate next value. If the value is true, it generates next value. If the value is false, it just waits.
- sortOrder* - Determines the order in which the number will be generated. The choices are:
Example 1: Using the Iterate Parameter to Decide when to Increment Next Value
You can use iterate Generator Parameter to decide when to iterate to next value. Any other Generator that generates a True/false value in a pattern can be used. The Attribute using the Generator or a Linked Generator can then be referenced in the iterate Generator Parameter.
In this example, the BooleanValueGen Generator has been linked and then referenced within the iterate Generator Parameter. It will generate a random true/false value, which will be used to determine when the startRange value will be incremented by 1.
BooleanValueGen Generator Configuration:
Each time "True" is generated, the value is incremented by 1.
Example 2: Incrementing Each Generated Value by 5
In this example, the startRange has been set to 0 and will be incremented by 5 each time a value is generated. The endRange parameter has been set to 100. This means that the value will reset to 0 once 100 is reached.
Example 3: Wait 3 Iterations Before Incrementing the Value by 5
The waitAmount Parameter can be used to set the number of iterations to occur before the value is updated by the jumpAmount Parameter. In this example, three iterations will pass before the value is updated by 5.