Solved! Go to Solution.
Views
Replies
Total Likes
You may refer to the community blog: https://medium.com/slalom-technology/how-to-use-environment-variables-in-adobe-experience-manager-ae... how you can set environment variable using CM API and use in OSGI config.
Thanks
Wasil
A config.preview OSGi configuration folder cannot be declared the same way a config.publish can be declared folder. Instead, the preview tier inherits its OSGi configuration from the publish tier’s values. Check the section "Author versus Publish Configuration" on OSGI Configuration documentation
HTH
Thanks,
Wasil
@avvidya931 - Check the AEM Run Mode to determine its author/publish...
Preview is custom made run mode on top of publish server.
http://localhost:4502/system/console/status-slingsettings
https://sourcedcode.com/blog/aem/how-to-check-all-active-run-modes-in-a-running-aem-instance
Hi @wasil_z ,
I read the documentation , I need a separate configuration for preview instance
config.author
and config.publish
) declared to define different values, use the same variable name. For example$[env:ENV_VAR_NAME;default=<value>]
, where the default corresponds to the default value for that tier (author or publish). When setting the environment variable via Cloud Manager API or via a client, differentiate between the tiers using the “service” parameter as described in this API reference documentation. The “service” parameter will bind the variable’s value to the appropriate OSGi tier. It can be “author” or “publish” or “preview”.I'm unsure how to give this service parameter in config json file or in java OCD.
You may refer to the community blog: https://medium.com/slalom-technology/how-to-use-environment-variables-in-adobe-experience-manager-ae... how you can set environment variable using CM API and use in OSGI config.
Thanks
Wasil
Views
Likes
Replies
Views
Likes
Replies