I am trying to create user in javascript (inline) of service task in the modeller
This is my content:
var person = new Object();
person.firstName = “John”;
person.lastName = “Doe”;
person.email= “myemail”;
person.password = “secret”;
person.id=“someid”;
execution.getProcessEngine().getIdentityService().saveUser(person);
The error that i get is: Cannot cast jdk.nashorn.internal.scripts.JO to org.camunda.bpm.engine.identity.User
What is wrong with my script