We are trying to explore the bonita API usage in community edition. Is it possible in community edition? Appreciate your feedback.
Not really sure what you want, simple answer is Yes the API’s are available in community.
Documentation is here:
http://documentation.bonitasoft.com/product-bos-sp/engine-api
and REST documentation is here:
http://documentation.bonitasoft.com/product-bos-sp/web-rest-api-0
We use it in Groovy and Java scripts and home grown extensions, the UI only uses REST
regards
==> 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
Have you read the message?
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…
For example getting the time stamp of case id start, completion?
You would get these from the ArchivedProcessInstance API and it’s methods.
See the Javadoc here: http://documentation.bonitasoft.com/javadoc/api/7.1/index.html
regards
That’s ok but how to access the API.
what do you mean? You are accessing it…