Need your help on this.
<!DOCTYPE html>
<html>
<head>
<title>Jbpm Form</title>
<script src ="jbpm-forms-rest-integration.js"></script>
<script type="text/javascript">
var formsAPI = new jBPMFormsAPI();
function showProcessForm() {
var onsuccessCallback = function(response) {
document.getElementById("showformButton").style.display = "none";
document.getElementById("startprocessButton").style.display = "block";
}
var onerrorCallback = function(errorMessage) {
alert("Unable to load the form, something wrong happened: " + errorMessage);
formsAPI.clearContainer("myform");
}
}
</script>
</head>
<body>
<input type="button" id="showformButton"
value="Show Process Form" onclick="showProcessForm()">
<p/>
<div id="myform" style="border: solid black 1px; width: 500px; height: 200px;">
</div>
<p/>
<input type="button" id="startprocessButton"
style="display: none;" value="Start Process" onclick="startProcess()">
</body>
</html>
points:
I am not testing this procedure on jbpm machine.
There are only two files in the project jbpm-forms-rest-integration.js and my html page.
the URL which this java script is creating at
url: hostUrl + "rest/runtime/" + deploymentId + "/process/" + processId + "/startform",
is giving form URL if I manually try this url on browser.