Is it possible to access the bonita API's in community edition for example getting the time stamp of case id start, completion?

1
0
-1

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

1 answer

1
0
-1

This was answered in your previous post here

Have you read the message?

Declared return type class java.lang.String is not compatible with evaluated type class java.lang.Long for expression initEx

It says string and long are incompatible.... You have to fix this. Search for Java long to string conversion...

Also why have a statement after the return, it will never be executed...at least you should comment it out...

return processInstanceId;
processInstanceId.toString();

Comments

Submitted by ramireddy.pingala on Mon, 09/28/2015 - 11:47

Thank you..

Notifications