Hi all!
I have a problem to run the example travel request with temporary forms.
When I start the process, complete the first form and click on the start button. The system shows me the following error message:
USERNAME = helen.kelly | org.bonitasoft.engine.core.process.instance.api.exceptions.SProcessInstanceCreationException: PROCESS_DEFINITION_ID = 8,408,422,678,754,431,006th | process_name = Travel Request | PROCESS_VERSION = 1.0 | org.bonitasoft.engine.expression.exception.SExpressionEvaluationException: Expression newRequestInitialValue with content = <import com.company.model.TravelRequest;
TravelRequest newTravelRequest TravelRequest = new ();
newTravelRequest.setUserId (String.valueOf (BonitaUsers.getProcessInstanceInitiator (apiAccessor, processInstanceId) .getId ()));
newTravelRequest.setDepartureDate (travelRequestInput.departureDate);
newTravelRequest.setNumberOfNights (travelRequestInput.numberOfNights);
newTravelRequest.setHotelNeeded (travelRequestInput.hotelNeeded);
newTravelRequest.setDestination (travelRequestInput.destination);
newTravelRequest.setReason (travelRequestInput.reason);
newTravelRequest.setStatus (“pending”);
newTravelRequest return;> depends on BonitaUsers is neither defined in the script nor in dependencies.
I believe the problem is related to line:
newTravelRequest.setUserId (String.valueOf (BonitaUsers.getProcessInstanceInitiator (apiAccessor, processInstanceId) .getId ()));
Because when I change the code to:
newTravelRequest.setUserId (“helen.kelly”);
Simulating the operation of getProcessInstanceInititiator (), the process run.
How could I fix it?
I’m using bonita studio 7.1.0 32bits.
Thank you!