Search in sources :

Example 1 with RootElement

use of io.camunda.zeebe.model.bpmn.instance.RootElement in project zeebe by camunda.

the class ProcessTest method shouldImportProcess.

@Test
@BpmnModelResource
public void shouldImportProcess() {
    final ModelElementInstance modelElementById = bpmnModelInstance.getModelElementById("exampleProcessId");
    assertThat(modelElementById).isNotNull();
    final Collection<RootElement> rootElements = bpmnModelInstance.getDefinitions().getRootElements();
    assertThat(rootElements).hasSize(1);
    final io.camunda.zeebe.model.bpmn.instance.Process process = (Process) rootElements.iterator().next();
    assertThat(process.getId()).isEqualTo("exampleProcessId");
    assertThat(process.getName()).isNull();
    assertThat(process.getProcessType()).isEqualTo(ProcessType.None);
    assertThat(process.isExecutable()).isFalse();
    assertThat(process.isClosed()).isFalse();
}
Also used : RootElement(io.camunda.zeebe.model.bpmn.instance.RootElement) Process(io.camunda.zeebe.model.bpmn.instance.Process) ModelElementInstance(org.camunda.bpm.model.xml.instance.ModelElementInstance) Process(io.camunda.zeebe.model.bpmn.instance.Process) BpmnModelResource(io.camunda.zeebe.model.bpmn.util.BpmnModelResource) Test(org.junit.Test)

Example 2 with RootElement

use of io.camunda.zeebe.model.bpmn.instance.RootElement in project zeebe by zeebe-io.

the class ProcessTest method shouldImportProcess.

@Test
@BpmnModelResource
public void shouldImportProcess() {
    final ModelElementInstance modelElementById = bpmnModelInstance.getModelElementById("exampleProcessId");
    assertThat(modelElementById).isNotNull();
    final Collection<RootElement> rootElements = bpmnModelInstance.getDefinitions().getRootElements();
    assertThat(rootElements).hasSize(1);
    final io.camunda.zeebe.model.bpmn.instance.Process process = (Process) rootElements.iterator().next();
    assertThat(process.getId()).isEqualTo("exampleProcessId");
    assertThat(process.getName()).isNull();
    assertThat(process.getProcessType()).isEqualTo(ProcessType.None);
    assertThat(process.isExecutable()).isFalse();
    assertThat(process.isClosed()).isFalse();
}
Also used : RootElement(io.camunda.zeebe.model.bpmn.instance.RootElement) Process(io.camunda.zeebe.model.bpmn.instance.Process) ModelElementInstance(org.camunda.bpm.model.xml.instance.ModelElementInstance) Process(io.camunda.zeebe.model.bpmn.instance.Process) BpmnModelResource(io.camunda.zeebe.model.bpmn.util.BpmnModelResource) Test(org.junit.Test)

Example 3 with RootElement

use of io.camunda.zeebe.model.bpmn.instance.RootElement in project zeebe by camunda-cloud.

the class ProcessTest method shouldImportProcess.

@Test
@BpmnModelResource
public void shouldImportProcess() {
    final ModelElementInstance modelElementById = bpmnModelInstance.getModelElementById("exampleProcessId");
    assertThat(modelElementById).isNotNull();
    final Collection<RootElement> rootElements = bpmnModelInstance.getDefinitions().getRootElements();
    assertThat(rootElements).hasSize(1);
    final io.camunda.zeebe.model.bpmn.instance.Process process = (Process) rootElements.iterator().next();
    assertThat(process.getId()).isEqualTo("exampleProcessId");
    assertThat(process.getName()).isNull();
    assertThat(process.getProcessType()).isEqualTo(ProcessType.None);
    assertThat(process.isExecutable()).isFalse();
    assertThat(process.isClosed()).isFalse();
}
Also used : RootElement(io.camunda.zeebe.model.bpmn.instance.RootElement) Process(io.camunda.zeebe.model.bpmn.instance.Process) ModelElementInstance(org.camunda.bpm.model.xml.instance.ModelElementInstance) Process(io.camunda.zeebe.model.bpmn.instance.Process) BpmnModelResource(io.camunda.zeebe.model.bpmn.util.BpmnModelResource) Test(org.junit.Test)

Aggregations

Process (io.camunda.zeebe.model.bpmn.instance.Process)3 RootElement (io.camunda.zeebe.model.bpmn.instance.RootElement)3 BpmnModelResource (io.camunda.zeebe.model.bpmn.util.BpmnModelResource)3 ModelElementInstance (org.camunda.bpm.model.xml.instance.ModelElementInstance)3 Test (org.junit.Test)3