in a Policy Xpress, how do I get (in the Data tab) a variable defined in the environment, via management console, i.e. in the Advanced settings -> Miscellaneous section?
This way, I don't have to modify the PX from test to production environment.
It's not available through any of the PX framework API's, so the only way to retrieve this value is through SQL query data element and use the IM object store as the data source. Here's an example query to retrieve the value for the OOTB ‘AuditViewTask' miscellaneous property. You could amend to fit your needs
SELECT ATTRIBUTE_VALUE FROM IM_ENVIRONMENT_JDBC_LD WHERE SECTION_NAME = 'misc' AND ATTRIBUTE_NAME = 'AuditViewTask'
Thanks very much Leela. I will follow your suggestion, but I think they should define a way to retrieve those values from the PXs.
I opened an idea on this subject some time ago
Policy Xpress and User Defined Properties
That SQL will work in vast majority of cases: but i have had issues where there is more than one environment in that installation with the same miscellaneous property name. In that case you can use:
SELECT ATTRIBUTE_VALUE FROM IM_ENVIRONMENT_JDBC_LD LD, IM_ENVIRONMENT_JDBC ENV WHERE SECTION_NAME = 'misc' and REF_ID = ENV.UNIQUE_NAME and FRIENDLYNAME = 'envname' and ATTRIBUTE_NAME = 'AuditViewTask'
where 'envname' is the name of the environment.
Thanks for the new query.
Let me add an example to this process using PX frame work.
IM Global Variables: How to minimize migration headaches with environmental factors in PX rules
I find this to be a very useful process for migrating from dev to QA to Prod.