0

I need an example of usign FormEngine. To be more especific.... I'm executing code below - but there’s no forms found in my BAR file :( The BAR file was exported from Flowable Modeler and it contains one form and one process and app. Maybe there's other way to deploy and obtain forms...?

RepositoryService repositoryService = processEngine.getRepositoryService();
FormRepositoryService formRepositoryService =  formEngine.getFormRepositoryService();
File file = new File(path);


ZipInputStream inputStream = new ZipInputStream(new FileInputStream(path));
String idDeployParent = repositoryService.createDeployment()
                                         .name(file.getName())
                                         .addZipInputStream(inputStream)
                                         .deploy()
                                         .getId();

DeploymentEntity deploymentEntity = (DeploymentEntity) repositoryService.createDeploymentQuery().list().get(0);

formRepositoryService.createDeployment()
                     .name(file.getName())
                     .parentDeploymentId(idDeployParent)
                     .deploy();

System.out.println(" FORMS FOUND: " + formRepositoryService.createFormDefinitionQuery().list().size());
barbsan
  • 3,418
  • 11
  • 21
  • 28
Ivan
  • 1
  • 3
  • Which version of Flowable are you using? If you unpackage the bar file (rename it to end with .zip) does it contain the form? – Filip Jan 25 '19 at 08:35
  • the latest version -6.4.1 - . Yes, it contain the .form file , but I can't get it and read – Ivan Jan 28 '19 at 14:08
  • I can read the name of every file into the BAR file using this(view code) but not into the form file https://codeshare.io/5wYzvp – Ivan Jan 28 '19 at 17:13
  • @Filip any idea? thanks in advice – Ivan Feb 01 '19 at 19:48

0 Answers0