JBoss Community

Failing to get task content on jBPM 5.5.0-SNAPSHOT

created by Elton Plath in jBPM - View the full discussion

Hi all,

 

 

I upgraded to the latest snapshot but I am now getting an OptionalDataException reading in the content stream (this was working on 5.4.0-Final):

 

 

java.io.OptionalDataException

          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1339)

          at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)

 

The way I am getting the content is as follows:

 

 

task = getTask(task.getId());  

BlockingGetContentResponseHandler responseHandler = new BlockingGetContentResponseHandler();

client.getContent(task.getTaskData().getDocumentContentId(), responseHandler);

Content content = responseHandler.getContent();

byte[] byteContent = content.getContent();

ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteContent);

ObjectInputStream ois = new ObjectInputStream(byteArrayInputStream);

while ((obj = ois.readObject()) != null) {

           

I am setting up my task client as follows:

 

 

clientConnector = new HornetQTaskClientConnector("HornetQ_BpmTaskClient_" + Thread.currentThread().getName(),

                                                                                                                                  new HornetQTaskClientHandler(SystemEventListenerFactory.getSystemEventListener()));

client = new TaskClient(clientConnector);

 

 

Please can you help

 

 

Regards

Elton

Reply to this message by going to Community

Start a new discussion in jBPM at Community