# Deploy BAR with java api, DMN does not get deployed

**URL:** <https://forum.flowable.org/t/deploy-bar-with-java-api-dmn-does-not-get-deployed/5402>\
**Category:** Uncategorized\
**Created:** [February 7, 2020, 7:13pm UTC](https://forum.flowable.org/t/deploy-bar-with-java-api-dmn-does-not-get-deployed/5402 "2020-02-07T19:13:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tjmac](https://avatars.discourse-cdn.com/v4/letter/t/bc8723/32.png) [@tjmac](https://forum.flowable.org/u/tjmac)\
**Post date:** [February 7, 2020, 7:13pm UTC](https://forum.flowable.org/t/deploy-bar-with-java-api-dmn-does-not-get-deployed/5402/1 "2020-02-07T19:13:54Z")

</div>

I have a BAR file that contains a BPMN and DMN files. The bar was created and exported from Flowable Web Modeler.

API used to deploy:  
ZipInputStream inputStream = new ZipInputStream(multipartFile.inputStream);  
deployment = repositoryService.createDeployment().  
addZipInputStream(inputStream).deploy()

The BMPN deploys and a deployment ID is returned from the deploy api call. I can query ACT\_RE\_DEPLOYMENT with the ID and get expected result. But the ACT\_DMN\_DEPLOYMENT never gets entry for the DMN resource. Then the BPMN process fails as it cannot find the DMN.

Should the deployment code I listed above deploy both?

Regards,

Todd

---

<div class="post-metadata">

**Author:** ![wwitt](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/wwitt/32/706_2.png) [@wwitt](https://forum.flowable.org/u/wwitt)\
**Post date:** [February 12, 2020, 9:46pm UTC](https://forum.flowable.org/t/deploy-bar-with-java-api-dmn-does-not-get-deployed/5402/2 "2020-02-12T21:46:25Z")

</div>

Try deploying using the AppRepositoryService instead:

```auto
        final InputStream inputStream = new ClassPathResource("/App.zip").getInputStream();
        appRepositoryService
                .createDeployment()
                .addZipInputStream(new ZipInputStream(inputStream))
                .name("App")
                .deploy();

```

---

<div class="post-metadata">

**Author:** ![tjmac](https://avatars.discourse-cdn.com/v4/letter/t/bc8723/32.png) [@tjmac](https://forum.flowable.org/u/tjmac)\
**Post date:** [February 13, 2020, 1:11pm UTC](https://forum.flowable.org/t/deploy-bar-with-java-api-dmn-does-not-get-deployed/5402/3 "2020-02-13T13:11:09Z")

</div>

> [@wwitt](#):
>
> AppRepositoryService

The AppRepostitoryService works as expected. Deploys both BPMN and DMN with correlation parent id.

Thanks for your help.

Todd
