fixed flakey task model test

This commit is contained in:
jasquat 2023-12-20 13:54:20 -05:00
parent e161b23a30
commit 06bf1f24df
No known key found for this signature in database
2 changed files with 7 additions and 5 deletions

View File

@ -9,7 +9,7 @@
<bpmn:incoming>Flow_1g3dpd7</bpmn:incoming>
<bpmn:outgoing>Flow_0qdgvah</bpmn:outgoing>
</bpmn:callActivity>
<bpmn:sequenceFlow id="Flow_0qdgvah" sourceRef="Activity_12zat0d" targetRef="Activity_0rkbhbz" />
<bpmn:sequenceFlow id="Flow_0qdgvah" sourceRef="Activity_12zat0d" targetRef="Level1_CallLevel_2B" />
<bpmn:endEvent id="Event_18dla68">
<bpmn:documentation># Main Workflow
Hello {{my_other_var}}
@ -17,8 +17,8 @@
</bpmn:documentation>
<bpmn:incoming>Flow_0upce00</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_0upce00" sourceRef="Activity_0rkbhbz" targetRef="Event_18dla68" />
<bpmn:callActivity id="Activity_0rkbhbz" name="call level 2B" calledElement="Level2b">
<bpmn:sequenceFlow id="Flow_0upce00" sourceRef="Level1_CallLevel_2B" targetRef="Event_18dla68" />
<bpmn:callActivity id="Level1_CallLevel_2B" name="call level 2B" calledElement="Level2b">
<bpmn:incoming>Flow_0qdgvah</bpmn:incoming>
<bpmn:outgoing>Flow_0upce00</bpmn:outgoing>
</bpmn:callActivity>
@ -35,7 +35,7 @@
<bpmndi:BPMNShape id="Event_18dla68_di" bpmnElement="Event_18dla68">
<dc:Bounds x="702" y="99" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0jddvat_di" bpmnElement="Activity_0rkbhbz">
<bpmndi:BPMNShape id="Activity_0jddvat_di" bpmnElement="Level1_CallLevel_2B">
<dc:Bounds x="420" y="77" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_1g3dpd7_di" bpmnElement="Flow_1g3dpd7">

View File

@ -97,7 +97,9 @@ class TestTaskService(BaseTest):
assert len(bpmn_processes) == 2
assert len(task_models) == 2
assert bpmn_processes[0].bpmn_process_definition.bpmn_identifier == "Level2b"
assert task_models[0].task_definition.bpmn_identifier == "level2b_second_call"
# either of these is valid since we are not pinning the task model query to one or the other
# and they are both call activities and not the top level process
assert task_models[0].task_definition.bpmn_identifier in ["level2b_second_call", "Level1_CallLevel_2B"]
task_model_level_3 = (
TaskModel.query.join(TaskDefinitionModel).filter(TaskDefinitionModel.bpmn_identifier == "level_3_script_task").first()