# Migrate BOS 5.6.2 to 6.3.0

**URL:** <https://community.ofelia.com/t/migrate-bos-5-6-2-to-6-3-0/4699>\
**Category:** Q&A\
**Created:** [12 June 2014 14:53 UTC](https://community.ofelia.com/t/migrate-bos-5-6-2-to-6-3-0/4699 "2014-06-12T14:53:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vicentemagalhaesjr](https://avatars.discourse-cdn.com/v4/letter/v/87869e/32.png) [@vicentemagalhaesjr](https://community.ofelia.com/u/vicentemagalhaesjr)\
**Post date:** [12 June 2014 14:53 UTC](https://community.ofelia.com/t/migrate-bos-5-6-2-to-6-3-0/4699/1 "2014-06-12T14:53:08Z")

</div>

Hi friends,

I have an application developed in Bonita 5.6.2.

I’m upgrading to version 6.3.0. I managed to migrate my files “\*. Bar” for the new extension. “Bos”.

Follow the guidance of migrating my files “\*. Bar” for version 5.9.1 of the BOS, and then open these files in version 6.3.0.

The migration everything worked.

My question is how do I make a deploy file. “Bos” in my standalone jdk.

I tried the following and I’m not getting:

1. Final LoginAPI loginAPI TenantAPIAccessor.getLoginAPI = ();

2. APISession sessionAPI = loginAPI.login (“install”, “install”);

3. System.out.println (“Sucess”);

4. ProcessAPI processAPI = TenantAPIAccessor.getProcessAPI (sessionAPI);

5. System.out.println (“processAPI create”);

6. BusinessArchive businessArchive = null;

7. String pathBarFile = “D: \ \ TesteBonita6 \ \ ComparacaoValores.bos”;

/ / Deploy the bar file  
8) File fileBarTmp = new File (pathBarFile);

1. businessArchive = BusinessArchiveFactory.readBusinessArchive (fileBarTmp);

/ / Deploy the process  
10) final ProcessDefinition processDefinition = processAPI.deployAndEnableProcess (businessArchive);

After running the code line 10 is experiencing the issue below:

**org.bonitasoft.engine.bpm.bar.InvalidBusinessArchiveFormatException: Invalid format, can’t read ‘Process design’ from the Bar file**

Ask help from you as we plan on migrating our platform to JBoss BRMS, if migration is not necessary.

Thank’s.

---

<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:** [12 June 2014 21:33 UTC](https://community.ofelia.com/t/migrate-bos-5-6-2-to-6-3-0/4699/2 "2014-06-12T21:33:29Z")

</div>

You will need to generate .BAR file. You can’t deploy BOS file as it is only for development exchange. To generate .bar file please refer to this document:  
[http://documentation.bonitasoft.com/build-process-deployment](http://documentation.bonitasoft.com/build-process-deployment)

After that change line #7 to String pathBarFile = “D: \ \ TesteBonita6 \ \ ComparacaoValores.bar”

HTH  
Ronak

---

<div class="post-metadata">

**Author:** ![vicentemagalhaesjr](https://avatars.discourse-cdn.com/v4/letter/v/87869e/32.png) [@vicentemagalhaesjr](https://community.ofelia.com/u/vicentemagalhaesjr)\
**Post date:** [18 June 2014 18:36 UTC](https://community.ofelia.com/t/migrate-bos-5-6-2-to-6-3-0/4699/3 "2014-06-18T18:36:31Z")

</div>

Ronak, followed your directions and everything worked. Thank you my friend.

Now I have another question.

Need, to know how to pass a list of variables of type HashMap into the flow of BOS as well as a list of return flow execution BOS.

In the version of bos 5.6.2, i use the following API and gave it right:

Final ProcessDefinition processDefinition = processAPI.deploy(businessArchive);

Final ProcessDefinitionUUID processUUID = processDefinition.getUUID();

Final QueryRuntimeAPI queryRuntimeAPI = AccessorUtil.getQueryRuntimeAPI ();

Map\<String, Object, Object\> myVariablesMapIn = new HashMap\<String, Object\>();

Final ProcessInstanceUUID instanceUUID = AccessorUtil.getRuntimeAPI(). instantiateProcess (processUUID, myVariablesMapIn);

// Getting a return variable of the execution flow of the BOS 5.6.2  
Object returnTmp = queryRuntimeAPI.getProcessInstanceVariable(instanceUUID, “nameMyVariableReturn”);

My doubt is that the BOS version 6.3.1 no longer the API (QueryRuntimeAPI and ProcessInstanceUUID) and would need to know how to adapt this new API.

---

<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:** [24 June 2014 15:48 UTC](https://community.ofelia.com/t/migrate-bos-5-6-2-to-6-3-0/4699/4 "2014-06-24T15:48:32Z")

</div>

Hi,  
Yes, in V6 the API has changed. You can take a look at the example on how to pass a list of variables.  
[http://documentation.bonitasoft.com/create-process-instance-and-set-variables-0](http://documentation.bonitasoft.com/create-process-instance-and-set-variables-0)  
Also, have a look at the overall engine API overview:  
[http://documentation.bonitasoft.com/development-overview-1](http://documentation.bonitasoft.com/development-overview-1)

Hope this helps.  
Ronak
