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.

Comments

Submitted by ramireddy.pingala on Tue, 09/22/2015 - 15:19

==> 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

Submitted by Sean McP on Tue, 09/22/2015 - 15:46

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...

2 answers

1
0
-1

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

Comments

Submitted by Sean McP on Mon, 09/21/2015 - 14:24

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

Submitted by ramireddy.pingala on Thu, 09/24/2015 - 08:48

That's ok but how to access the API.

Submitted by Sean McP on Fri, 09/25/2015 - 11:40

what do you mean? You are accessing it...

1
-1
-1
Notifications