English
Groovy Code Example
About 172 wordsLess than 1 minute
2026-01-09
/**
* Function executed after configuration package deployment
* @type classes
* @namespace environment_deploy
* @returntype
*/
class EnvDeployP4DZc implements EnvironmentDeployPlugin {
// This method is called during configuration package installation
@Override
EnvironmentDeploy.Result doInstall(EnvironmentDeploy.Arg arg, FunctionContext context) {
// Tenant ID being installed
log.info(arg.getTenantId())
// Configuration package ID being installed
log.info(arg.getConfigPackageId())
// Installation count of the configuration package
log.info(arg.getInstallCount())
// Configuration package version being installed
log.info(arg.getVersion())
// Version name of the configuration package being installed
log.info(arg.getVersionName())
// Company name that uploaded the configuration package
log.info(arg.getUploadEnterpriseName())
return new EnvironmentDeploy.Result(true)
}
// This method is called during configuration package upgrade
@Override
EnvironmentDeploy.Result doUpgrade(EnvironmentDeploy.Arg arg, FunctionContext context) {
// Tenant ID being installed
log.info(arg.getTenantId())
// Configuration package ID being installed
log.info(arg.getConfigPackageId())
// Installation count of the configuration package
log.info(arg.getInstallCount())
// Configuration package version being installed
log.info(arg.getVersion())
// Version name of the configuration package being installed
log.info(arg.getVersionName())
// Company name that uploaded the configuration package
log.info(arg.getUploadEnterpriseName())
return new EnvironmentDeploy.Result(true)
}
}