AnsweredAssumed Answered

search.findNode error

Question asked by anakin59490 on Mar 13, 2018
Latest reply on Mar 16, 2018 by afaust



when i create a new person, a java function is called, using the fields bellow  :



Java function uses getPerson() method from PersonService Class:


private AuthorityService authorityService;
public NodeRef createPatient(String idPatient, String nomPatient, String prenomPatient, Date dateDeNaissance) {
return personService.getPerson(userName);



But in my javascript, i need to get Node , not a nodeRef, so i use search.findNode() method like that :

var nodePat = createPatient(idPatient,PrenomPatient,nomPatient,dateNaissance);
//execution.setVariable("wfvd_patients" ,nodePat);
var node = search.findNode(nodePat)


But i get the error " org.activiti.engine.ActivitiException: Exception while invoking TaskListener: Exception while invoking TaskListener: 02130054 Failed to execute supplied script: Passed value is not an instance of ActivitiScriptNode, cannot set variable value."


What is the best way to do it ?


Thank you