Available from version 16.0
This guide shows how to enable the Data Source (DMDS) or other sources to be used as a selectable Source in the Pricefx Agents (specifically Datamart Watchers) when explicitly enabled via Groovy, without changing behavior for the Analytics charts or other accelerators. By default, the Data Source is not available as a Source in the Pricefx Agents.
Procedure
-
Log in to the Pricefx application.
-
Go to Administration > Logics > Groovy Library.
-
Select the
ActIn_Library. -
Select the
ScopeDataUtilselement. -
In the Code Editor, locate the logic responsible for building the Data Scope input.
Groovyreturn api.inputBuilderFactory() .createDmQueryBuilder(scopeDataDefinitionManager.SCOPE_DATA_ENTRY_NAME) .setNoRefresh(true) .setValue(scopeDataDefinitionManager.getScopeData()) .buildContextParameter() -
Add the
.withSeriesSourceTypes()method into existing code.Groovyreturn api.inputBuilderFactory() .createDmQueryBuilder(scopeDataDefinitionManager.SCOPE_DATA_ENTRY_NAME) .setNoRefresh(true) .setValue(scopeDataDefinitionManager.getScopeData()) .withSeriesSourceTypes('DMDS','DM','DMM','DMR','DMT','MO') .buildContextParameter() -
Click Save and Close.
-
To verify the change, navigate to Pricefx Agents > Agents and select an agent. In the Definition step, under the Data Scope section, you can now select a Data Source from the dropdown menu.
Method Options
-
DM– Datamart -
DMM– DM Model (legacy Price Optimizer) -
DMDS– Data Source -
DMR– Rollup -
DMT– Model Object Table -
MO– Model Object
After implementing this code change the Data Source will be available to you as a selectable Source in the Definition Step of your Agent.
If this method is not used, the following sources are available by default:
-
DM– Datamart -
DMM– DM Model (legacy Price Optimizer) -
DMR– Rollup -
DMT– Model Object Table -
MO– Model Object
Backward Compatible Procedure
setConfigParameter method to ensure the logic does not break when running on Pricefx versions older than 16.0.
-
Log in to the Pricefx application.
-
Go to Administration > Logics > Groovy Library.
-
Select the
ActIn_Library. -
Select the
ScopeDataUtilselement. -
In the Code Editor, locate the logic responsible for building the Data Scope input.
-
Define the allowed sources using one of the following methods based on your version requirements:
Groovydef cp = api.inputBuilderFactory() .createDmQueryBuilder('queryInput').buildContextParameter() cp.setConfigParameter("allowedSeriesSources", ["DM", "DMDS", "DMR", "DMT"]) return cpAlternatively, using the input builder:
Groovydef inputBuilder = api.inputBuilderFactory().createDmQueryBuilder('queryInput') inputBuilder.cp.setConfigParameter("allowedSeriesSources", ["DM", "DMDS", "DMR", "DMT"]) return inputBuilder.buildContextParameter() -
Click Save and Close.
-
To verify the change, navigate to Pricefx Agents > Agents and select an agent. In the Definition step, under the Data Scope section, you can now select a Data Source from the dropdown menu.
See Also