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:
-
Final LoginAPI loginAPI TenantAPIAccessor.getLoginAPI = ();
-
APISession sessionAPI = loginAPI.login (“install”, “install”);
-
System.out.println (“Sucess”);
-
ProcessAPI processAPI = TenantAPIAccessor.getProcessAPI (sessionAPI);
-
System.out.println (“processAPI create”);
-
BusinessArchive businessArchive = null;
-
String pathBarFile = “D: \ \ TesteBonita6 \ \ ComparacaoValores.bos”;
/ / Deploy the bar file
8) File fileBarTmp = new File (pathBarFile);
- 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.
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
After that change line #7 to String pathBarFile = “D: \ \ TesteBonita6 \ \ ComparacaoValores.bar”
HTH
Ronak
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.
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
Also, have a look at the overall engine API overview:
http://documentation.bonitasoft.com/development-overview-1
Hope this helps.
Ronak