# Use of BonitaAPI

**URL:** https://community.ofelia.com/t/use-of-bonitaapi/3985
**Category:** Q&A
**Created:** [26 November 2013 19:38 UTC](https://community.ofelia.com/t/use-of-bonitaapi/3985 "2013-11-26T19:38:45Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![karina.pasten](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@karina.pasten](https://community.ofelia.com/u/karina.pasten)
#### Post date: [26 November 2013 19:38 UTC](https://community.ofelia.com/t/use-of-bonitaapi/3985/1 "2013-11-26T19:38:45Z")

</div>

Hi, i'm not able to get the API working.  
  
Explaining the&nbsp;point 1), 2),3),4):  
  
1) we have&nbsp;an OracleDB, that contains data(request elements for HelpDesk) for being process with the bonitaAPI  
  
2) we have a&nbsp;Tomcat that contains a webApp wich will process the data from OracleDB, with bonitaAPI.  
I'm working with maven, so this are the dependencies:  
  
\<dependency\>  
\<groupId\>org.bonitasoft.engine\</groupId\>  
\<artifactId\>bonita-server\</artifactId\>  
\<version\>6.1.0\</version\>  
\</dependency\>  
  
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,&nbsp; its where bonita.home its pointing at.  
  
4) An OracleDB,&nbsp;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()&nbsp;  
  
I also try to use this example:  
http://ftp.support.bonitasoft.com/customer\_portal/files/11350/bonita-example.zip  
  
i also read this:  
http://documentation.bonitasoft.com/javadoc/api/6.1/sp/common/index.html&nbsp;  
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!!!&nbsp;

---

<div class="post-metadata">

### Author: ![system](https://europe1.discourse-cdn.com/flex013/uploads/community_bonitasoft/original/2X/6/6b7b18c0478f2645369e82e009b65e3b97f2cc12.svg) [@system](https://community.ofelia.com/u/system)
#### Post date: [3 December 2013 08:31 UTC](https://community.ofelia.com/t/use-of-bonitaapi/3985/2 "2013-12-03T08:31:24Z")

</div>

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&nbsp;C:\BonitaBPMSubscription-6.1.0/bonita.&nbsp;

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

&nbsp;
