JBoss Community

How to finish the processInstance

created by RuiHua Tang in jBPM - View the full discussion

I have finished all tasks for the proceeInstance , why the state of processInstance is still '1' ?

 

Is not what I had to deal with other cases?

 

My English is not good ,excuse me

 

Here is my code:

 

BlockingTaskOperationResponseHandler responseHandler = new BlockingTaskOperationResponseHandler();

                    client.start(taskId, userId, responseHandler);

                    responseHandler.waitTillDone(5000);

                    // Thread.sleep(10000);

                    responseHandler = new BlockingTaskOperationResponseHandler();

                    ContentData contentData = null;

                    if (data != null) {

                              ByteArrayOutputStream bos = new ByteArrayOutputStream();

                              ObjectOutputStream out;

                              try {

                                        out = new ObjectOutputStream(bos);

                                        out.writeObject(data);

                                        out.close();

                                        contentData = new ContentData();

                                        contentData.setContent(bos.toByteArray());

                                        contentData.setAccessType(AccessType.Inline);

                              } catch (IOException e) {

                                        e.printStackTrace();

                              }

                    }

                    client.complete(taskId, userId, contentData, responseHandler);

                    responseHandler.waitTillDone(5000);

Reply to this message by going to Community

Start a new discussion in jBPM at Community