Returns a deterministic pseudo-random number between 0 and 1. The value
is derived from the current execution counter, so it produces the
same result on every replay of the workflow at this execution point.
Use this instead of Math.random() inside workflow functions.
Math.random() is non-deterministic and would break replay correctness.
Returns a deterministic pseudo-random number between 0 and 1. The value is derived from the current execution counter, so it produces the same result on every replay of the workflow at this execution point.
Use this instead of
Math.random()inside workflow functions.Math.random()is non-deterministic and would break replay correctness.Examples