@Test public void testFindAllProcessFormModels() { List<JBPMProcessModel> models = bpmFinderService.getAvailableProcessModels(currentModulePath); assertNotNull(models); assertEquals(EXPECTED_PROCESSES, models.size()); models.forEach(model -> { assertNotNull(model.getProcessFormModel()); if (model.getProcessFormModel().getProcessId().equals(PROCESS_WITH_ALL_VARIABLES_ID)) { assertEquals(PROCESS_WITH_ALL_VARIABLES_TASKS, model.getTaskFormModels().size()); } else if (model.getProcessFormModel().getProcessId().equals(PROCESS_WITHOUT_VARIABLES_ID)) { assertEquals(PROCESS_WITHOUT_VARIABLES_TASKS, model.getTaskFormModels().size()); } else if (model.getProcessFormModel().getProcessId().equals(PROCESS_WITH_SHARED_FORMS_ID)) { assertEquals(PROCESS_WITH_SHARED_FORMS_TASKS, model.getTaskFormModels().size()); } else if (model.getProcessFormModel().getProcessId().equals(PROCESS_WITH_SHARED_FORMS_WRONG_MAPPINGS_ID)) { assertEquals(PROCESS_WITH_SHARED_FORMS_WRONG_MAPPINGS_TASKS, model.getTaskFormModels().size()); } else if (model.getProcessFormModel().getProcessId().equals(PROCESS_WITH_WRONG_TYPES)) { assertEquals(PROCESS_WITH_WRONG_TYPES_TASKS, model.getTaskFormModels().size()); } else { fail("Unexpected process: " + model.getProcessFormModel().getProcessId()); } }); }
@Override public List<JBPMProcessModel> getAvailableProcessModels(final Path path) { return findModels(path, definitions -> true) .collect(Collectors.toList()); }
BPMFinderServiceImpl implements BPMFinderService { @Override public List<JBPMProcessModel> getAvailableProcessModels(final Path path) { return findModels(path, definitions -> true) .collect(Collectors.toList()); } }
BPMFinderServiceImpl implements BPMFinderService { @Override public List<JBPMProcessModel> getAvailableProcessModels(final Path path) { return findModels(path, definitions -> true) .collect(Collectors.toList()); } @Inject  BPMFinderServiceImpl(@Named("ioStrategy") IOService ioService,
                                KieModuleService moduleService,
                                BPMNFormModelGenerator bpmnFormModelGenerator); }
BPMFinderServiceImpl implements BPMFinderService { @Override public List<JBPMProcessModel> getAvailableProcessModels(final Path path) { return findModels(path, definitions -> true) .collect(Collectors.toList()); } @Inject  BPMFinderServiceImpl(@Named("ioStrategy") IOService ioService,
                                KieModuleService moduleService,
                                BPMNFormModelGenerator bpmnFormModelGenerator); @Override List<JBPMProcessModel> getAvailableProcessModels(final Path path); @Override JBPMProcessModel getModelForProcess(final String processId, final Path path); }
BPMFinderServiceImpl implements BPMFinderService { @Override public List<JBPMProcessModel> getAvailableProcessModels(final Path path) { return findModels(path, definitions -> true) .collect(Collectors.toList()); } @Inject  BPMFinderServiceImpl(@Named("ioStrategy") IOService ioService,
                                KieModuleService moduleService,
                                BPMNFormModelGenerator bpmnFormModelGenerator); @Override List<JBPMProcessModel> getAvailableProcessModels(final Path path); @Override JBPMProcessModel getModelForProcess(final String processId, final Path path);  }