# Create BAR file and deploy programmatically

**URL:** <https://forum.flowable.org/t/create-bar-file-and-deploy-programmatically/4841>\
**Category:** Flowable Engine\
**Created:** [November 8, 2019, 7:26pm UTC](https://forum.flowable.org/t/create-bar-file-and-deploy-programmatically/4841 "2019-11-08T19:26:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![datsabk](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/datsabk/32/1443_2.png) [@datsabk](https://forum.flowable.org/u/datsabk)\
**Post date:** [November 8, 2019, 7:26pm UTC](https://forum.flowable.org/t/create-bar-file-and-deploy-programmatically/4841/1 "2019-11-08T19:26:58Z")

</div>

Hello,

I am trying to dynamically generate the workflow file for Flowable and deploy it on the go.

There are two challenges:

1. Create BAR file to package the XML that is generated
2. Deploying it dynamically.

Has anyone ever tried this? If yes, could you please help or suggest an alternative

---

<div class="post-metadata">

**Author:** ![shashikant-sharma](https://avatars.discourse-cdn.com/v4/letter/s/67e7ee/32.png) [@shashikant-sharma](https://forum.flowable.org/u/shashikant-sharma)\
**Post date:** [November 14, 2019, 6:29am UTC](https://forum.flowable.org/t/create-bar-file-and-deploy-programmatically/4841/2 "2019-11-14T06:29:38Z")

</div>

> [@datsabk](#):
>
> If yes, could you please help or suggest an alternative

Create a Bar file and deploy it using flowable Rest API -http://{your-app-domain}/app-api/app-repository/deployments

---

<div class="post-metadata">

**Author:** ![filiphr](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/filiphr/32/315_2.png) [@filiphr](https://forum.flowable.org/u/filiphr)\
**Post date:** [November 14, 2019, 7:42am UTC](https://forum.flowable.org/t/create-bar-file-and-deploy-programmatically/4841/3 "2019-11-14T07:42:53Z")

</div>

@datsabk what do you mean with dynamically?

In case you mean programatically, then I don’t really see why you need the BAR file?

You can always get a hold of an [`AppDeploymentBuilder`](https://github.com/flowable/flowable-engine/blob/master/modules/flowable-app-engine-api/src/main/java/org/flowable/app/api/repository/AppDeploymentBuilder.java) or [`DeploymentBuilder`](https://github.com/flowable/flowable-engine/blob/master/modules/flowable-engine/src/main/java/org/flowable/engine/repository/DeploymentBuilder.java) and add the bytes (XML) manually. With the Process DeploymentBuilder you can even add a `BpmnModel` (the process Java representation) manually.

Cheers,  
Filip
