mirror of
https://github.com/sartography/cr-connect-workflow.git
synced 2025-02-24 13:48:30 +00:00
While working on this ticket I found a logic error in the test. I expected both default_value and value_expression. It turns out the default_value is always there, it's just null if we don't set it. Modified the existing test for hidden and required, and added tests to make sure my passing logic is now correct.
119 lines
6.1 KiB
XML
119 lines
6.1 KiB
XML
<?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_1mhc2v8" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.5.0">
|
|
<bpmn:process id="Process_HiddenRequired" name="Hidden Reguired Field" isExecutable="true">
|
|
<bpmn:startEvent id="StartEvent_1">
|
|
<bpmn:outgoing>Flow_0zt7wv5</bpmn:outgoing>
|
|
</bpmn:startEvent>
|
|
<bpmn:sequenceFlow id="Flow_0zt7wv5" sourceRef="StartEvent_1" targetRef="Activity_Hello" />
|
|
<bpmn:userTask id="Activity_HiddenField" name="Hidden Field" camunda:formKey="HiddenFieldForm">
|
|
<bpmn:extensionElements>
|
|
<camunda:formData>
|
|
<camunda:formField id="name" label="Name" type="string">
|
|
<camunda:properties>
|
|
<camunda:property id="hide_expression" value="hide_yes_no" />
|
|
</camunda:properties>
|
|
<camunda:validation>
|
|
<camunda:constraint name="required" config="require_yes_no" />
|
|
</camunda:validation>
|
|
</camunda:formField>
|
|
</camunda:formData>
|
|
</bpmn:extensionElements>
|
|
<bpmn:incoming>Flow_0fb4w15</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_0c2rym0</bpmn:outgoing>
|
|
</bpmn:userTask>
|
|
<bpmn:sequenceFlow id="Flow_0cm6imh" sourceRef="Activity_Hello" targetRef="Activity_PreData" />
|
|
<bpmn:scriptTask id="Activity_PreData" name="Pre Data">
|
|
<bpmn:incoming>Flow_0cm6imh</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_0fb4w15</bpmn:outgoing>
|
|
<bpmn:script>if not 'require_yes_no' in globals():
|
|
require_yes_no = True
|
|
if not 'hide_yes_no' in globals():
|
|
hide_yes_no = True</bpmn:script>
|
|
</bpmn:scriptTask>
|
|
<bpmn:sequenceFlow id="Flow_0fb4w15" sourceRef="Activity_PreData" targetRef="Activity_HiddenField" />
|
|
<bpmn:manualTask id="Activity_GoodBye" name="Good Bye">
|
|
<bpmn:documentation><H1>Good Bye{% if name %} {{ name }}{% endif %}</H1>
|
|
<div><span>Color is {{ color }}</span></div>
|
|
</bpmn:documentation>
|
|
<bpmn:incoming>Flow_1qkjkbh</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_1udbzd6</bpmn:outgoing>
|
|
</bpmn:manualTask>
|
|
<bpmn:endEvent id="Event_194gjyj">
|
|
<bpmn:incoming>Flow_1udbzd6</bpmn:incoming>
|
|
</bpmn:endEvent>
|
|
<bpmn:sequenceFlow id="Flow_1udbzd6" sourceRef="Activity_GoodBye" targetRef="Event_194gjyj" />
|
|
<bpmn:manualTask id="Activity_Hello" name="Hello">
|
|
<bpmn:documentation><H1>Hello</H1></bpmn:documentation>
|
|
<bpmn:incoming>Flow_0zt7wv5</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_0cm6imh</bpmn:outgoing>
|
|
</bpmn:manualTask>
|
|
<bpmn:sequenceFlow id="Flow_0c2rym0" sourceRef="Activity_HiddenField" targetRef="Activity_CheckDefault" />
|
|
<bpmn:sequenceFlow id="Flow_1qkjkbh" sourceRef="Activity_CheckDefault" targetRef="Activity_GoodBye" />
|
|
<bpmn:userTask id="Activity_CheckDefault" name="Check Default" camunda:formKey="CheckDefaultForm">
|
|
<bpmn:extensionElements>
|
|
<camunda:formData>
|
|
<camunda:formField id="color" label="Color" type="string" defaultValue="Gray">
|
|
<camunda:properties>
|
|
<camunda:property id="hide_expression" value="True" />
|
|
</camunda:properties>
|
|
<camunda:validation>
|
|
<camunda:constraint name="required" config="True" />
|
|
</camunda:validation>
|
|
</camunda:formField>
|
|
</camunda:formData>
|
|
</bpmn:extensionElements>
|
|
<bpmn:incoming>Flow_0c2rym0</bpmn:incoming>
|
|
<bpmn:outgoing>Flow_1qkjkbh</bpmn:outgoing>
|
|
</bpmn:userTask>
|
|
</bpmn:process>
|
|
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
|
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_HiddenRequired">
|
|
<bpmndi:BPMNEdge id="Flow_0fb4w15_di" bpmnElement="Flow_0fb4w15">
|
|
<di:waypoint x="530" y="117" />
|
|
<di:waypoint x="590" y="117" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_0cm6imh_di" bpmnElement="Flow_0cm6imh">
|
|
<di:waypoint x="370" y="117" />
|
|
<di:waypoint x="430" y="117" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_0zt7wv5_di" bpmnElement="Flow_0zt7wv5">
|
|
<di:waypoint x="215" y="117" />
|
|
<di:waypoint x="270" y="117" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_0c2rym0_di" bpmnElement="Flow_0c2rym0">
|
|
<di:waypoint x="690" y="117" />
|
|
<di:waypoint x="750" y="117" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_1qkjkbh_di" bpmnElement="Flow_1qkjkbh">
|
|
<di:waypoint x="850" y="117" />
|
|
<di:waypoint x="910" y="117" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_1udbzd6_di" bpmnElement="Flow_1udbzd6">
|
|
<di:waypoint x="1010" y="117" />
|
|
<di:waypoint x="1072" 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_0a4wzou_di" bpmnElement="Activity_HiddenField">
|
|
<dc:Bounds x="590" y="77" width="100" height="80" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_0kjyqk8_di" bpmnElement="Activity_PreData">
|
|
<dc:Bounds x="430" y="77" width="100" height="80" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_0v7ietz_di" bpmnElement="Activity_Hello">
|
|
<dc:Bounds x="270" y="77" width="100" height="80" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_12r6tn2_di" bpmnElement="Activity_GoodBye">
|
|
<dc:Bounds x="910" y="77" width="100" height="80" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Event_194gjyj_di" bpmnElement="Event_194gjyj">
|
|
<dc:Bounds x="1072" y="99" width="36" height="36" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_0y8y596_di" bpmnElement="Activity_CheckDefault">
|
|
<dc:Bounds x="750" y="77" width="100" height="80" />
|
|
</bpmndi:BPMNShape>
|
|
</bpmndi:BPMNPlane>
|
|
</bpmndi:BPMNDiagram>
|
|
</bpmn:definitions>
|