如何在 Hybris/SAP 商务云中运行环境特定的 impex?

问题描述 投票:0回答:1

我正在尝试专门运行impex环境。需要创建将在所有环境中运行的impex,否则我需要创建多个impex。请帮忙。

需要一个可以在所有环境中运行的单一 impex,并具有特定于环境的数据。

environment sap-commerce-cloud impex
1个回答
0
投票
#% impex.enableCodeExecution(true);

###########################################################
# Execute scripts based on the current environment setting
###########################################################

#% if: "ENV_ID".equals(Config.getParameter("environmentId"));

# ------------------------------
# Begin Environment-Specific ImpEx
# ------------------------------

# Place your environment-specific ImpEx commands here

# ------------------------------
# End Environment-Specific ImpEx
# ------------------------------

#% endif: 

说明:

此 ImpEx 结构利用条件执行。它检查environmentId属性的值,如果该值与“ENV_ID”匹配,则将执行所包含的ImpEx命令。通过将“ENV_ID”更改为所需的环境标识符并在结构中添加特定的 ImpEx 命令,您可以根据不同的环境定制脚本。

注意:确保在适当的属性文件或配置源中为每个环境正确设置environmentId属性。

© www.soinside.com 2019 - 2024. All rights reserved.