* @param specID
*/
private void buildForm(String schema, String instance, String form, String root,
String workItemID, String sessionHandle, String userID, String specID){
Schema2XForms builder = new Schema2XForms();
ServletContext RP = getServletConfig().getServletContext();
String filePath = RP.getRealPath(File.separator+"forms");
try{
builder.setInputURI(filePath+File.separator+schema);
}
catch(IOException e){
logger.debug("YAWLServlet IOException: "+e.toString());
}
File f = new File(filePath+File.separator+form+".xhtml");
try{
builder.setInstanceFile(filePath+File.separator+instance);
}
catch(IOException e){
logger.debug("IOException: "+e.toString());
}
builder.setInstanceHref("http://www.w3.org/2001/XMLSchema-instance");
// EG: YAWL = "http://localhost:8080/worklist/yawlFormServlet";
builder.setAction(RP.getInitParameter("YAWL")+"?userID="+userID+
"&sessionHandle="+sessionHandle+"&specID="+specID+
"&workItemID="+workItemID+"&submit=submit");
// EG: FormBase = "http://localhost:8080/YAWLXForms/"
builder.setBase(RP.getInitParameter("FormBase"));
builder.setOutputFile(f); // goes in chiba forms directory
builder.setRootTagName(root);
builder.setStylesheet("html4yawl.xsl");
builder.setSubmitMethod("post");
builder.setWrapperType("XHTML");
builder.execute();
deleteTempFile(filePath+File.separator+schema);
deleteTempFile(filePath+File.separator+instance);
fixFormParams(f);