[jboss-user] [jBPM] - I want use variable in my process, but it not work

kklg do-not-reply at jboss.com
Thu Mar 21 00:39:03 EDT 2013

kklg [https://community.jboss.org/people/kklg] created the discussion

"I want use variable in my process,but it not work"

To view the discussion, visit: https://community.jboss.org/message/803953#803953

hi !

 *when i put variable in map(data), my variableinstancelog table is nothing,*

    public void completeTask(long taskId, Map<?, ?> data, String userId, Map<String, Object> results )
            throws InterruptedException {

        BlockingTaskOperationResponseHandler responseHandler = new BlockingTaskOperationResponseHandler();
        client.start(taskId, userId, responseHandler);

        responseHandler = new BlockingTaskOperationResponseHandler();
        ContentData contentData = null;
        if (data != null) {
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            ObjectOutputStream out;
            try {
                out = new ObjectOutputStream(bos);
                contentData = new ContentData();
            } catch (IOException e) {

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


*but  i add this code  ,*

 *when i put variable in map(+results+) ,it work,*

+        BlockingGetTaskResponseHandler responseHandlerGetTask = new BlockingGetTaskResponseHandler();+
+        client.getTask(taskId, responseHandlerGetTask);+
+        responseHandlerGetTask.waitTillDone(1000);+
+        Task task = responseHandlerGetTask.getTask();+
+        ksession.getWorkItemManager().completeWorkItem(+
+                task.getTaskData().getWorkItemId(), *results*);+

*I  I do not understand, I see other people are like  first code. I used jBPM5.4.  Thanks  For any help in adcance.*



Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130321/8686e6fe/attachment.html 

More information about the jboss-user mailing list