Java Code Examples for org.flowable.bpmn.model.BpmnModel#getProcess()
The following examples show how to use
org.flowable.bpmn.model.BpmnModel#getProcess() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PoolDataObjectTest.java From flowable-engine with Apache License 2.0 | 6 votes |
private void validateModel(BpmnModel model) { String idPool = "pool1"; String idProcess = "process_pool1"; assertThat(model.getPools()) .extracting(Pool::getId, Pool::getProcessRef, Pool::isExecutable) .containsExactly(tuple(idPool, idProcess, true)); Process process = model.getProcess(idPool); assertThat(process.getId()).isEqualTo(idProcess); assertThat(process.isExecutable()).isTrue(); List<ValuedDataObject> dataObjects = process.getDataObjects(); assertThat(dataObjects).hasSize(1); List<FlowableListener> executionListeners = process.getExecutionListeners(); assertThat(executionListeners).hasSize(1); assertThat(model.getSignal("shareniu_signal").getId()).isEqualTo("shareniu_signal"); }
Example 2
Source File: PoolsConverterTest.java From flowable-engine with Apache License 2.0 | 6 votes |
private void validateModel(BpmnModel model) { assertThat(model.getPools()) .extracting(Pool::getId, Pool::getName) .containsExactly(tuple("pool1", "Pool")); Pool pool = model.getPools().get(0); Process process = model.getProcess(pool.getId()); assertThat(process.getLanes()) .extracting(Lane::getId, Lane::getName) .containsExactly( tuple("lane1", "Lane 1"), tuple("lane2", "Lane 2") ); assertThat(process.getLanes().get(0).getFlowReferences()).hasSize(2); assertThat(process.getLanes().get(1).getFlowReferences()).hasSize(2); FlowElement flowElement = process.getFlowElement("flow1"); assertThat(flowElement).isInstanceOf(SequenceFlow.class); }
Example 3
Source File: NotExecutablePoolConverterTest.java From flowable-engine with Apache License 2.0 | 5 votes |
private void validateModel(BpmnModel model) { String idPool = "idPool"; String idProcess = "poolProcess"; assertThat(model.getPools()) .extracting(Pool::getId, Pool::getProcessRef, Pool::isExecutable) .containsExactly(tuple(idPool, idProcess, false)); Process process = model.getProcess(idPool); assertThat(process.getId()).isEqualTo(idProcess); assertThat(process.isExecutable()).isFalse(); assertThat(process.getLanes()).hasSize(3); }
Example 4
Source File: OtherToolImportConverterTest.java From flowable-engine with Apache License 2.0 | 5 votes |
private void validateModel(BpmnModel model) { org.flowable.bpmn.model.Process process = model.getProcess("_GQ4P0PUQEeK4teimjV5_yg"); assertThat(process).isNotNull(); assertThat(process.getId()).isEqualTo("Carpet_Plus"); assertThat(process.getName()).isEqualTo("Carpet-Plus"); assertThat(process.isExecutable()).isTrue(); }
Example 5
Source File: PoolConverterTest.java From flowable-engine with Apache License 2.0 | 4 votes |
private void validateModel(BpmnModel model) { String idPool = "idPool"; String idProcess = "poolProcess"; assertThat(model.getPools()) .extracting(Pool::getId, Pool::getProcessRef, Pool::isExecutable) .containsExactly(tuple(idPool, idProcess, true)); Process process = model.getProcess(idPool); assertThat(process.getId()).isEqualTo(idProcess); assertThat(process.isExecutable()).isTrue(); assertThat(process.getLanes()) .extracting(Lane::getId, Lane::getName) .containsExactly( tuple("idLane1", "Lane 1"), tuple("idLane2", "Lane 2"), tuple("idLane3", "Lane 3") ); Lane lane = process.getLanes().get(0); assertThat(lane.getFlowReferences()).hasSize(7); assertThat(lane.getFlowReferences()) .contains("startevent", "usertask1", "usertask6", "endevent"); lane = process.getLanes().get(1); assertThat(lane.getFlowReferences()).hasSize(4); assertThat(lane.getFlowReferences()) .contains("usertask2", "usertask5"); lane = process.getLanes().get(2); assertThat(lane.getFlowReferences()).hasSize(4); assertThat(lane.getFlowReferences()) .contains("usertask3", "usertask4"); assertThat(process.getFlowElement("startevent", true)).isNotNull(); assertThat(process.getFlowElement("usertask1", true)).isNotNull(); assertThat(process.getFlowElement("usertask2", true)).isNotNull(); assertThat(process.getFlowElement("usertask3", true)).isNotNull(); assertThat(process.getFlowElement("usertask4", true)).isNotNull(); assertThat(process.getFlowElement("usertask5", true)).isNotNull(); assertThat(process.getFlowElement("usertask6", true)).isNotNull(); assertThat(process.getFlowElement("endevent", true)).isNotNull(); assertThat(process.getFlowElement("flow1", true)).isNotNull(); assertThat(process.getFlowElement("flow2", true)).isNotNull(); assertThat(process.getFlowElement("flow3", true)).isNotNull(); assertThat(process.getFlowElement("flow4", true)).isNotNull(); assertThat(process.getFlowElement("flow5", true)).isNotNull(); assertThat(process.getFlowElement("flow6", true)).isNotNull(); assertThat(process.getFlowElement("flow7", true)).isNotNull(); }