Expand my Community achievements bar.

Duplicate Workspace endpoint submission in Java

Avatar

Level 7

Hello,

I am working towards a simple two servlet application which renders a form using an endpoint.  I would like to basically duplicate workspace from the time they click on a process endpoint, see the form and click "complete" without Flex.

/showForm?endpoint=<EndpointName>

/submitData

Furthermore, I want to pass data to the renderService in inDocData.

Here's what I got so far but, I'm really stuck:

TaskManagerEndpointClient tmec = TaskManagerClientFactory.getEndpointClient(myFactory);

EndpointInvokeResult eir = tmec.invokeEndpoint(ep.getId());

TaskInfo ti = eir.getTaskInfo();

TaskManager tm = TaskManagerClientFactory.getTaskManager(myFactory);

HashMap inputMap =

new HashMap();

Document inDocData = new Document(xmlString.toString().getBytes());

inputMap.put(

"inDocData", inDocData);

String userAgent = (String)req.getHeader(

"User-Agent");

inputMap.put(

"userAgent", userAgent);

FormServiceInvokeResponse fsir = tm.callRenderService(ti.getTaskID(), 0, inputMap);

Document form = fsir.getResultingDocument();

File file =

new File("C:\\temp\\form.pdf");

inDocData doesn't make it to the document.

userAgent does.

I haven't even started on the submit!  How does the taskID get populated into the form?

What about attachments?

Any help would be appreciated.

0 Replies