Externalizer in workflow process step | Community
Skip to main content
Level 9
October 16, 2015
Solved

Externalizer in workflow process step

  • October 16, 2015
  • 7 replies
  • 1743 views

Is there a clean way to retrieve the hostname and port in the system console, Day CQ link externalizer in my custom workflow process step.

I am struggling with retrieving the values set, 

Appreciate help.

Regards,

NZ

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Scott_Brodersen

in the screenshot, there is an error in the IP address -- there is not dot between the 2nd and 3rd set

7 replies

Scott_Brodersen
Level 8
October 16, 2015

Is  your impl a Java class or ECMA script?

Level 9
October 16, 2015

Its a java workflow process step. i tried the below snippet but when i print url i get http://null/content/geometrixx

 

resolver = resourceResolverFactory.getAdministrativeResourceResolver(null);

Externalizer externalizer= resolver.adaptTo(Externalizer.class);

String url =externalizer.externalLink(null, externalizer.LOCAL, "/content/geometrixx");

Level 9
October 16, 2015

NitroHazeDev wrote...

Its a java workflow process step. i tried the below snippet but when i print url i get http://null/content/geometrixx

 

resolver = resourceResolverFactory.getAdministrativeResourceResolver(null);

Externalizer externalizer= resolver.adaptTo(Externalizer.class);

String url =externalizer.externalLink(null, externalizer.LOCAL, "/content/geometrixx");

 

I have attached the snapshot for reference

Level 9
October 16, 2015

Justin, it looks like if i key in "local http://localhost:4502" it gets picked up well, but if i key in "local http://xxx.xxx.xxx.xx:4502" it just does not accept and considers the IP and port to be null. Any help? It looks like "local http://localhost:4502" can get picked up as well. Any way i could have an IP being picked up?

Scott_Brodersen
Scott_BrodersenAccepted solution
Level 8
October 16, 2015

in the screenshot, there is an error in the IP address -- there is not dot between the 2nd and 3rd set

Level 9
October 16, 2015

Scott Brodersen wrote...

in the screenshot, there is an error in the IP address -- there is not dot between the 2nd and 3rd set

 

Scott, 

Thanks a lot, my bad..:)...sorry about that.

Regards,

Nicole

Scott_Brodersen
Level 8
October 16, 2015

No need to apologize! Glad I could help  :)