Hello,
In Bonita 7 I’m trying to create a new instance of a process from a script but I can not.
My process (process1) has a service task in which I add a script to launch a new process called “process2” version “1.0”.
Examples of Bonita’s documentation not have all the code and sometimes lack me how to get the current session, other times to get the current users … please does anyone have a complete example or can help me?
Thank you. Regards,
what code do you have so I can have a look?
however a hint to start:
you need to search the list of processes and process versions to get the processID,
note: in community search doesn’t work as you might hope search(processName, processVersion) doesn’t return only one processID. You need to get the FULL list of processes and then loop through them…
get list of processes in listOfProcesses
for (processes in listOfProcesses){
if (processes.getName() === “process2” AND processes.getVersion() === “2.0”){
processID = processes.getId();
startprocess(processID);
}
}
hope this helps,
regards
Seán
Hello Sean,
I’m trying with Bonita’s documentation, but not being the complete code not get it to work. I tried it with code from the community … but no way. Thank you very much for your help.