Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/provider/zeebe/properties/FormProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {
getFormType,
getRootElement,
getUserTaskForm,
isFormSupported,
isZeebeUserTask,
userTaskFormIdToFormKey
} from '../utils/FormUtil';
Expand All @@ -50,8 +51,7 @@ const NONE_VALUE = 'none';

export function FormProps(props) {
const { element } = props;

if (!is(element, 'bpmn:UserTask')) {
if (!isFormSupported(element)) {
return [];
}

Expand Down
5 changes: 5 additions & 0 deletions src/provider/zeebe/utils/FormUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,8 @@ export function isZeebeUserTask(element) {

return getExtensionElementsList(bo, 'zeebe:UserTask').length > 0;
}

export function isFormSupported(element) {
return (is(element, 'bpmn:StartEvent') && !is(element.parent, 'bpmn:SubProcess'))
|| is(element, 'bpmn:UserTask');
}
Comment thread
MrGussio marked this conversation as resolved.
53 changes: 53 additions & 0 deletions test/spec/provider/zeebe/Forms.bpmn
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,24 @@
<bpmn:process id="Process_1" isExecutable="true">
<bpmn:extensionElements>
<zeebe:userTaskForm id="UserTaskForm_1">{}</zeebe:userTaskForm>
<zeebe:userTaskForm id="UserTaskForm_2">{}</zeebe:userTaskForm>
</bpmn:extensionElements>
<bpmn:startEvent id="START_EVENT_NO_FORM" name="START_EVENT_NO_FORM" />
<bpmn:startEvent id="START_EVENT_FORM_EMBEDDED" name="START_EVENT_FORM_EMBEDDED">
<bpmn:extensionElements>
<zeebe:formDefinition formKey="camunda-forms:bpmn:UserTaskForm_2" />
</bpmn:extensionElements>
</bpmn:startEvent>
<bpmn:startEvent id="START_EVENT_FORM_LINKED" name="START_EVENT_FORM_LINKED">
<bpmn:extensionElements>
<zeebe:formDefinition formId="foo" />
</bpmn:extensionElements>
</bpmn:startEvent>
<bpmn:startEvent id="START_EVENT_CUSTOM_FORM" name="START_EVENT_CUSTOM_FORM">
<bpmn:extensionElements>
<zeebe:formDefinition formKey="foo" />
</bpmn:extensionElements>
</bpmn:startEvent>
<bpmn:userTask id="CAMUNDA_FORM_EMBEDDED" name="CAMUNDA_FORM_EMBEDDED">
<bpmn:extensionElements>
<zeebe:formDefinition formKey="camunda-forms:bpmn:UserTaskForm_1" />
Expand Down Expand Up @@ -42,6 +59,9 @@
<zeebe:formDefinition formId="foo" bindingType="versionTag" versionTag="v1.0.0" />
</bpmn:extensionElements>
</bpmn:userTask>
<bpmn:subProcess id="SUB_PROCESS">
<bpmn:startEvent id="START_EVENT_SUB_PROCESS" name="START_EVENT_SUB_PROCESS" />
</bpmn:subProcess>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
Expand Down Expand Up @@ -76,6 +96,39 @@
<bpmndi:BPMNShape id="Activity_0q4ulf7_di" bpmnElement="CAMUNDA_FORM_LINKED_VERSION_TAG">
<dc:Bounds x="490" y="190" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="START_EVENT_FORM_EMBEDDED_DI" bpmnElement="START_EVENT_FORM_EMBEDDED">
<dc:Bounds x="182" y="192" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="159" y="235" width="83" height="40" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="START_EVENT_NO_FORM_DI" bpmnElement="START_EVENT_NO_FORM">
<dc:Bounds x="182" y="112" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="161" y="155" width="79" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="START_EVENT_FORM_LINKED_DI" bpmnElement="START_EVENT_FORM_LINKED">
<dc:Bounds x="182" y="282" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="158" y="325" width="85" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="START_EVENT_CUSTOM_FORM_DI" bpmnElement="START_EVENT_CUSTOM_FORM">
<dc:Bounds x="182" y="362" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="159" y="405" width="83" height="40" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="SUB_PROCESS" bpmnElement="SUB_PROCESS" isExpanded="true">
<dc:Bounds x="140" y="580" width="350" height="200" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="START_EVENT_SUB_PROCESS" bpmnElement="START_EVENT_SUB_PROCESS">
<dc:Bounds x="180" y="662" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="154" y="705" width="89" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
Loading