Use of BonitaAPI

1
0
-1

Hi, i'm not able to get the API working.

Explaining the point 1), 2),3),4):

1) we have an OracleDB, that contains data(request elements for HelpDesk) for being process with the bonitaAPI

2) we have a Tomcat that contains a webApp wich will process the data from OracleDB, with bonitaAPI.
I'm working with maven, so this are the dependencies:


org.bonitasoft.engine
bonita-server
6.1.0


the same for bonita-client, and bonita-common. (i supose that i need only those)

This is part of my code of the bonita webApp:

String bonitaPath = "C:/BonitaBPMSubscription-6.1.0/workspace/tomcat/bonita";
System.setProperty(BonitaHome.BONITA_HOME, bonitaPath);

String userName = "walter.bates";
String password = "bpm";

loginAPI = TenantAPIAccessor.getLoginAPI();
apiSession = loginAPI.login(userName, password);
processAPI = TenantAPIAccessor.getProcessAPI(apiSession);

And an exception is thrown at (***At end of message***)
loginAPI = TenantAPIAccessor.getLoginAPI();


3) the Bonita version that i'm using, BonitaBPMSubscription-6.1.0, its where bonita.home its pointing at.

4) An OracleDB, BonitaJournal is installed. And where i'm trying to save the data.

One of the answer that you gave me:
-->
System.setProperty("bonita.home", "/home/poorav/Downloads/BOSInstallables/6.1/6.1.1/BonitaBPMSubscription-6.1.1-deploy/bonita_home- 6.1.1/");

LoginAPI loginAPI = TenantAPIAccessor.getLoginAPI();
APISession session = loginAPI.login("walter.bates", "bpm");

ProcessAPI procAPI = TenantAPIAccessor.getProcessAPI(session);

procAPI.startProcess(procDefId);
<--

but, how do i know the procDefId?

i also read this: http://documentation.bonitasoft.com/configuring-bonita-home-client
and use this methods createPlatform() and initializePlatform() and createAndInitializePlatform()

I also try to use this example:
http://ftp.support.bonitasoft.com/customer_portal/files/11350/bonita-exa...

i also read this:
http://documentation.bonitasoft.com/javadoc/api/6.1/sp/common/index.html
that doesnt explain me how to build a complete application, only parts.(the code is without a context)

diging into the source isnt very helpfull because of the quantity of code lines tha bonitaSoft has.


just to clarify: to wich folder has to point bonita.home?
for example:

1) C:\BonitaBPMSubscription-6.1.0
2) C:\BonitaBPMSubscription-6.1.0\workspace
2) C:\BonitaBPMSubscription-6.1.0\workspace\bonita
2) C:\BonitaBPMSubscription-6.1.0\workspace\tomcat
2) C:\BonitaBPMSubscription-6.1.0\workspace\tomcat\bonita
2) C:\BonitaBPMSubscription-6.1.0\workspace\tomcat\bonita\server

????

Thanks!!!

1 answer

1
0
-1

Hi Karina,

With the Tomcat bundle, the default location for bonita home is at the root of the bundle, so in your case it will be be C:\BonitaBPMSubscription-6.1.0/bonita.

The bonita home for your client app can be wherever you want, but if you are only using one client, you can use the default location for that too.

There's a new-ish page in the documentation with details of what is in bonita home:http://documentation.bonitasoft.com/bonita-home

Chris

Notifications