Search in sources :

Example 6 with JBPMProcessModel

use of org.kie.workbench.common.forms.jbpm.model.authoring.JBPMProcessModel in project kie-wb-common by kiegroup.

the class BPMFinderServiceImpl method parseToModel.

private JBPMProcessModel parseToModel(final Definitions definitions, final Path path) {
    BusinessProcessFormModel processFormModel = bpmnFormModelGenerator.generateProcessFormModel(definitions, path);
    List<TaskFormModel> taskModels = bpmnFormModelGenerator.generateTaskFormModels(definitions, path);
    return new JBPMProcessModel(processFormModel, taskModels);
}
Also used : JBPMProcessModel(org.kie.workbench.common.forms.jbpm.model.authoring.JBPMProcessModel) BusinessProcessFormModel(org.kie.workbench.common.forms.jbpm.model.authoring.process.BusinessProcessFormModel) TaskFormModel(org.kie.workbench.common.forms.jbpm.model.authoring.task.TaskFormModel)

Example 7 with JBPMProcessModel

use of org.kie.workbench.common.forms.jbpm.model.authoring.JBPMProcessModel in project kie-wb-common by kiegroup.

the class BPMFinderServiceImplTest method testFindProcess.

protected void testFindProcess(String processId, int expectedTasks) {
    JBPMProcessModel model = bpmFinderService.getModelForProcess(processId, currentModulePath);
    assertNotNull(model);
    assertNotNull(model.getProcessFormModel());
    assertEquals(processId, model.getProcessFormModel().getProcessId());
    assertEquals(expectedTasks, model.getTaskFormModels().size());
}
Also used : JBPMProcessModel(org.kie.workbench.common.forms.jbpm.model.authoring.JBPMProcessModel)

Aggregations

JBPMProcessModel (org.kie.workbench.common.forms.jbpm.model.authoring.JBPMProcessModel)7 TaskFormModel (org.kie.workbench.common.forms.jbpm.model.authoring.task.TaskFormModel)4 ArrayList (java.util.ArrayList)3 BusinessProcessFormModel (org.kie.workbench.common.forms.jbpm.model.authoring.process.BusinessProcessFormModel)3 PostConstruct (javax.annotation.PostConstruct)2 Collection (java.util.Collection)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Map (java.util.Map)1 Optional (java.util.Optional)1 Consumer (java.util.function.Consumer)1 Predicate (java.util.function.Predicate)1 Dependent (javax.enterprise.context.Dependent)1 Inject (javax.inject.Inject)1 Named (javax.inject.Named)1 Bpmn2Package (org.eclipse.bpmn2.Bpmn2Package)1 Definitions (org.eclipse.bpmn2.Definitions)1 DocumentRoot (org.eclipse.bpmn2.DocumentRoot)1 Process (org.eclipse.bpmn2.Process)1 Bpmn2ResourceFactoryImpl (org.eclipse.bpmn2.util.Bpmn2ResourceFactoryImpl)1