OK I understand your explainations about jbpm black box.
About the nodeInstance it is to look for node metada as I am interesting about Shobhit Tyaqi question : https://community.jboss.org/message/806501#806501
But this is effectively not critical for my project. However, I encounter the same problem for a pillar method of my project that consists in setting process variable at each step of all my processes :
public void setProcessVariable(Long processInstanceId, String key, Object object){
WorkflowProcessInstance wpi = (WorkflowProcessInstance)kSession.getProcessInstance(processInstanceId);
if((wpi == null) || (wpi.getVariable(key) == null)){
System.out.println("workflow process instance is null :-(");
}else{
System.out.println("workflow process instance is NOT null :-)");
wpi.setVariable(key, object);
}
}
So this is why I need your help.
Many thank for all your answers.
Sandra