Skip to content

Commit

Permalink
fix(camunda-platform/ImplementationProps): use correct business object
Browse files Browse the repository at this point in the history
  • Loading branch information
Niklas Kiefer authored and fake-join[bot] committed Mar 29, 2022
1 parent cc35a6d commit db9092b
Show file tree
Hide file tree
Showing 3 changed files with 595 additions and 16 deletions.
14 changes: 5 additions & 9 deletions src/provider/camunda-platform/properties/ImplementationProps.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import {
getBusinessObject
} from 'bpmn-js/lib/util/ModelUtil';

import { TextFieldEntry, isTextFieldEntryEdited } from '@bpmn-io/properties-panel';

import { DmnImplementationProps } from './DmnImplementationProps';
Expand Down Expand Up @@ -91,7 +87,7 @@ export function ImplementationProps(props) {
export function JavaClass(props) {
const {
element,
businessObject = getBusinessObject(element),
businessObject = getServiceTaskLikeBusinessObject(element),
id = 'javaClass'
} = props;

Expand Down Expand Up @@ -126,7 +122,7 @@ export function JavaClass(props) {
export function Expression(props) {
const {
element,
businessObject = getBusinessObject(element),
businessObject = getServiceTaskLikeBusinessObject(element),
id = 'expression'
} = props;

Expand Down Expand Up @@ -165,7 +161,7 @@ function ResultVariable(props) {
const translate = useService('translate');
const debounce = useService('debounceInput');

const businessObject = getBusinessObject(element);
const businessObject = getServiceTaskLikeBusinessObject(element);

const getValue = () => {
return businessObject.get('camunda:resultVariable');
Expand Down Expand Up @@ -194,7 +190,7 @@ function ResultVariable(props) {
export function DelegateExpression(props) {
const {
element,
businessObject = getBusinessObject(element),
businessObject = getServiceTaskLikeBusinessObject(element),
id = 'delegateExpression'
} = props;

Expand Down Expand Up @@ -233,7 +229,7 @@ function Topic(props) {
const translate = useService('translate');
const debounce = useService('debounceInput');

const businessObject = getBusinessObject(element);
const businessObject = getServiceTaskLikeBusinessObject(element);

const getValue = () => {
return businessObject.get('camunda:topic');
Expand Down
20 changes: 19 additions & 1 deletion test/spec/provider/camunda-platform/ImplementationProps.bpmn
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.11.1">
<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.0.0-nightly.20220328">
<bpmn:process id="Process_1" isExecutable="false">
<bpmn:serviceTask id="ServiceTask_class" name="Class" camunda:class="foo" />
<bpmn:serviceTask id="ServiceTask_expression" name="Expression" camunda:expression="foo" camunda:resultVariable="bar" />
Expand Down Expand Up @@ -44,6 +44,12 @@
</bpmn:extensionElements>
</bpmn:messageEventDefinition>
</bpmn:endEvent>
<bpmn:endEvent id="MessageEndEvent_Expression" name="MessageEndEvent_Expression">
<bpmn:messageEventDefinition id="MessageEventDefinition_0wvi2c3" messageRef="Message_18c59ym" camunda:expression="foo" camunda:resultVariable="foo" />
</bpmn:endEvent>
<bpmn:endEvent id="MessageEndEvent_DelegateExpression" name="MessageEndEvent_DelegateExpression">
<bpmn:messageEventDefinition id="MessageEventDefinition_1kfyyiz" messageRef="Message_18c59ym" camunda:delegateExpression="foo" />
</bpmn:endEvent>
</bpmn:process>
<bpmn:error id="Error_1" name="Error_1" errorCode="foo" />
<bpmn:message id="Message_18c59ym" name="asdf" />
Expand Down Expand Up @@ -103,6 +109,18 @@
<dc:Bounds x="734" y="125" width="90" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="BPMNShape_0f640qv" bpmnElement="MessageEndEvent_Expression">
<dc:Bounds x="312" y="122" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="285" y="165" width="90" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="BPMNShape_0fkifnv" bpmnElement="MessageEndEvent_DelegateExpression">
<dc:Bounds x="897" y="82" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="870" y="125" width="90" height="40" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
Loading

0 comments on commit db9092b

Please sign in to comment.