@Test public void testGenerateProcessForm() { generator.generateProcessForm(diagram); verify(generator, times(1)).createFormForModel(formModelArgumentCaptor.capture(), any()); verify(formDefinitionSerializer, times(1)).serialize(formDefinitionArgumentCaptor.capture()); verify(ioService, times(1)).createFile(any()); verify(ioService, times(1)).write(any(), anyString()); JBPMFormModel formModel = formModelArgumentCaptor.getValue(); Assertions.assertThat(formModel) .isNotNull() .isInstanceOf(BusinessProcessFormModel.class); checkProcessFormGenerated((BusinessProcessFormModel) formModel, formDefinitionArgumentCaptor.getValue()); }
@Override public void generateProcessForm(Diagram diagram) { try { LOGGER.finest("Generating form for process "); final Definitions definitions = toDefinitions(diagram); final Path path = diagram.getMetadata().getPath(); final BusinessProcessFormModel formModel = bpmnFormModelGenerator.generateProcessFormModel(definitions, path); createFormForModel(formModel, Paths.convert(path)); } catch (Exception ex) { LOGGER.severe("Error generating process form"); throw new RuntimeException(ex); } }
FormDefinitionGeneratorImpl implements FormDefinitionGenerator { @Override public void generateProcessForm(Diagram diagram) { try { LOGGER.finest("Generating form for process "); final Definitions definitions = toDefinitions(diagram); final Path path = diagram.getMetadata().getPath(); final BusinessProcessFormModel formModel = bpmnFormModelGenerator.generateProcessFormModel(definitions, path); createFormForModel(formModel, Paths.convert(path)); } catch (Exception ex) { LOGGER.severe("Error generating process form"); throw new RuntimeException(ex); } } }
FormDefinitionGeneratorImpl implements FormDefinitionGenerator { @Override public void generateProcessForm(Diagram diagram) { try { LOGGER.finest("Generating form for process "); final Definitions definitions = toDefinitions(diagram); final Path path = diagram.getMetadata().getPath(); final BusinessProcessFormModel formModel = bpmnFormModelGenerator.generateProcessFormModel(definitions, path); createFormForModel(formModel, Paths.convert(path)); } catch (Exception ex) { LOGGER.severe("Error generating process form"); throw new RuntimeException(ex); } } @Inject  FormDefinitionGeneratorImpl(FormGenerationModelProviders providers,
                                       @Named("ioStrategy") final IOService ioService,
                                       final BPMNFormModelGenerator bpmnFormModelGenerator,
                                       final FormDefinitionSerializer serializer,
                                       @Authoring final BPMNFormGeneratorService<Path> bpmnFormGeneratorService); }
FormDefinitionGeneratorImpl implements FormDefinitionGenerator { @Override public void generateProcessForm(Diagram diagram) { try { LOGGER.finest("Generating form for process "); final Definitions definitions = toDefinitions(diagram); final Path path = diagram.getMetadata().getPath(); final BusinessProcessFormModel formModel = bpmnFormModelGenerator.generateProcessFormModel(definitions, path); createFormForModel(formModel, Paths.convert(path)); } catch (Exception ex) { LOGGER.severe("Error generating process form"); throw new RuntimeException(ex); } } @Inject  FormDefinitionGeneratorImpl(FormGenerationModelProviders providers,
                                       @Named("ioStrategy") final IOService ioService,
                                       final BPMNFormModelGenerator bpmnFormModelGenerator,
                                       final FormDefinitionSerializer serializer,
                                       @Authoring final BPMNFormGeneratorService<Path> bpmnFormGeneratorService); @Override void generateProcessForm(Diagram diagram); @Override void generateSelectedForms(Diagram diagram, String... taskIds); @Override void generateAllForms(Diagram diagram); void createFormForModel(JBPMFormModel formModel, org.uberfire.java.nio.file.Path path); }
FormDefinitionGeneratorImpl implements FormDefinitionGenerator { @Override public void generateProcessForm(Diagram diagram) { try { LOGGER.finest("Generating form for process "); final Definitions definitions = toDefinitions(diagram); final Path path = diagram.getMetadata().getPath(); final BusinessProcessFormModel formModel = bpmnFormModelGenerator.generateProcessFormModel(definitions, path); createFormForModel(formModel, Paths.convert(path)); } catch (Exception ex) { LOGGER.severe("Error generating process form"); throw new RuntimeException(ex); } } @Inject  FormDefinitionGeneratorImpl(FormGenerationModelProviders providers,
                                       @Named("ioStrategy") final IOService ioService,
                                       final BPMNFormModelGenerator bpmnFormModelGenerator,
                                       final FormDefinitionSerializer serializer,
                                       @Authoring final BPMNFormGeneratorService<Path> bpmnFormGeneratorService); @Override void generateProcessForm(Diagram diagram); @Override void generateSelectedForms(Diagram diagram, String... taskIds); @Override void generateAllForms(Diagram diagram); void createFormForModel(JBPMFormModel formModel, org.uberfire.java.nio.file.Path path);  }