Handler - passOneRandomProduct

 

Description

Starts with a composite input product and randomly selects one of the constituent basic products for output. This juggler was designed primarily to support demonstrations from "canned" inputs.
 

Configuration Variables

None other than those that are common to all Jugglers.
 

Product

Product is null if there are no sources or if the sources don't contribute to a product.

If the input is a composite product (by merging all input sources) then one of the composite inner basic products will be selected at random. This guarantees that only a basic product will be delivered.

If there is only a basic product produced from the sources then that product is passed through untouched.
 

How it works

At each runtime it scans the aggregate product of its sources, counts the number of basic products, and passes along one of these basic products as its product chosen at random.

Revised: 4 May 1998