Skip to content

Commit

Permalink
fix: display process name only once for C7
Browse files Browse the repository at this point in the history
  • Loading branch information
barmac authored and nikku committed May 28, 2024
1 parent 8cf48a3 commit 104a8b9
Show file tree
Hide file tree
Showing 3 changed files with 370 additions and 40 deletions.
40 changes: 0 additions & 40 deletions src/provider/camunda-platform/properties/ProcessProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,50 +33,10 @@ export function ProcessProps(props) {
id: 'processId',
component: ProcessId,
isEdited: isTextFieldEntryEdited
},
{
id: 'processName',
component: ProcessName,
isEdited: isTextFieldEntryEdited
}
];
}

function ProcessName(props) {
const { element } = props;

const commandStack = useService('commandStack');
const translate = useService('translate');
const debounce = useService('debounceInput');
const process = element.businessObject.get('processRef');

const getValue = () => {
return process.get('name');
};

const setValue = (value) => {
commandStack.execute(
'element.updateModdleProperties',
{
element,
moddleElement: process,
properties: {
name: value
}
}
);
};

return TextFieldEntry({
element,
id: 'processName',
label: translate('Process name'),
getValue,
setValue,
debounce
});
}

function ProcessId(props) {
const { element } = props;

Expand Down
59 changes: 59 additions & 0 deletions test/spec/provider/camunda-platform/ProcessProps.bpmn
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="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="_o9zEIBsMEeWBwbKIgYGooQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="camunda modeler" exporterVersion="2.7.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
<bpmn2:collaboration id="_Collaboration_2">
<bpmn2:participant id="_Participant_2" name="Pool" processRef="Process_1" />
<bpmn2:participant id="Participant_1" name="Pool" processRef="Process_2" />
<bpmn2:participant id="Participant_Empty" name="Collapsed Pool" />
</bpmn2:collaboration>
<bpmn2:process id="Process_1" name="Process 1" isExecutable="false">
<bpmn2:startEvent id="StartEvent_1">
<bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
</bpmn2:startEvent>
<bpmn2:endEvent id="EndEvent_1">
<bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
</bpmn2:endEvent>
<bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="StartEvent_1" targetRef="EndEvent_1" />
</bpmn2:process>
<bpmn2:process id="Process_2" name="Process 2" isExecutable="false">
<bpmn2:startEvent id="StartEvent_2">
<bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
</bpmn2:startEvent>
<bpmn2:endEvent id="EndEvent_2">
<bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
</bpmn2:endEvent>
<bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="StartEvent_2" targetRef="EndEvent_2" />
</bpmn2:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="_Collaboration_2">
<bpmndi:BPMNShape id="_BPMNShape_Participant_2" bpmnElement="_Participant_2" isHorizontal="true">
<dc:Bounds x="84" y="24" width="540" height="215" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_Participant_3" bpmnElement="Participant_1" isHorizontal="true">
<dc:Bounds x="84" y="276" width="540" height="181" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds x="182" y="119" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_3" bpmnElement="StartEvent_2">
<dc:Bounds x="172" y="355" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_EndEvent_2" bpmnElement="EndEvent_1">
<dc:Bounds x="268" y="119" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_StartEvent_2" targetElement="_BPMNShape_EndEvent_2">
<di:waypoint xsi:type="dc:Point" x="218" y="137" />
<di:waypoint xsi:type="dc:Point" x="268" y="137" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_EndEvent_3" bpmnElement="EndEvent_2">
<dc:Bounds x="258" y="355" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_StartEvent_3" targetElement="_BPMNShape_EndEvent_3">
<di:waypoint xsi:type="dc:Point" x="208" y="373" />
<di:waypoint xsi:type="dc:Point" x="258" y="373" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="Participant_1k4fdpr_di" bpmnElement="Participant_Empty">
<dc:Bounds x="83.5" y="498" width="541" height="112" />
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>
Loading

0 comments on commit 104a8b9

Please sign in to comment.