Expand my Community achievements bar.

SOLVED

Externalizer in workflow process step

Avatar

Level 10

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

1 Accepted Solution

Avatar

Correct answer by
Level 8

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

View solution in original post

7 Replies

Avatar

Level 8

Is  your impl a Java class or ECMA script?

Avatar

Level 10

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");

Avatar

Level 10

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

Avatar

Level 10

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?

Avatar

Correct answer by
Level 8

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

Avatar

Level 10

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

Avatar

Level 8

No need to apologize! Glad I could help  :)