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 = window.external.GetFormURL();

The URL is built by calling ViewWorkItem.GetFormURL,

public string GetFormURL()
{
   return _adapter.GetFormURL(_item);
}

which in turn calls adapter.GetFormURL.

public string GetFormURL(workResponse response)
{
   return _handler.GetBaseURL() + "bpmresources/" + response.presentation.formIdenitifier;
}

This method builds the form URL:

  • GetBaseURL (from ServiceClientFactory.cs) is used to obtain the endpoint URL of the BPM runtime - for example, http://10.100.87.112:8080/.
  • bpmresources is the name of the BPM runtime component that provides access to the form resources of deployed BPM applications.
  • response.presentation.formIdenitifier is the formIdentifier of the form used by this work item, obtained from the previous OpenItem call - for example, 1.0.0.201107291435/openspaceGWTPull_DefaultChannel/FindAddress/GetAddress/Getuserdetails/Getuserdetails.gwt.json.