This feature is released in version 17.0 as a beta feature and issues might be expected. If you want to use it, please contact Pricefx Support first.
You can configure each Quote Type to control whether Quote calculation uses the persisted calculation processor.
This setting makes it possible to enable persisted calculation only for Quote Types that need it, instead of applying the same behavior to all Quote Types in the partition.
Why Use This Setting
The persisted calculation processor is intended for very large Quotes. It avoids loading the entire Quote with all line items into memory and calculates the Quote in batches instead.
This helps you optimize performance for large Quotes while keeping the standard behavior for smaller or less demanding Quotes.
Behavior
The processor used during Quote calculation depends on the value of the Quote Type setting:
|
Setting value |
Behavior |
|---|---|
|
|
The system uses |
|
|
The system uses the current calculation processor. |
|
not set |
The system uses the current calculation processor. |
Different Quote Types in the same partition can use different processors.
Note: When usePersistedProcessor is enabled, quoteProcessor.getQuoteView().lineItems does not contain line items, because the persisted processor does not load the entire Quote with all line items into memory. Access line items using the persisted-processing-compatible approach instead.
For internal testing, an iterator-based helper API exists for batch access to line items, for example quoteProcessor.getHelper().getLineItemsIterator(...), but this API is currently experimental and should not yet be treated as stable public Groovy API. Example code:
import com.googlecode.genericdao.search.Filter
quoteProcessor.getHelper().getLineItemsIterator().withCloseable { items ->
items.each { item ->
// your code
}
}
quoteProcessor.getHelper().getLineItemsIterator(
Filter.equal("sku", "sku1")
).withCloseable { items ->
items.each { item ->
// your code
}
}
Configuration
Add the following parameter to the Quote Type configuration:
{
"parameters": {
"recalculations": {
"usePersistedProcessor": true
}
}
}
Parameter Reference
|
Parameter |
Type |
Description |
|---|---|---|
|
|
Boolean |
Controls whether Quotes based on the Quote Type use the persisted calculation processor. |
Note: This replaces the former dependency on the global usePersistedQuoteCalculation advanced configuration option.