Setting the Form URL

The formURL variable holds the URL containing the JSON representation of the form, in the format required by the Forms Runtime Adapter loadForm method.

var formURL = "<%=urlConstruct%>";

This URL is constructed as:

HttpSession reqSession = request.getSession();
String urls = reqSession.getAttribute("protocol") + "://" + reqSession.getAttribute("host") + ":" + reqSession.getAttribute("port") + "/bpmresources/";
String urlConstruct = urls+workItem.getPresentation().getFormIdenitifier();
Note: All the Forms resources are served from the context bpmresources on the BPM runtime.