We are trying to explore the bonita API usage in community edition. Is it possible in community edition? Appreciate your feedback.
==> I have created process variable with the default value in the groovy script as below:
import org.bonitasoft.engine.bpm.process.ProcessInstance;
def process = apiAccessor .getProcessAPI().getProcessInstance(processInstanceId);
return processInstanceId;
processInstanceId.toString();
==> I used the above code to get the value of processesInstanceId to the process variable(ex), by specifying the contract and form using that process variable.
I am getting the below error after running the process:
error:-
USERNAME=jan.fisher | org.bonitasoft.engine.core.process.instance.api.exceptions.SProcessInstanceCreationException: PROCESS_DEFINITION_ID=7900052196577437731 | PROCESS_NAME=Ex | PROCESS_VERSION=1.0 | org.bonitasoft.engine.expression.exception.SExpressionEvaluationException: PROCESS_INSTANCE_ID=104 | Declared return type class java.lang.String is not compatible with evaluated type class java.lang.Long for expression initEx
Can anyone please advice me and give me the solution for this.
Thank you