Hello,

I am running into a challenge accessing the REST interface of the document store. I coded something quick and dirty in VBA for excel to use the REST interface of the YAWL engine to be able to get a list of specifications and launch cases. This works very well.

However the next step is to upload a document to the documentstore retrieve the ID and use that as input parameter for launching a case. I imagine the order would be:
1. upload file to documentstore
2. retrieve response
3. decode and get necesary properties.
4. launch case with input parameters in the engine.

However I cannot get a response from the REST interface of the document store.
When pointing a browser to http://localhost:8080/yawl/ib I get a response in XML format from the engine. This seems to works for every service actually except the documentstore service. Looking at the code it seems that I should at least receive an error response which would tell me that I at least got the URL right.

I use: http://localhost:8080/documentStore
Also from within the environment itself the uploading of documents seems to work fine.

So my questions:
Is there something tricky with the documentStore service which prevents me from accessing its REST interface? (I allready noticed that the request parameters have to be send in the body of the request, however gathering from the code, even with an empty body I expect a response.)

Do I have the correct URL?

Is what I try to achieve even possible?

Best regards,

Peter de Lange

For full disclosure, I also posted this question on the YAWLFoundation board.

fmannhardt

Fri, 12/14/2012 - 06:53

Hi Peter,
I guess you are using YAWL4Study 2.3? First you should install the latest bugfix releases for the YAWL Document Store, Resource Service and Engine from here:
http://www.yawlfoundation.org/pages/resources/latestbuilds.html

There have been some errors fixed regarding the Document Store Service. Maybe this will already solve your problem. Follow the instructions and additionally you have to fix the documentStore.war, because it introduces an unecessary directory "documentStore".

Anyway I tried your approach out with a plain YAWL4Study 2.3 installation. Firing a GET or POST request to "http://localhost:8080/documentStore/" just returns an empty response. According to the sourcecode of DocumentSTore.java YAWL uses DataInputStream.readUTF to "parse" the input. I'm not familiar with this approach on reading parameters, but my guess would be that you need to write the request using the writeUTF method of DataOutputStream:
http://docs.oracle.com/javase/6/docs/api/java/io/DataOutputStream.html#…

I hope this helps for the start.