AnsweredAssumed Answered

SvgApi is not working when localhost is not available

Question asked by kesavkolla on Mar 26, 2011
Latest reply on Apr 1, 2011 by bernd.ruecker
My application server is running on remove host.  I'm accessing the cycle from my local laptop.  When I click on RawXML BPMN etc.. everything works.  When I click on SvgApi nothing comes up.

I've digged into detail and found when ever I click on SvgApi the URL for signavio-svg.js is actually coming as localhost:8080.

Here is more detail request response.

Request:  https://wzxdcc002.cdbt.wcdc.kp.org:8443/activiti-cycle/proxy/activiti-rest-endpoint/content?connectorId=Activiti&artifactId=%2Froot-directory%3BEasyBugFilingProcess%3BEasyBugFilingProcess.signavio.xml&contentRepresentationId=SvgApi


Response:


<html><head><link href="../../res/css/activiti-core.css" type="text/css" rel="stylesheet" /></head><body><div id="model"><script type="text/javascript" src="http://localhost:8080/activiti-modeler/api/signavio-svg.js"></script><script type="text/plain">{   url: "http://wzxdcc002.cdbt.wcdc.kp.org:8080/activiti-modeler/p/model/root-directory%3BEasyBugFilingProcess%3BEasyBugFilingProcess.signavio.xml",   server: "http://wzxdcc002.cdbt.wcdc.kp.org:8080/activiti-modeler/", zoom: 100,              }</script></div></body></html>


Since the URL for signavio-svg.js is localhost it's not able to load it.  I looked into source and found SVGAPI_URL_LOCAL is hardcoded to localhost:8080 in SignavioSvgApiBuilder.java.

Looking forward to fix it.

Outcomes