Ticket #105. Verify End Event Documentation. Added explicit call to _process_documentation at end of crc.services.workflow_service.test_spec for the end event
This commit is contained in:
parent
a6f9e27ca3
commit
73e01b347b
|
@ -116,6 +116,7 @@ class WorkflowService(object):
|
||||||
raise ApiError.from_workflow_exception("workflow_validation_exception", str(we), we)
|
raise ApiError.from_workflow_exception("workflow_validation_exception", str(we), we)
|
||||||
|
|
||||||
WorkflowService.delete_test_data()
|
WorkflowService.delete_test_data()
|
||||||
|
WorkflowService._process_documentation(processor.bpmn_workflow.last_task.parent.parent)
|
||||||
return processor.bpmn_workflow.last_task.data
|
return processor.bpmn_workflow.last_task.data
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_00j2iu5" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.5.0">
|
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_00j2iu5" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.2.0">
|
||||||
<bpmn:process id="Process_1gmf4la" isExecutable="true">
|
<bpmn:process id="Process_1gmf4la" isExecutable="true">
|
||||||
<bpmn:documentation />
|
<bpmn:documentation />
|
||||||
<bpmn:startEvent id="StartEvent_1">
|
<bpmn:startEvent id="StartEvent_1">
|
||||||
|
@ -70,28 +70,28 @@ Question not presented
|
||||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1gmf4la">
|
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1gmf4la">
|
||||||
<bpmndi:BPMNEdge id="Flow_0m7unlb_di" bpmnElement="Flow_0m7unlb">
|
<bpmndi:BPMNEdge id="Flow_0m7unlb_di" bpmnElement="Flow_0m7unlb">
|
||||||
<di:waypoint x="570" y="117" />
|
<di:waypoint x="520" y="117" />
|
||||||
<di:waypoint x="672" y="117" />
|
<di:waypoint x="622" y="117" />
|
||||||
</bpmndi:BPMNEdge>
|
</bpmndi:BPMNEdge>
|
||||||
<bpmndi:BPMNEdge id="SequenceFlow_18nr0gf_di" bpmnElement="SequenceFlow_18nr0gf">
|
<bpmndi:BPMNEdge id="SequenceFlow_18nr0gf_di" bpmnElement="SequenceFlow_18nr0gf">
|
||||||
<di:waypoint x="410" y="117" />
|
<di:waypoint x="360" y="117" />
|
||||||
<di:waypoint x="470" y="117" />
|
<di:waypoint x="420" y="117" />
|
||||||
</bpmndi:BPMNEdge>
|
</bpmndi:BPMNEdge>
|
||||||
<bpmndi:BPMNEdge id="SequenceFlow_1fmyo77_di" bpmnElement="SequenceFlow_1fmyo77">
|
<bpmndi:BPMNEdge id="SequenceFlow_1fmyo77_di" bpmnElement="SequenceFlow_1fmyo77">
|
||||||
<di:waypoint x="238" y="117" />
|
<di:waypoint x="188" y="117" />
|
||||||
<di:waypoint x="310" y="117" />
|
<di:waypoint x="260" y="117" />
|
||||||
</bpmndi:BPMNEdge>
|
</bpmndi:BPMNEdge>
|
||||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||||
<dc:Bounds x="202" y="99" width="36" height="36" />
|
<dc:Bounds x="152" y="99" width="36" height="36" />
|
||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
<bpmndi:BPMNShape id="ScriptTask_02924vs_di" bpmnElement="ScriptTask_02924vs">
|
<bpmndi:BPMNShape id="ScriptTask_02924vs_di" bpmnElement="ScriptTask_02924vs">
|
||||||
<dc:Bounds x="310" y="77" width="100" height="80" />
|
<dc:Bounds x="260" y="77" width="100" height="80" />
|
||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
<bpmndi:BPMNShape id="EndEvent_1qvyxg7_di" bpmnElement="EndEvent_1qvyxg7">
|
<bpmndi:BPMNShape id="EndEvent_1qvyxg7_di" bpmnElement="EndEvent_1qvyxg7">
|
||||||
<dc:Bounds x="672" y="99" width="36" height="36" />
|
<dc:Bounds x="622" y="99" width="36" height="36" />
|
||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
<bpmndi:BPMNShape id="Activity_19nawos_di" bpmnElement="Activity_FromIRB-API">
|
<bpmndi:BPMNShape id="Activity_19nawos_di" bpmnElement="Activity_FromIRB-API">
|
||||||
<dc:Bounds x="470" y="77" width="100" height="80" />
|
<dc:Bounds x="420" y="77" width="100" height="80" />
|
||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
</bpmndi:BPMNPlane>
|
</bpmndi:BPMNPlane>
|
||||||
</bpmndi:BPMNDiagram>
|
</bpmndi:BPMNDiagram>
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
from tests.base_test import BaseTest
|
||||||
|
from crc.services.workflow_service import WorkflowService
|
||||||
|
from crc.api.common import ApiError
|
||||||
|
from jinja2.exceptions import TemplateSyntaxError
|
||||||
|
|
||||||
|
|
||||||
|
class TestValidateEndEvent(BaseTest):
|
||||||
|
|
||||||
|
def test_validate_end_event(self):
|
||||||
|
|
||||||
|
error_string = """Error processing template for task EndEvent_1qvyxg7: expected token 'end of statement block', got '='"""
|
||||||
|
|
||||||
|
self.load_example_data()
|
||||||
|
spec_model = self.load_test_spec('verify_end_event')
|
||||||
|
try:
|
||||||
|
WorkflowService.test_spec(spec_model.id)
|
||||||
|
except ApiError as e:
|
||||||
|
self.assertEqual(str(e), error_string)
|
Loading…
Reference in New Issue