So saying tagAlias: lowercase is very bad idea.

This commit is contained in:
Dan 2022-07-12 16:30:45 -04:00
parent 109bc9a7de
commit b9bfbca159
3 changed files with 38 additions and 28 deletions

View File

@ -2,9 +2,6 @@
"name": "SpiffWorkflow",
"uri": "http://spiffworkflow.org/bpmn/schema/1.0/core",
"prefix": "spiffworkflow",
"xml": {
"tagAlias": "lowerCase"
},
"associations": [],
"types": [
{

View File

@ -54,4 +54,13 @@ describe('Properties Panel Script Tasks', function() {
expect(scriptInput.value).to.equal('x = 100');
});
it('should parse the bpmn:script tag when you open an existing file', async function() {
// IF - a script tag is selected, and you change the script in the properties panel
const scriptTask = await expectSelected('task_confirm');
let entry = findEntry('pythonScript_spiffworkflow:preScript', PROPERTIES_PANEL_CONTAINER);
const scriptInput = domQuery('textarea', entry);
expect(scriptInput.value).to.equal('x=1');
});
});

View File

@ -1,5 +1,5 @@
<?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_19o7vxg" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.0.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.17.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:spiffworkflow="http://spiffworkflow.org/bpmn/schema/1.0/core" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_19o7vxg" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.0.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.17.0">
<bpmn:process id="ProcessTest" name="Process Test" isExecutable="true">
<bpmn:ioSpecification>
<bpmn:dataInput id="num_dogs" name="Number of Dogs" />
@ -21,7 +21,7 @@
</bpmn:dataOutputAssociation>
<bpmn:standardLoopCharacteristics />
</bpmn:manualTask>
<bpmn:sequenceFlow id="Flow_0q4oys2" sourceRef="my_script_task" targetRef="Activity_1ph5x7y" />
<bpmn:sequenceFlow id="Flow_0q4oys2" sourceRef="my_script_task" targetRef="task_confirm" />
<bpmn:scriptTask id="my_script_task" name="calculate contentment">
<bpmn:extensionElements>
<camunda:inputOutput>
@ -40,8 +40,12 @@
<bpmn:dataObject id="my_other_data_object" />
<bpmn:dataObject id="my_third_data_object" />
<bpmn:dataObjectReference id="my_data_ref_1" name="my_data_object" dataObjectRef="my_data_object" />
<bpmn:sequenceFlow id="Flow_132laxn" sourceRef="Activity_1ph5x7y" targetRef="Event_14wzv4j" />
<bpmn:userTask id="Activity_1ph5x7y" name="confirm contentment">
<bpmn:sequenceFlow id="Flow_132laxn" sourceRef="task_confirm" targetRef="Event_14wzv4j" />
<bpmn:userTask id="task_confirm" name="confirm contentment">
<bpmn:extensionElements>
<spiffworkflow:preScript>x=1</spiffworkflow:preScript>
<spiffworkflow:postScript>y=2</spiffworkflow:postScript>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0q4oys2</bpmn:incoming>
<bpmn:outgoing>Flow_132laxn</bpmn:outgoing>
</bpmn:userTask>
@ -57,18 +61,10 @@
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ProcessTest">
<bpmndi:BPMNShape id="dataInput_1" bpmnElement="num_dogs">
<dc:Bounds x="172" y="85" width="36" height="50" />
<bpmndi:BPMNLabel>
<dc:Bounds x="151" y="135" width="81" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="dataInput_2" bpmnElement="happy_index">
<dc:Bounds x="772" y="65" width="36" height="50" />
<bpmndi:BPMNLabel>
<dc:Bounds x="748" y="122" width="83" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_132laxn_di" bpmnElement="Flow_132laxn">
<di:waypoint x="690" y="187" />
<di:waypoint x="772" y="187" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0q4oys2_di" bpmnElement="Flow_0q4oys2">
<di:waypoint x="540" y="187" />
<di:waypoint x="590" y="187" />
@ -81,13 +77,12 @@
<di:waypoint x="380" y="187" />
<di:waypoint x="440" y="187" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_132laxn_di" bpmnElement="Flow_132laxn">
<di:waypoint x="690" y="187" />
<di:waypoint x="772" y="187" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds x="179" y="169" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_14wzv4j_di" bpmnElement="Event_14wzv4j">
<dc:Bounds x="772" y="169" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0t7iwfm_di" bpmnElement="Activity_15zz6ya">
<dc:Bounds x="280" y="147" width="100" height="80" />
<bpmndi:BPMNLabel />
@ -101,18 +96,27 @@
<dc:Bounds x="292" y="322" width="78" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1gk19al_di" bpmnElement="task_confirm">
<dc:Bounds x="590" y="147" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="DataObjectReference_08bm72g_di" bpmnElement="my_data_ref_2">
<dc:Bounds x="472" y="265" width="36" height="50" />
<bpmndi:BPMNLabel>
<dc:Bounds x="451" y="322" width="78" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1gk19al_di" bpmnElement="Activity_1ph5x7y">
<dc:Bounds x="590" y="147" width="100" height="80" />
<bpmndi:BPMNLabel />
<bpmndi:BPMNShape id="dataInput_1" bpmnElement="num_dogs">
<dc:Bounds x="172" y="85" width="36" height="50" />
<bpmndi:BPMNLabel>
<dc:Bounds x="151" y="135" width="81" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_14wzv4j_di" bpmnElement="Event_14wzv4j">
<dc:Bounds x="772" y="169" width="36" height="36" />
<bpmndi:BPMNShape id="dataInput_2" bpmnElement="happy_index">
<dc:Bounds x="772" y="65" width="36" height="50" />
<bpmndi:BPMNLabel>
<dc:Bounds x="748" y="122" width="83" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="DataOutputAssociation_1uj5jzs_di" bpmnElement="DataOutputAssociation_1uj5jzs">
<di:waypoint x="329" y="227" />