Test for creating dmn from spreadsheet
This commit is contained in:
parent
deb16740f6
commit
e8ea9776a5
|
@ -0,0 +1,61 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<definitions xmlns="http://www.omg.org/spec/DMN/20151101/dmn.xsd" xmlns:biodi="http://bpmn.io/schema/dmn/biodi/1.0" id="Definitions_2595e9e" name="DRD" namespace="http://camunda.org/schema/1.0/dmn" exporter="Camunda Modeler" exporterVersion="3.5.0">
|
||||
<decision id="budget" name="Budget">
|
||||
<extensionElements>
|
||||
<biodi:bounds x="540" y="160" width="180" height="80" />
|
||||
</extensionElements>
|
||||
<decisionTable id="decisionTable_1">
|
||||
<input id="input_1" label="Budget Response">
|
||||
<inputExpression id="inputExpression_1" typeRef="boolean">
|
||||
<text>ds.Budget</text>
|
||||
</inputExpression>
|
||||
</input>
|
||||
<output id="output_1" label="Menu Status" name="budget.status" typeRef="string" />
|
||||
<output id="OutputClause_0q142bx" label="Menu Message" name="budget.message" typeRef="string" />
|
||||
<rule id="DecisionRule_0kslxw5">
|
||||
<inputEntry id="UnaryTests_0yvim62">
|
||||
<text>"true"</text>
|
||||
</inputEntry>
|
||||
<outputEntry id="LiteralExpression_1pzdptj">
|
||||
<text>"required"</text>
|
||||
</outputEntry>
|
||||
<outputEntry id="LiteralExpression_1mutwat">
|
||||
<text>"This workflow is required because you answered Yes to 'Is there a budget document for this study?' in the Core Info workflow"</text>
|
||||
</outputEntry>
|
||||
</rule>
|
||||
<rule id="DecisionRule_1ypfe1x">
|
||||
<inputEntry id="UnaryTests_0dryb9d">
|
||||
<text>"false"</text>
|
||||
</inputEntry>
|
||||
<outputEntry id="LiteralExpression_1m8f9v6">
|
||||
<text>"hidden"</text>
|
||||
</outputEntry>
|
||||
<outputEntry id="LiteralExpression_02ilkwo">
|
||||
<text></text>
|
||||
</outputEntry>
|
||||
</rule>
|
||||
<rule id="DecisionRule_1vjji8d">
|
||||
<inputEntry id="UnaryTests_0no4szj">
|
||||
<text></text>
|
||||
</inputEntry>
|
||||
<outputEntry id="LiteralExpression_02yu1ij">
|
||||
<text>"disabled"</text>
|
||||
</outputEntry>
|
||||
<outputEntry id="LiteralExpression_1y7hl8n">
|
||||
<text>"This workflow is disabled until you complete the Core Info workflow"</text>
|
||||
</outputEntry>
|
||||
</rule>
|
||||
<rule id="DecisionRule_0zhwugv">
|
||||
<inputEntry id="UnaryTests_0czlqx2">
|
||||
<text></text>
|
||||
</inputEntry>
|
||||
<outputEntry id="LiteralExpression_0litra5">
|
||||
<text>"hidden"</text>
|
||||
</outputEntry>
|
||||
<outputEntry id="LiteralExpression_1cufczh">
|
||||
<text></text>
|
||||
</outputEntry>
|
||||
</rule>
|
||||
</decisionTable>
|
||||
</decision>
|
||||
</definitions>
|
|
@ -0,0 +1,53 @@
|
|||
<?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" id="Definitions_e098f1d" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.5.0">
|
||||
<bpmn:process id="Process_99c9791" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_1iv94or</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:sequenceFlow id="Flow_1iv94or" sourceRef="StartEvent_1" targetRef="Activity_1q248e0" />
|
||||
<bpmn:scriptTask id="Activity_1q248e0" name="SS to DMN">
|
||||
<bpmn:incoming>Flow_1iv94or</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_18sjqfa</bpmn:outgoing>
|
||||
<bpmn:script>result = dmn_from_spreadsheet()</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:sequenceFlow id="Flow_18sjqfa" sourceRef="Activity_1q248e0" targetRef="Activity_0ypr34l" />
|
||||
<bpmn:manualTask id="Activity_0ypr34l" name="Display Result">
|
||||
<bpmn:documentation># Result
|
||||
{{ result }}</bpmn:documentation>
|
||||
<bpmn:incoming>Flow_18sjqfa</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_03xp3kp</bpmn:outgoing>
|
||||
</bpmn:manualTask>
|
||||
<bpmn:endEvent id="Event_0fcuwnj">
|
||||
<bpmn:incoming>Flow_03xp3kp</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_03xp3kp" sourceRef="Activity_0ypr34l" targetRef="Event_0fcuwnj" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_99c9791">
|
||||
<bpmndi:BPMNEdge id="Flow_03xp3kp_di" bpmnElement="Flow_03xp3kp">
|
||||
<di:waypoint x="530" y="117" />
|
||||
<di:waypoint x="592" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_18sjqfa_di" bpmnElement="Flow_18sjqfa">
|
||||
<di:waypoint x="370" y="117" />
|
||||
<di:waypoint x="430" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_1iv94or_di" bpmnElement="Flow_1iv94or">
|
||||
<di:waypoint x="215" y="117" />
|
||||
<di:waypoint x="270" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_182oae9_di" bpmnElement="Activity_1q248e0">
|
||||
<dc:Bounds x="270" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_19m9fdz_di" bpmnElement="Activity_0ypr34l">
|
||||
<dc:Bounds x="430" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_0fcuwnj_di" bpmnElement="Event_0fcuwnj">
|
||||
<dc:Bounds x="592" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
|
@ -0,0 +1,10 @@
|
|||
from tests.base_test import BaseTest
|
||||
|
||||
class TestSStoDMN(BaseTest):
|
||||
|
||||
def test_ss_to_dmn(self):
|
||||
workflow = self.create_workflow('spreadsheet_to_dmn')
|
||||
workflow_api = self.get_workflow_api(workflow)
|
||||
task = workflow_api.next_task
|
||||
|
||||
print(f'test_ss_to_dmn: task: {task}')
|
Loading…
Reference in New Issue