JBoss Community

Couldn't retrieve the node name for the process instance in JBPM 5.0.0

created by Feki Ahmed in jBPM Development - View the full discussion

Hi,

i tried to get the node Instance Id's using this method :

 

 

public Long getNodeInstanceId() {

                    if(getRfpi()!=null)

                    if(getRfpi().getNodeInstances().iterator().hasNext())

                              nodeInstanceId =  getRfpi().getNodeInstances().iterator().next().getNodeId();

                    return nodeInstanceId;

 

          }

 

WHERE getRfpi()  is defined by :

 

 

public static RuleFlowProcessInstance getRfpi() {

                    if(processInstance!=null)                    

                              rfpi =(RuleFlowProcessInstance)processInstance;

                    return rfpi;

          }

 

this worked fine BUT when i tried to get the node name by almost the same way :

 

public static String getNodename() {

                    if(getRfpi()!=null)

                              if(getRfpi().getNodeInstances().iterator().hasNext())

                              nodename= getRfpi().getNodeInstances().iterator().next().getNodeName();

                    return nodename;

          }

 

 

i got a NullPointerException pointing to this method..

 

Any Help please ?

Reply to this message by going to Community

Start a new discussion in jBPM Development at Community