[jboss-user] [jBPM] - Re: How to get the Task instance id ?

npereira do-not-reply at jboss.com
Thu Jun 2 10:20:40 EDT 2011


npereira [http://community.jboss.org/people/npereira] created the discussion

"Re: How to get the Task instance id ?"

To view the discussion, visit: http://community.jboss.org/message/608332#608332

--------------------------------------------------------------
Hello Kris,

I have been experimenting on this but I haven't quite been successfull.
I attached some files with the BPMN and the java that I am using to debug the process.

The facth is that the Java code that is executed inside the bpmn, returns a WorkItem ID=2.

+               System.out.println("Inside HT node 1");+
+                System.out.println("Process id is "+kcontext.getProcessInstance().getId());+

+                WorkItemNodeInstance wi = (WorkItemNodeInstance)kcontext.getNodeInstance();+
+                System.out.println("getWorkItemId is " + wi.getWorkItemId());+
+                System.out.println("WorkNodeID is " + wi.getId());+

+                System.out.println("WorkItem UniqueID is " + wi.getUniqueId());+
+                System.out.println("WorkItem ID " + wi.getId());+

+                String s2 = ""+kcontext.getNodeInstance().getId();+
+                System.out.println("Node Instance id is " +s2);+

But once I get the Task, from de debug java class, the task WorkItem ID=1.

+client.getTask(TID, responseHandler);+
+            Task task = responseHandler.getTask();+
+            TaskData td = task.getTaskData();+
+            System.out.println("Task WorkItemID "+td.getWorkItemId());+
+            BlockingTaskOperationResponseHandler eresponseHandler = new BlockingTaskOperationResponseHandler();+
+            TaskOperationResponseHandler respHandler = null;+
+            client.start(TID, "krisv", respHandler);+
+            client.complete(TID, "krisv", null, eresponseHandler);+

So there is no way to get a correlation between these two. 
So how can I get this working?
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/608332#608332]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110602/86fea036/attachment-0001.html 


More information about the jboss-user mailing list