Deploy BAR with java api, DMN does not get deployed

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

Try deploying using the AppRepositoryService instead:

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

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

Thanks for your help.

Todd