The Pipeline Dictionary
The Pipeline Dictionary transports data in the pipeline flow and keeps track of all parameters and values processed by the pipeline. You pass values to the Pipeline Dictionary via explicitly naming them in the pipelet or by calling them in a script.
The Pipeline Dictionary is created and initialized when a pipeline execution begins. Its scope is the duration of the pipeline execution. Its structure is a hash table of key/value pairs. Pipelets have read/write access, while templates have read access.
The default keys are:
- CurrentSession
- CurrentRequest
- CurrentHttpParameterMap
- CurrentForms
- CurrentCustomer
- CurrentPageMetadata
Example
This example uses the Cartridge Explorer view to see the Pipeline Dictionary entries for the Cart pipeline. The pipeline gets a product added to the cart via the GetProduct pipelet. This involves a call to the Pipeline Dictionary to obtain the product name and ID.
The first Pipeline Dictionary entry is dict(Product), which outputs Product. Click dict(Product) in Cartridge Explorer to see the following in the Properties tab.
The second Pipeline Dictionary entry is for ProductID, which inputs from the Pipeline Dictionary CurrentHttpParameterMap.pid.stringValue. This is the product ID in the URL.