This feature was removed in Pricefx Studio 8.1. |
Formula elements are executed by a simplified formula engine in Pricefx Studio, similarly to the one running on the Pricefx backend server. The local calculation engine mimics the server one and it executes the elements sequentially as ordinary Groovy scripts and the idea is that each of the Pricefx Groovy API is implemented as a separate stateless call of the backend server.
|
For the project in IDEA you need to:
Here are some tips for useful watches available from the element Groovy script:
api.ctx.orderedResultElements
– Shows all elements results.api.ctx
.resultElements.get("<SOME_ELEMENT_NAME>").elementResult
– Shows the result value of any element from your logic.api.ctx
.resultElements.get("<SOME_ELEMENT_NAME>")
– Shows details (such as api.traces, warnings etc.) of a certain element from your logic.api.local
– Shows content of the api.local
map.api.global
– Shows content of the api.global
map.Analogically, some of the watches are available in debug.groovy as:
engine.ctx.orderedResultElements
engine.ctx.resultElements.get("<SOME_ELEMENT_NAME>").elementResult
engine.ctx.resultElements.get("<SOME_ELEMENT_NAME>")
You can also evaluate some API methods online e.g. vLookup()
or api.find()
:
api.getElement()
api.targetDate()
api.product(), api.productExtension(), api.productCompetition(), api.productXRef()
api.currentItem()
api.global
, api.local maps, api.
getGlobal(), api.
putGlobal()
api.find()
, api.count
()api.vLookup()
api.trace()
api.input(),
api.userEntry(), api.stringUserEntry(), api.
integerUserEntry(), api.
decimalUserEntry(),
api.
booleanUserEntry(), api.
dateUserEntry(), api.
timeUserEntry(), api.
dateTimeUserEntry(), api.option()
api.newMatrix() (except transpose() method)
api.criticalAlert(), api.redAlert(), api.yellowAlert()
api.jsonEncode, api.jsonDecode(), api.jsonDecodeList()
api.isSyntaxCheck()
– always returns false
api.isDebugMode()
– returns true
api.isDistributedMode()
– always returns false
api.getId()
api.calendar()
api.random(), api.uuid()
api.getMaxFindResultsLimit()
api.formatNumber()
api.abortCalculation()
api.getTimeZone()
api.filter
,
api.filterFromMap()
api.user(), api.roles(),
api.isUserInGroup()
api.log(), api.logWarn(), api.logInfo()
api.pricelist()
api.pricelistItem()
api.getPricelistItem()
api.customer()
api.otherProduct()
api.productCompetition()
api.productXRef()
api.otherCustomer()
api.getCalculableLineItemCollection()
api.bom()
api.bomList()
api.findLookupTableValues()
api.getBoundPartitionNames()
api.contextByLabel()
api.findDataLoad()
api.findRebateRecordLoad()
api.attributedResult()
api.httpCall()
api.
boundCall()
api.
add()
api.
addOrUpdate()
api.
update()
api.
delete()
api.
sendEmail()
api.
createNewRevision()