String jsessionid)
throws YSchemaBuildingException, YSyntaxException, IOException,
JDOMException, UnsupportedEncodingException {
Map parameters = Collections.synchronizedMap(new TreeMap());
InterfaceD_XForm idx = new InterfaceD_XForm(context.getInitParameter("YAWLXForms") + "/YAWLServlet");
// set schema data
String schema = createSchema(workItemID, sessionHandle, _worklistController);
parameters.put("schema", schema);
// retrieve list of input params to send to YAWLXForms that will display them
// as read-only fields.
WorkItemRecord item = _worklistController.getCachedWorkItem(workItemID);
TaskInformation taskInfo = _worklistController.getTaskInformation(
item.getSpecificationID(), item.getTaskID(), sessionHandle);
// set instance data
InstanceBuilder ib = new InstanceBuilder(schema, taskInfo.getDecompositionID(), item.getDataListString());
parameters.put("instance", ib.getInstance());
// set input params (if any exist)
YParametersSchema paramsSignature = taskInfo.getParamSchema();
parameters.put("inputparams", getInputOnlyParams(paramsSignature.getInputParams(), paramsSignature.getOutputParams()));
parameters.put("root", taskInfo.getDecompositionID());
parameters.put("task", URLEncoder.encode(taskInfo.getTaskID(), "UTF-8"));
parameters.put("workItemID", item.getID());
parameters.put("JSESSIONID", jsessionid);
// send (post) data to yawlXForms thru interfaceD
idx.sendWorkItemData(parameters, item, userID, sessionHandle);
}