# Batch autodeploy bar file

**URL:** <https://community.ofelia.com/t/batch-autodeploy-bar-file/10002>\
**Category:** Q&A\
**Created:** [10 February 2020 13:15 UTC](https://community.ofelia.com/t/batch-autodeploy-bar-file/10002 "2020-02-10T13:15:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bastien.laurent\_1374](https://avatars.discourse-cdn.com/v4/letter/b/fbc32d/32.png) [@bastien.laurent\_1374](https://community.ofelia.com/u/bastien.laurent_1374)\
**Post date:** [10 February 2020 13:15 UTC](https://community.ofelia.com/t/batch-autodeploy-bar-file/10002/1 "2020-02-10T13:15:25Z")

</div>

Hello,  
I'm working on project that can be deployed each bar in a specific directory. But i need some clues.  
When i'm trying to deploy a bar file trough the Engine API, you need to create a 'BarResource'. In that bar resource, you need to add a ProcessDefinition, but, the only way to get that ( that i have found), it's to unzip bar file and parse 'process-design.xml'.  
  
It's possible to get all 'BarRessource' information without unzip all the bar files?  
  
Regards,

---

<div class="post-metadata">

**Author:** ![rtumminelli\_1394599](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/rtumminelli_1394599/32/1412_2.png) [@rtumminelli\_1394599](https://community.ofelia.com/u/rtumminelli_1394599)\
**Post date:** [12 February 2020 15:11 UTC](https://community.ofelia.com/t/batch-autodeploy-bar-file/10002/2 "2020-02-12T15:11:45Z")

</div>

I'm not 100% sure I understand your question. Are you just trying to deploy bar files through the Engine API?

This is the code I used in my project to programmatically deploy bar files:

```
BusinessArchive businessArchive = BusinessArchiveFactory.readBusinessArchive(barFile);
ProcessAPI processAPI = TenantAPIAccessor.getProcessAPI(session);
ProcessDefinition processDefinition = processAPI.deploy(businessArchive);
```

---

<div class="post-metadata">

**Author:** ![bastien.laurent\_1374](https://avatars.discourse-cdn.com/v4/letter/b/fbc32d/32.png) [@bastien.laurent\_1374](https://community.ofelia.com/u/bastien.laurent_1374)\
**Post date:** [13 February 2020 07:28 UTC](https://community.ofelia.com/t/batch-autodeploy-bar-file/10002/3 "2020-02-13T07:28:23Z")

</div>

That was exactly what i want to do !&nbsp;  
Thank,
