[jboss-user] [JBoss jBPM] - How to get id of task

jagr do-not-reply at jboss.com
Fri Mar 14 12:14:08 EDT 2008

I'm trying to get the id of task.

My process start and in determinate node has ActionHandler.
In this action, i want to know task id.

I'm be able to get node id with context.getNode().getId()
and get token id with context.getToken().getId()
but if I try context.getTask().getId() process thrown exception 

  | 17:00:08,703 ERROR [GraphElement] action threw exception: null
  | java.lang.NullPointerException
  |         at com.aixtelecom.actions.SaveOfferAction.execute(SaveOfferAction.java:47)
  |         at org.jbpm.graph.def.Action.execute(Action.java:122)
  |         at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:264)
  |         at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:220)
  |         at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:190)
  |         at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:174)
  |         at org.jbpm.graph.def.Node.leave(Node.java:382)
  |         at org.jbpm.graph.node.TaskNode.leave(TaskNode.java:209)
  |         at org.jbpm.graph.def.Node$$FastClassByCGLIB$$d187eeda.invoke(<generated>)
  |         at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
  |         at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer
  | .java:163)

In jbpm-consel if I enter on tasks process, i can see the task with his id.

How can I acces to this id?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4136758#4136758

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4136758

More information about the jboss-user mailing list