0 Replies Latest reply on Mar 14, 2008 12:14 PM by gar jar

    How to get id of task

    gar jar Newbie

      Hi.
      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?

      Thanks