use of org.camunda.bpm.model.bpmn.instance.bpmndi.BpmnEdge in project camunda-bpm-platform by camunda.
the class ModifiableBpmnModelInstance method removeBpmnEdge.
protected void removeBpmnEdge(BaseElement element) {
Collection<BpmnEdge> edges = modelInstance.getModelElementsByType(BpmnEdge.class);
for (BpmnEdge edge : edges) {
if (edge.getBpmnElement().equals(element)) {
ModelElementInstance bpmnPlane = edge.getParentElement();
bpmnPlane.removeChildElement(edge);
break;
}
}
}
use of org.camunda.bpm.model.bpmn.instance.bpmndi.BpmnEdge in project camunda-bpmn-model by camunda.
the class DiGeneratorForSequenceFlowsTest method assertBpmnEdgeExists.
protected void assertBpmnEdgeExists(String id) {
BpmnEdge edge = findBpmnEdge(id);
assertNotNull(edge);
}
use of org.camunda.bpm.model.bpmn.instance.bpmndi.BpmnEdge in project camunda-bpmn-model by camunda.
the class DiGeneratorForSequenceFlowsTest method shouldGenerateEdgesWhenUsingConnectTo.
@Test
public void shouldGenerateEdgesWhenUsingConnectTo() {
ProcessBuilder builder = Bpmn.createExecutableProcess();
instance = builder.startEvent(START_EVENT_ID).sequenceFlowId("s1").exclusiveGateway("gateway").sequenceFlowId("s2").userTask(USER_TASK_ID).sequenceFlowId("s3").endEvent(END_EVENT_ID).moveToNode(USER_TASK_ID).sequenceFlowId("s4").connectTo("gateway").done();
Collection<BpmnEdge> allEdges = instance.getModelElementsByType(BpmnEdge.class);
assertEquals(4, allEdges.size());
assertBpmnEdgeExists("s1");
assertBpmnEdgeExists("s2");
assertBpmnEdgeExists("s3");
assertBpmnEdgeExists("s4");
}
use of org.camunda.bpm.model.bpmn.instance.bpmndi.BpmnEdge in project camunda-bpmn-model by camunda.
the class DiGeneratorForSequenceFlowsTest method shouldGenerateEdgesWhenUsingMoveToActivity.
@Test
public void shouldGenerateEdgesWhenUsingMoveToActivity() {
ProcessBuilder builder = Bpmn.createExecutableProcess();
instance = builder.startEvent(START_EVENT_ID).sequenceFlowId("s1").exclusiveGateway().sequenceFlowId("s2").userTask(USER_TASK_ID).sequenceFlowId("s3").endEvent("e1").moveToActivity(USER_TASK_ID).sequenceFlowId("s4").endEvent("e2").done();
Collection<BpmnEdge> allEdges = instance.getModelElementsByType(BpmnEdge.class);
assertEquals(4, allEdges.size());
assertBpmnEdgeExists("s1");
assertBpmnEdgeExists("s2");
assertBpmnEdgeExists("s3");
assertBpmnEdgeExists("s4");
}
use of org.camunda.bpm.model.bpmn.instance.bpmndi.BpmnEdge in project camunda-bpmn-model by camunda.
the class DiGeneratorForSequenceFlowsTest method shouldGenerateEdgeForSequenceFlow.
@Test
public void shouldGenerateEdgeForSequenceFlow() {
ProcessBuilder builder = Bpmn.createExecutableProcess();
instance = builder.startEvent(START_EVENT_ID).sequenceFlowId(SEQUENCE_FLOW_ID).endEvent(END_EVENT_ID).done();
Collection<BpmnEdge> allEdges = instance.getModelElementsByType(BpmnEdge.class);
assertEquals(1, allEdges.size());
assertBpmnEdgeExists(SEQUENCE_FLOW_ID);
}
Aggregations