├── .babelrc ├── .eslintignore ├── .eslintrc ├── .github ├── dependabot.yml └── workflows │ └── CI.yml ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── assets └── element-templates.css ├── codecov.yml ├── karma.config.js ├── package-lock.json ├── package.json ├── rollup.config.js ├── src ├── cmd │ ├── MultiCommandHandler.js │ ├── UpdateBusinessObjectHandler.js │ ├── UpdateBusinessObjectListHandler.js │ └── index.js ├── context │ ├── BpmnPropertiesPanelContext.js │ └── index.js ├── entries │ └── ReferenceSelect.js ├── hooks │ ├── index.js │ └── useService.js ├── icons │ ├── bpmn-icon-business-rule-task.svg │ ├── bpmn-icon-call-activity.svg │ ├── bpmn-icon-collaboration.svg │ ├── bpmn-icon-conditional-flow.svg │ ├── bpmn-icon-connection.svg │ ├── bpmn-icon-data-input.svg │ ├── bpmn-icon-data-object.svg │ ├── bpmn-icon-data-output.svg │ ├── bpmn-icon-data-store.svg │ ├── bpmn-icon-default-flow.svg │ ├── bpmn-icon-end-event-cancel.svg │ ├── bpmn-icon-end-event-compensation.svg │ ├── bpmn-icon-end-event-error.svg │ ├── bpmn-icon-end-event-escalation.svg │ ├── bpmn-icon-end-event-link.svg │ ├── bpmn-icon-end-event-message.svg │ ├── bpmn-icon-end-event-multiple.svg │ ├── bpmn-icon-end-event-none.svg │ ├── bpmn-icon-end-event-signal.svg │ ├── bpmn-icon-end-event-terminate.svg │ ├── bpmn-icon-event-subprocess-expanded.svg │ ├── bpmn-icon-gateway-complex.svg │ ├── bpmn-icon-gateway-eventbased.svg │ ├── bpmn-icon-gateway-none.svg │ ├── bpmn-icon-gateway-or.svg │ ├── bpmn-icon-gateway-parallel.svg │ ├── bpmn-icon-gateway-xor.svg │ ├── bpmn-icon-group.svg │ ├── bpmn-icon-intermediate-event-catch-cancel.svg │ ├── bpmn-icon-intermediate-event-catch-compensation.svg │ ├── bpmn-icon-intermediate-event-catch-condition.svg │ ├── bpmn-icon-intermediate-event-catch-error.svg │ ├── bpmn-icon-intermediate-event-catch-escalation.svg │ ├── bpmn-icon-intermediate-event-catch-link.svg │ ├── bpmn-icon-intermediate-event-catch-message.svg │ ├── bpmn-icon-intermediate-event-catch-multiple.svg │ ├── bpmn-icon-intermediate-event-catch-non-interrupting-condition.svg │ ├── bpmn-icon-intermediate-event-catch-non-interrupting-escalation.svg │ ├── bpmn-icon-intermediate-event-catch-non-interrupting-message.svg │ ├── bpmn-icon-intermediate-event-catch-non-interrupting-multiple.svg │ ├── bpmn-icon-intermediate-event-catch-non-interrupting-parallel.svg │ ├── bpmn-icon-intermediate-event-catch-non-interrupting-signal.svg │ ├── bpmn-icon-intermediate-event-catch-non-interrupting-timer.svg │ ├── bpmn-icon-intermediate-event-catch-parallel-multiple.svg │ ├── bpmn-icon-intermediate-event-catch-signal.svg │ ├── bpmn-icon-intermediate-event-catch-timer.svg │ ├── bpmn-icon-intermediate-event-none.svg │ ├── bpmn-icon-intermediate-event-throw-compensation.svg │ ├── bpmn-icon-intermediate-event-throw-escalation.svg │ ├── bpmn-icon-intermediate-event-throw-link.svg │ ├── bpmn-icon-intermediate-event-throw-message.svg │ ├── bpmn-icon-intermediate-event-throw-multiple.svg │ ├── bpmn-icon-intermediate-event-throw-signal.svg │ ├── bpmn-icon-lane.svg │ ├── bpmn-icon-manual-task.svg │ ├── bpmn-icon-message-flow.svg │ ├── bpmn-icon-participant.svg │ ├── bpmn-icon-process.svg │ ├── bpmn-icon-receive-task.svg │ ├── bpmn-icon-script-task.svg │ ├── bpmn-icon-send-task.svg │ ├── bpmn-icon-service-task.svg │ ├── bpmn-icon-start-event-compensation.svg │ ├── bpmn-icon-start-event-condition.svg │ ├── bpmn-icon-start-event-error.svg │ ├── bpmn-icon-start-event-escalation.svg │ ├── bpmn-icon-start-event-message.svg │ ├── bpmn-icon-start-event-multiple.svg │ ├── bpmn-icon-start-event-non-interrupting-condition.svg │ ├── bpmn-icon-start-event-non-interrupting-escalation.svg │ ├── bpmn-icon-start-event-non-interrupting-message.svg │ ├── bpmn-icon-start-event-non-interrupting-multiple.svg │ ├── bpmn-icon-start-event-non-interrupting-parallel-multiple.svg │ ├── bpmn-icon-start-event-non-interrupting-signal.svg │ ├── bpmn-icon-start-event-non-interrupting-timer.svg │ ├── bpmn-icon-start-event-none.svg │ ├── bpmn-icon-start-event-parallel-multiple.svg │ ├── bpmn-icon-start-event-signal.svg │ ├── bpmn-icon-start-event-timer.svg │ ├── bpmn-icon-subprocess-collapsed.svg │ ├── bpmn-icon-subprocess-expanded.svg │ ├── bpmn-icon-task-none.svg │ ├── bpmn-icon-text-annotation.svg │ ├── bpmn-icon-transaction.svg │ ├── bpmn-icon-user-task.svg │ └── index.js ├── index.js ├── provider │ ├── bpmn │ │ ├── BpmnPropertiesProvider.js │ │ ├── index.js │ │ ├── properties │ │ │ ├── CompensationProps.js │ │ │ ├── DocumentationProps.js │ │ │ ├── ErrorProps.js │ │ │ ├── EscalationProps.js │ │ │ ├── ExecutableProps.js │ │ │ ├── IdProps.js │ │ │ ├── LinkProps.js │ │ │ ├── MessageProps.js │ │ │ ├── MultiInstanceProps.js │ │ │ ├── NameProps.js │ │ │ ├── ProcessProps.js │ │ │ ├── SignalProps.js │ │ │ ├── TimerProps.js │ │ │ └── index.js │ │ └── utils │ │ │ ├── EventDefinitionUtil.js │ │ │ └── ValidationUtil.js │ ├── camunda-platform │ │ ├── CamundaPlatformPropertiesProvider.js │ │ ├── index.js │ │ ├── properties │ │ │ ├── AsynchronousContinuationsProps.js │ │ │ ├── BusinessKeyProps.js │ │ │ ├── CallActivityProps.js │ │ │ ├── CalledBpmnProps.js │ │ │ ├── CalledCmmnProps.js │ │ │ ├── CandidateStarterProps.js │ │ │ ├── ConditionProps.js │ │ │ ├── ConnectorInputProps.js │ │ │ ├── ConnectorOutputProps.js │ │ │ ├── DelegateVariableMappingProps.js │ │ │ ├── DmnImplementationProps.js │ │ │ ├── Error.js │ │ │ ├── ErrorProps.js │ │ │ ├── ErrorsProps.js │ │ │ ├── EscalationProps.js │ │ │ ├── ExtensionPropertiesProps.js │ │ │ ├── ExtensionProperty.js │ │ │ ├── ExternalTaskPriorityProps.js │ │ │ ├── FieldInjection.js │ │ │ ├── FieldInjectionProps.js │ │ │ ├── FormDataProps.js │ │ │ ├── FormField.js │ │ │ ├── FormFieldConstraint.js │ │ │ ├── FormFieldProperty.js │ │ │ ├── FormFieldValue.js │ │ │ ├── FormProps.js │ │ │ ├── FormTypeProps.js │ │ │ ├── HistoryCleanupProps.js │ │ │ ├── ImplementationProps.js │ │ │ ├── ImplementationTypeProps.js │ │ │ ├── InMappingPropagationProps.js │ │ │ ├── InMappingProps.js │ │ │ ├── InOutMapping.js │ │ │ ├── InitiatorProps.js │ │ │ ├── InputOutputParameter.js │ │ │ ├── InputProps.js │ │ │ ├── JobExecutionProps.js │ │ │ ├── ListProps.js │ │ │ ├── ListenerProps.js │ │ │ ├── MapProps.js │ │ │ ├── MultiInstanceProps.js │ │ │ ├── OutMappingPropagationProps.js │ │ │ ├── OutMappingProps.js │ │ │ ├── OutputProps.js │ │ │ ├── ProcessVariablesProps.js │ │ │ ├── ScriptProps.js │ │ │ ├── ScriptTaskProps.js │ │ │ ├── TasklistProps.js │ │ │ ├── UserAssignmentProps.js │ │ │ ├── VersionTagProps.js │ │ │ └── index.js │ │ └── utils │ │ │ ├── ConnectorUtil.js │ │ │ ├── ExtensionElementsUtil.js │ │ │ ├── FormTypeUtils.js │ │ │ ├── ImplementationTypeUtils.js │ │ │ └── InputOutputUtil.js │ ├── element-templates │ │ ├── CreateHelper.js │ │ ├── ElementTemplates.js │ │ ├── ElementTemplatesLoader.js │ │ ├── ElementTemplatesPropertiesProvider.js │ │ ├── Helper.js │ │ ├── ReplaceBehavior.js │ │ ├── Validator.js │ │ ├── cmd │ │ │ ├── ChangeElementTemplateHandler.js │ │ │ └── index.js │ │ ├── components │ │ │ ├── ElementTemplatesGroup.js │ │ │ ├── TemplateProps.js │ │ │ └── index.js │ │ ├── index.js │ │ ├── properties │ │ │ ├── CustomProperties.js │ │ │ ├── ErrorProperties.js │ │ │ ├── InputProperties.js │ │ │ ├── OutputProperties.js │ │ │ └── index.js │ │ └── util │ │ │ ├── handleLegacyScopes.js │ │ │ ├── templateUtil.js │ │ │ └── validate.js │ └── zeebe │ │ ├── ZeebePropertiesProvider.js │ │ ├── index.js │ │ ├── properties │ │ ├── AssignmentDefinitionProps.js │ │ ├── BusinessRuleImplementationProps.js │ │ ├── CalledDecisionProps.js │ │ ├── ConditionProps.js │ │ ├── FormProps.js │ │ ├── Header.js │ │ ├── HeaderProps.js │ │ ├── InputOutputParameter.js │ │ ├── InputProps.js │ │ ├── MessageProps.js │ │ ├── MultiInstanceProps.js │ │ ├── OutputPropagationProps.js │ │ ├── OutputProps.js │ │ ├── TargetProps.js │ │ ├── TaskDefinitionProps.js │ │ ├── TimerProps.js │ │ └── index.js │ │ └── utils │ │ ├── CalledElementUtil.js │ │ ├── ExtensionElementsUtil.js │ │ ├── HeadersUtil.js │ │ ├── InputOutputUtil.js │ │ └── ZeebeServiceTaskUtil.js ├── render │ ├── BpmnPropertiesPanel.js │ ├── BpmnPropertiesPanelRenderer.js │ ├── PanelHeaderProvider.js │ └── index.js └── utils │ └── ElementUtil.js └── test ├── .eslintrc ├── TestHelper.js ├── coverageBundle.js ├── distro └── distroSpec.js ├── fixtures ├── service-task.bpmn └── simple.bpmn ├── spec ├── BpmnPropertiesPanel.spec.js ├── BpmnPropertiesPanelRenderer.spec.js ├── PanelHeaderProvider.spec.js ├── extension │ └── ExamplePropertiesProvider.js ├── mocks │ └── index.js ├── provider │ ├── bpmn │ │ ├── BpmnPropertiesProvider.bpmn │ │ ├── BpmnPropertiesProvider.spec.js │ │ ├── CompensationProps.bpmn │ │ ├── CompensationProps.spec.js │ │ ├── DocumentationProps.bpmn │ │ ├── DocumentationProps.spec.js │ │ ├── ErrorProps.bpmn │ │ ├── ErrorProps.spec.js │ │ ├── EscalationProps.bpmn │ │ ├── EscalationProps.spec.js │ │ ├── ExecutableProps.bpmn │ │ ├── ExecutableProps.participants.bpmn │ │ ├── ExecutableProps.spec.js │ │ ├── IdProps.bpmn │ │ ├── IdProps.spec.js │ │ ├── LinkProps.bpmn │ │ ├── LinkProps.spec.js │ │ ├── MessageProps.bpmn │ │ ├── MessageProps.spec.js │ │ ├── MultiInstanceProps.bpmn │ │ ├── MultiInstanceProps.spec.js │ │ ├── NameProps.bpmn │ │ ├── NameProps.spec.js │ │ ├── ProcessProps.bpmn │ │ ├── ProcessProps.spec.js │ │ ├── ReferenceSelect.spec.js │ │ ├── SignalProps.bpmn │ │ ├── SignalProps.spec.js │ │ ├── TimerProps.bpmn │ │ └── TimerProps.spec.js │ ├── camunda-platform │ │ ├── AsynchronousContinuationsProps.bpmn │ │ ├── AsynchronousContinuationsProps.spec.js │ │ ├── BusinessKeyProps.bpmn │ │ ├── BusinessKeyProps.spec.js │ │ ├── CallActivityProps.bpmn │ │ ├── CallActivityProps.spec.js │ │ ├── CamundaPlatformPropertiesProvider-Collaboration.bpmn │ │ ├── CamundaPlatformPropertiesProvider-Process.bpmn │ │ ├── CamundaPlatformPropertiesProvider.spec.js │ │ ├── CandidateStarterProps-Collaboration.bpmn │ │ ├── CandidateStarterProps-Process.bpmn │ │ ├── CandidateStarterProps.spec.js │ │ ├── ConditionProps.bpmn │ │ ├── ConditionProps.spec.js │ │ ├── ConnectorInputProps.bpmn │ │ ├── ConnectorInputProps.spec.js │ │ ├── ConnectorOutputProps.bpmn │ │ ├── ConnectorOutputProps.spec.js │ │ ├── DmnImplementationProps.bpmn │ │ ├── DmnImplementationProps.spec.js │ │ ├── Error.spec.js │ │ ├── ErrorProps.bpmn │ │ ├── ErrorProps.spec.js │ │ ├── ErrorsProps.bpmn │ │ ├── ErrorsProps.spec.js │ │ ├── EscalationProps.bpmn │ │ ├── EscalationProps.spec.js │ │ ├── ExtensionPropertiesProps.bpmn │ │ ├── ExtensionPropertiesProps.spec.js │ │ ├── ExtensionProperty.bpmn │ │ ├── ExtensionProperty.spec.js │ │ ├── ExternalTaskPriority-Collaboration.bpmn │ │ ├── ExternalTaskPriority-Process.bpmn │ │ ├── ExternalTaskPriorityProps.spec.js │ │ ├── FieldInjection.spec.js │ │ ├── FieldInjectionProps.spec.js │ │ ├── FieldInjectonProps.bpmn │ │ ├── FormDataProps.bpmn │ │ ├── FormDataProps.spec.js │ │ ├── FormField.bpmn │ │ ├── FormField.spec.js │ │ ├── FormFieldConstraint.spec.js │ │ ├── FormFieldProperty.spec.js │ │ ├── FormFieldValue.spec.js │ │ ├── FormProps.bpmn │ │ ├── FormProps.spec.js │ │ ├── FormTypeProps.spec.js │ │ ├── HistoryCleanupProps-collaboration.bpmn │ │ ├── HistoryCleanupProps-process.bpmn │ │ ├── HistoryCleanupProps.spec.js │ │ ├── ImplementationProps.bpmn │ │ ├── ImplementationProps.spec.js │ │ ├── ImplementationTypeProps.spec.js │ │ ├── InMappingPropagationProps.bpmn │ │ ├── InMappingPropagationProps.spec.js │ │ ├── InMappingProps.bpmn │ │ ├── InMappingProps.spec.js │ │ ├── InOutMapping.bpmn │ │ ├── InOutMapping.spec.js │ │ ├── InitiatorProps.bpmn │ │ ├── InitiatorProps.spec.js │ │ ├── InputOutputParameter.bpmn │ │ ├── InputOutputParameter.spec.js │ │ ├── InputProps.bpmn │ │ ├── InputProps.spec.js │ │ ├── JobExecutionProps-Collaboration.bpmn │ │ ├── JobExecutionProps-Process.bpmn │ │ ├── JobExecutionProps.spec.js │ │ ├── ListProps.bpmn │ │ ├── ListProps.spec.js │ │ ├── ListenerProps.bpmn │ │ ├── ListenerProps.spec.js │ │ ├── MapProps.bpmn │ │ ├── MapProps.spec.js │ │ ├── MultiInstanceProps.bpmn │ │ ├── MultiInstanceProps.spec.js │ │ ├── OutMappingPropagationProps.bpmn │ │ ├── OutMappingPropagationProps.spec.js │ │ ├── OutMappingProps.bpmn │ │ ├── OutMappingProps.spec.js │ │ ├── OutputProps.bpmn │ │ ├── OutputProps.spec.js │ │ ├── ProcessVariablesProps-collaboration.bpmn │ │ ├── ProcessVariablesProps-process.bpmn │ │ ├── ProcessVariablesProps.spec.js │ │ ├── ScriptProps.bpmn │ │ ├── ScriptProps.spec.js │ │ ├── ScriptTaskProps.spec.js │ │ ├── TasklistProps-collaboration.bpmn │ │ ├── TasklistProps-process.bpmn │ │ ├── TasklistProps.spec.js │ │ ├── UserAssignmentProps.bpmn │ │ ├── UserAssignmentProps.spec.js │ │ ├── VersionTagProps-collaboration.bpmn │ │ ├── VersionTagProps-process.bpmn │ │ └── VersionTagProps.spec.js │ ├── element-templates │ │ ├── CreateHelper.bpmn │ │ ├── CreateHelper.spec.js │ │ ├── ElementTemplates.bpmn │ │ ├── ElementTemplates.spec.js │ │ ├── ElementTemplatesLoader.spec.js │ │ ├── ElementTemplatesPropertiesProvider.bpmn │ │ ├── ElementTemplatesPropertiesProvider.spec.js │ │ ├── ReplaceBehavior.spec.js │ │ ├── TemplateProps.spec.js │ │ ├── Validator.spec.js │ │ ├── cmd │ │ │ ├── ChangeElementTemplateHandler.spec.js │ │ │ ├── DefaultElementTemplates.spec.js │ │ │ ├── call-activity-ins-and-outs.bpmn │ │ │ ├── call-activity-template-1.json │ │ │ ├── call-activity-template-no-properties.json │ │ │ ├── call-activity.bpmn │ │ │ ├── default-templates.bpmn │ │ │ ├── default-templates.json │ │ │ ├── error-template-1.json │ │ │ ├── sequence-flow-template-1.json │ │ │ ├── sequence-flow.bpmn │ │ │ ├── service-task-class.bpmn │ │ │ ├── service-task-connector-template-1.json │ │ │ ├── service-task-connector.bpmn │ │ │ ├── service-task-error.bpmn │ │ │ ├── service-task-field.bpmn │ │ │ ├── service-task-template-1.json │ │ │ ├── service-task-template-no-properties.json │ │ │ ├── service-task.bpmn │ │ │ ├── task-execution-listener.bpmn │ │ │ ├── task-input-output.bpmn │ │ │ ├── task-property.bpmn │ │ │ ├── task-template-1.json │ │ │ ├── task-template-2.json │ │ │ ├── task-template-no-properties.json │ │ │ ├── task-template.bpmn │ │ │ └── task.bpmn │ │ ├── fixtures │ │ │ ├── call-activity-variables.json │ │ │ ├── complex.bpmn │ │ │ ├── complex.json │ │ │ ├── dropdown.json │ │ │ ├── empty-diagram.bpmn │ │ │ ├── entries-visible.bpmn │ │ │ ├── entries-visible.json │ │ │ ├── error-appliesTo-missing.json │ │ │ ├── error-bindings-invalid.json │ │ │ ├── error-dropdown-choices-invalid.json │ │ │ ├── error-dropdown-choices-missing.json │ │ │ ├── error-execution-listener-invalid-type.json │ │ │ ├── error-id-duplicate.json │ │ │ ├── error-id-missing.json │ │ │ ├── error-id-version-duplicate.json │ │ │ ├── error-name-missing.json │ │ │ ├── error-properties-missing.json │ │ │ ├── error-property-invalid.json │ │ │ ├── error-scopes-properties-missing.json │ │ │ ├── error-scopes-property-invalid.json │ │ │ ├── error-scopes-type-missing.json │ │ │ ├── error-templates.json │ │ │ ├── execution-listener.json │ │ │ ├── falsy-version.json │ │ │ ├── field-injections.json │ │ │ ├── mail-connector-templates.json │ │ │ ├── misc.json │ │ │ ├── missing-types.json │ │ │ ├── replace-behavior.bpmn │ │ │ ├── replace-behavior.json │ │ │ ├── scopes-array.json │ │ │ ├── scopes-single-connector.json │ │ │ ├── simple-high-schema-version.json │ │ │ ├── simple-latest-schema-version.json │ │ │ ├── simple-low-schema-version.json │ │ │ ├── simple-mixed-schema-version.json │ │ │ ├── simple-same-schema-version.json │ │ │ ├── simple.json │ │ │ ├── template-props.bpmn │ │ │ ├── template-props.json │ │ │ ├── template-util.bpmn │ │ │ └── template-util.json │ │ ├── properties │ │ │ ├── CustomProperties.bpmn │ │ │ ├── CustomProperties.description.bpmn │ │ │ ├── CustomProperties.description.json │ │ │ ├── CustomProperties.dropdown.bpmn │ │ │ ├── CustomProperties.editable.bpmn │ │ │ ├── CustomProperties.editable.json │ │ │ ├── CustomProperties.json │ │ │ ├── CustomProperties.missing-types.bpmn │ │ │ ├── CustomProperties.missing-types.json │ │ │ ├── CustomProperties.spec.js │ │ │ ├── ErrorProperties.bpmn │ │ │ ├── ErrorProperties.json │ │ │ ├── ErrorProperties.spec.js │ │ │ ├── InputProperties.bpmn │ │ │ ├── InputProperties.json │ │ │ ├── InputProperties.spec.js │ │ │ ├── OutputProperties.bpmn │ │ │ ├── OutputProperties.json │ │ │ └── OutputProperties.spec.js │ │ └── util │ │ │ ├── handleLegacyScopes.spec.js │ │ │ ├── templateUtil.spec.js │ │ │ └── validate.spec.js │ └── zeebe │ │ ├── AssignmentDefinitionProps.bpmn │ │ ├── AssignmentDefinitionProps.spec.js │ │ ├── BusinessRuleImplementationProps.bpmn │ │ ├── BusinessRuleImplementationProps.spec.js │ │ ├── CalledDecisionProps.bpmn │ │ ├── CalledDecisionProps.spec.js │ │ ├── ConditionProps.bpmn │ │ ├── ConditionProps.spec.js │ │ ├── Forms.bpmn │ │ ├── Forms.spec.js │ │ ├── Header.bpmn │ │ ├── Header.spec.js │ │ ├── HeaderProps.bpmn │ │ ├── HeaderProps.spec.js │ │ ├── InputOutputParameter.bpmn │ │ ├── InputOutputParameter.spec.js │ │ ├── InputProps.bpmn │ │ ├── InputProps.spec.js │ │ ├── MessageProps.bpmn │ │ ├── MessageProps.spec.js │ │ ├── MultiInstanceProps.bpmn │ │ ├── MultiInstanceProps.spec.js │ │ ├── OutputPropagationProps.bpmn │ │ ├── OutputPropagationProps.spec.js │ │ ├── OutputProps.bpmn │ │ ├── OutputProps.spec.js │ │ ├── TargetProps.bpmn │ │ ├── TargetProps.spec.js │ │ ├── TaskDefinitionProps.bpmn │ │ ├── TaskDefinitionProps.spec.js │ │ ├── TimerProps.bpmn │ │ ├── TimerProps.spec.js │ │ ├── ZeebePropertiesProvider.bpmn │ │ └── ZeebePropertiesProvider.spec.js └── utils │ └── ImplementationTypeUtils.spec.js ├── test.css └── testBundle.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | [ "@babel/plugin-transform-react-jsx", { 4 | "importSource": "preact", 5 | "runtime": "automatic" 6 | } ] 7 | ] 8 | } -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "plugin:bpmn-io/es6", 4 | "plugin:bpmn-io/jsx", 5 | "plugin:react-hooks/recommended" 6 | ], 7 | "rules": { 8 | "import/first": "error", 9 | "import/no-amd": "error", 10 | "import/no-webpack-loader-syntax": "error", 11 | "react-hooks/exhaustive-deps": "off" 12 | }, 13 | "plugins": [ 14 | "import" 15 | ], 16 | "env": { 17 | "browser": true, 18 | "es6": true 19 | } 20 | } -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "npm" 9 | directory: "/" 10 | schedule: 11 | interval: "daily" 12 | reviewers: # Automatically assign reviewer 13 | - "bpmn-io/modeling-dev" 14 | allow: 15 | - dependency-name: "bpmn-js" 16 | dependency-type: "all" 17 | commit-message: 18 | prefix: "deps:" 19 | versioning-strategy: "increase" 20 | -------------------------------------------------------------------------------- /.github/workflows/CI.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: [ push, pull_request ] 3 | jobs: 4 | Build: 5 | 6 | strategy: 7 | matrix: 8 | os: [ ubuntu-latest ] 9 | node-version: [ 14 ] 10 | 11 | runs-on: ${{ matrix.os }} 12 | 13 | steps: 14 | - name: Checkout 15 | uses: actions/checkout@v2 16 | - name: Use Node.js 17 | uses: actions/setup-node@v2 18 | with: 19 | node-version: ${{ matrix.node-version }} 20 | - name: Cache Node.js modules 21 | uses: actions/cache@v2 22 | with: 23 | # npm cache files are stored in `~/.npm` on Linux/macOS 24 | path: ~/.npm 25 | key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} 26 | restore-keys: | 27 | ${{ runner.OS }}-node- 28 | ${{ runner.OS }}- 29 | - name: Install dependencies 30 | run: npm ci 31 | - name: Build 32 | env: 33 | COVERAGE: 1 34 | run: npm run all 35 | - name: Upload coverage 36 | run: npx codecov -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | coverage 3 | dist -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2021-present Camunda Services GmbH 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | comment: off 2 | 3 | parsers: 4 | javascript: 5 | enable_partials: yes -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- 1 | import alias from '@rollup/plugin-alias'; 2 | import babel from '@rollup/plugin-babel'; 3 | import commonjs from '@rollup/plugin-commonjs'; 4 | import copy from 'rollup-plugin-copy'; 5 | import json from '@rollup/plugin-json'; 6 | import reactSvg from 'rollup-plugin-react-svg'; 7 | import resolve from '@rollup/plugin-node-resolve'; 8 | 9 | import pkg from './package.json'; 10 | 11 | export default [ 12 | { 13 | input: 'src/index.js', 14 | output: [ 15 | { 16 | sourcemap: true, 17 | format: 'commonjs', 18 | file: pkg.main 19 | }, 20 | { 21 | sourcemap: true, 22 | format: 'esm', 23 | file: pkg.module 24 | } 25 | ], 26 | external: [ 27 | 'min-dash', 28 | 'preact', 29 | 'preact/jsx-runtime', 30 | 'preact/hooks', 31 | 'preact/compat', 32 | '@bpmn-io/properties-panel' 33 | ], 34 | plugins: [ 35 | alias({ 36 | entries: [ 37 | { find: 'react', replacement: 'preact/compat' }, 38 | { find: 'react-dom', replacement: 'preact/compat' } 39 | ] 40 | }), 41 | reactSvg(), 42 | babel({ 43 | babelHelpers: 'bundled', 44 | plugins: [ 45 | [ '@babel/plugin-transform-react-jsx', { 46 | 'importSource': 'preact', 47 | 'runtime': 'automatic' 48 | } ] 49 | ] 50 | }), 51 | copy({ 52 | targets: [ 53 | { src: 'node_modules/@bpmn-io/properties-panel/assets/**/*.css', dest: 'dist/assets' }, 54 | { src: 'assets/*.css', dest: 'dist/assets' } 55 | ] 56 | }), 57 | json(), 58 | resolve(), 59 | commonjs() 60 | ] 61 | } 62 | ]; -------------------------------------------------------------------------------- /src/cmd/MultiCommandHandler.js: -------------------------------------------------------------------------------- 1 | import { 2 | forEach 3 | } from 'min-dash'; 4 | 5 | /** 6 | * A handler that combines and executes multiple commands. 7 | * 8 | * All updates are bundled on the command stack and executed in one step. 9 | * This also makes it possible to revert the changes in one step. 10 | * 11 | * Example use case: remove the camunda:formKey attribute and in addition 12 | * add all form fields needed for the camunda:formData property. 13 | */ 14 | export default class MultiCommandHandler { 15 | constructor(commandStack) { 16 | this._commandStack = commandStack; 17 | } 18 | 19 | preExecute(context) { 20 | const commandStack = this._commandStack; 21 | 22 | forEach(context, function(command) { 23 | commandStack.execute(command.cmd, command.context); 24 | }); 25 | } 26 | } 27 | 28 | MultiCommandHandler.$inject = [ 'commandStack' ]; -------------------------------------------------------------------------------- /src/cmd/index.js: -------------------------------------------------------------------------------- 1 | import { 2 | forEach 3 | } from 'min-dash'; 4 | 5 | import UpdateBusinessObjectHandler from './UpdateBusinessObjectHandler'; 6 | import UpdateBusinessObjectListHandler from './UpdateBusinessObjectListHandler'; 7 | import MultiCommandHandler from './MultiCommandHandler'; 8 | 9 | const HANDLERS = { 10 | 'properties-panel.update-businessobject': UpdateBusinessObjectHandler, 11 | 'properties-panel.update-businessobject-list': UpdateBusinessObjectListHandler, 12 | 'properties-panel.multi-command-executor': MultiCommandHandler 13 | }; 14 | 15 | 16 | function CommandInitializer(eventBus, commandStack) { 17 | 18 | eventBus.on('diagram.init', function() { 19 | forEach(HANDLERS, function(handler, id) { 20 | commandStack.registerHandler(id, handler); 21 | }); 22 | }); 23 | } 24 | 25 | CommandInitializer.$inject = [ 'eventBus', 'commandStack' ]; 26 | 27 | export default { 28 | __init__: [ CommandInitializer ] 29 | }; -------------------------------------------------------------------------------- /src/context/BpmnPropertiesPanelContext.js: -------------------------------------------------------------------------------- 1 | import { 2 | createContext 3 | } from 'preact'; 4 | 5 | const BpmnPropertiesPanelContext = createContext({ 6 | selectedElement: null, 7 | injector: null, 8 | getService() { return null;} 9 | }); 10 | 11 | export default BpmnPropertiesPanelContext; -------------------------------------------------------------------------------- /src/context/index.js: -------------------------------------------------------------------------------- 1 | export { default as BpmnPropertiesPanelContext } from './BpmnPropertiesPanelContext'; -------------------------------------------------------------------------------- /src/entries/ReferenceSelect.js: -------------------------------------------------------------------------------- 1 | import { 2 | useEffect 3 | } from 'preact/hooks'; 4 | 5 | import { 6 | query as domQuery 7 | } from 'min-dom'; 8 | 9 | import { 10 | usePrevious 11 | } from '@bpmn-io/properties-panel/lib/hooks'; 12 | 13 | import SelectEntry from '@bpmn-io/properties-panel/lib/components/entries/Select'; 14 | 15 | 16 | export default function ReferenceSelectEntry(props) { 17 | const { 18 | autoFocusEntry, 19 | element, 20 | getOptions 21 | } = props; 22 | 23 | const options = getOptions(element); 24 | const prevOptions = usePrevious(options); 25 | 26 | // auto focus specifc other entry when options changed 27 | useEffect(() => { 28 | if (autoFocusEntry && prevOptions && options.length > prevOptions.length) { 29 | 30 | const entry = domQuery(`[data-entry-id="${autoFocusEntry}"]`); 31 | 32 | const focusableInput = domQuery('.bio-properties-panel-input', entry); 33 | 34 | if (focusableInput) { 35 | focusableInput.select(); 36 | } 37 | } 38 | }, [ options ]); 39 | 40 | return ( 41 | 42 | ); 43 | } -------------------------------------------------------------------------------- /src/hooks/index.js: -------------------------------------------------------------------------------- 1 | export { default as useService } from './useService'; -------------------------------------------------------------------------------- /src/hooks/useService.js: -------------------------------------------------------------------------------- 1 | import { 2 | useContext 3 | } from 'preact/hooks'; 4 | 5 | import { BpmnPropertiesPanelContext } from '../context'; 6 | 7 | 8 | export default function(type, strict) { 9 | const { 10 | getService 11 | } = useContext(BpmnPropertiesPanelContext); 12 | 13 | return getService(type, strict); 14 | } -------------------------------------------------------------------------------- /src/icons/bpmn-icon-business-rule-task.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-call-activity.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-collaboration.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-conditional-flow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-connection.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-data-input.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-data-object.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-data-output.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-default-flow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-end-event-cancel.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-end-event-compensation.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-end-event-error.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-end-event-escalation.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-end-event-link.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-end-event-message.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-end-event-multiple.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-end-event-none.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-end-event-signal.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-end-event-terminate.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-gateway-eventbased.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-gateway-none.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-gateway-or.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-intermediate-event-none.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-intermediate-event-throw-escalation.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-intermediate-event-throw-multiple.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-intermediate-event-throw-signal.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-lane.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-message-flow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-participant.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-receive-task.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-send-task.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-start-event-compensation.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-start-event-condition.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-start-event-error.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-start-event-escalation.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-start-event-message.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-start-event-multiple.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-start-event-none.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-start-event-parallel-multiple.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-start-event-signal.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-start-event-timer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-subprocess-collapsed.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-subprocess-expanded.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-task-none.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-text-annotation.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/icons/bpmn-icon-transaction.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | export { default as BpmnPropertiesPanelModule } from './render'; 2 | export { default as BpmnPropertiesProviderModule } from './provider/bpmn'; 3 | export { default as ZeebePropertiesProviderModule } from './provider/zeebe'; 4 | export { default as CamundaPlatformPropertiesProviderModule } from './provider/camunda-platform'; 5 | export { default as ElementTemplatesPropertiesProviderModule } from './provider/element-templates'; 6 | 7 | // hooks 8 | export { useService } from './hooks'; -------------------------------------------------------------------------------- /src/provider/bpmn/index.js: -------------------------------------------------------------------------------- 1 | import BpmnPropertiesProvider from './BpmnPropertiesProvider'; 2 | 3 | export default { 4 | __init__: [ 'bpmnPropertiesProvider' ], 5 | bpmnPropertiesProvider: [ 'type', BpmnPropertiesProvider ] 6 | }; -------------------------------------------------------------------------------- /src/provider/bpmn/properties/IdProps.js: -------------------------------------------------------------------------------- 1 | import { 2 | getBusinessObject, 3 | is 4 | } from 'bpmn-js/lib/util/ModelUtil'; 5 | 6 | import TextField, { isEdited } from '@bpmn-io/properties-panel/lib/components/entries/TextField'; 7 | 8 | import { 9 | useService 10 | } from '../../../hooks'; 11 | 12 | import { 13 | isIdValid 14 | } from '../utils/ValidationUtil'; 15 | 16 | 17 | /** 18 | * @typedef { import('@bpmn-io/properties-panel/lib/PropertiesPanel').EntryDefinition } Entry 19 | */ 20 | 21 | /** 22 | * @returns {Array} entries 23 | */ 24 | export function IdProps(props) { 25 | const { 26 | element 27 | } = props; 28 | 29 | return [ 30 | { 31 | id: 'id', 32 | component: , 33 | isEdited 34 | } 35 | ]; 36 | } 37 | 38 | function Id(props) { 39 | const { 40 | element 41 | } = props; 42 | 43 | const modeling = useService('modeling'); 44 | const debounce = useService('debounceInput'); 45 | const translate = useService('translate'); 46 | 47 | const setValue = (value) => { 48 | modeling.updateProperties(element, { 49 | id: value 50 | }); 51 | }; 52 | 53 | const getValue = (element) => { 54 | return element.businessObject.id; 55 | }; 56 | 57 | const validate = (value) => { 58 | const businessObject = getBusinessObject(element); 59 | 60 | return isIdValid(businessObject, value, translate); 61 | }; 62 | 63 | return TextField({ 64 | element, 65 | id: 'id', 66 | label: translate(is(element, 'bpmn:Participant') ? 'Participant ID' : 'ID'), 67 | getValue, 68 | setValue, 69 | debounce, 70 | validate 71 | }); 72 | } -------------------------------------------------------------------------------- /src/provider/bpmn/properties/LinkProps.js: -------------------------------------------------------------------------------- 1 | import TextField, { isEdited } from '@bpmn-io/properties-panel/lib/components/entries/TextField'; 2 | 3 | import { 4 | useService 5 | } from '../../../hooks'; 6 | 7 | import { 8 | getLinkEventDefinition, 9 | isLinkSupported 10 | } from '../utils/EventDefinitionUtil'; 11 | 12 | /** 13 | * @typedef { import('@bpmn-io/properties-panel/lib/PropertiesPanel').EntryDefinition } Entry 14 | */ 15 | 16 | /** 17 | * @returns {Array} entries 18 | */ 19 | export function LinkProps(props) { 20 | const { 21 | element 22 | } = props; 23 | 24 | if (!isLinkSupported(element)) { 25 | return []; 26 | } 27 | 28 | return [ 29 | { 30 | id: 'linkName', 31 | component: , 32 | isEdited 33 | }, 34 | ]; 35 | } 36 | 37 | function LinkName(props) { 38 | const { element } = props; 39 | 40 | const commandStack = useService('commandStack'); 41 | const translate = useService('translate'); 42 | const debounce = useService('debounceInput'); 43 | 44 | const linkEventDefinition = getLinkEventDefinition(element); 45 | 46 | const getValue = () => { 47 | return linkEventDefinition.get('name'); 48 | }; 49 | 50 | const setValue = (value) => { 51 | commandStack.execute('properties-panel.update-businessobject', { 52 | element: element, 53 | businessObject: linkEventDefinition, 54 | properties: { 55 | 'name': value 56 | } 57 | }); 58 | }; 59 | 60 | return TextField({ 61 | element, 62 | id: 'linkName', 63 | label: translate('Name'), 64 | getValue, 65 | setValue, 66 | debounce 67 | }); 68 | } 69 | -------------------------------------------------------------------------------- /src/provider/bpmn/properties/index.js: -------------------------------------------------------------------------------- 1 | export { CompensationProps } from './CompensationProps'; 2 | export { DocumentationProps } from './DocumentationProps'; 3 | export { ErrorProps } from './ErrorProps'; 4 | export { EscalationProps } from './EscalationProps'; 5 | export { ExecutableProps } from './ExecutableProps'; 6 | export { IdProps } from './IdProps'; 7 | export { LinkProps } from './LinkProps'; 8 | export { MessageProps } from './MessageProps'; 9 | export { MultiInstanceProps } from './MultiInstanceProps'; 10 | export { NameProps } from './NameProps'; 11 | export { ProcessProps } from './ProcessProps'; 12 | export { SignalProps } from './SignalProps'; 13 | export { TimerProps } from './TimerProps'; 14 | -------------------------------------------------------------------------------- /src/provider/bpmn/utils/ValidationUtil.js: -------------------------------------------------------------------------------- 1 | const SPACE_REGEX = /\s/; 2 | 3 | // for QName validation as per http://www.w3.org/TR/REC-xml/#NT-NameChar 4 | const QNAME_REGEX = /^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i; 5 | 6 | // for ID validation as per BPMN Schema (QName - Namespace) 7 | const ID_REGEX = /^[a-z_][\w-.]*$/i; 8 | 9 | /** 10 | * checks whether the id value is valid 11 | * 12 | * @param {ModdleElement} element 13 | * @param {String} idValue 14 | * @param {Function} translate 15 | * 16 | * @return {String} error message 17 | */ 18 | export function isIdValid(element, idValue, translate) { 19 | const assigned = element.$model.ids.assigned(idValue); 20 | const idAlreadyExists = assigned && assigned !== element; 21 | 22 | if (!idValue) { 23 | return translate('ID must not be empty.'); 24 | } 25 | 26 | if (idAlreadyExists) { 27 | return translate('ID must be unique.'); 28 | } 29 | 30 | return validateId(idValue, translate); 31 | } 32 | 33 | export function validateId(idValue, translate) { 34 | 35 | if (containsSpace(idValue)) { 36 | return translate('ID must not contain spaces.'); 37 | } 38 | 39 | if (!ID_REGEX.test(idValue)) { 40 | 41 | if (QNAME_REGEX.test(idValue)) { 42 | return translate('ID must not contain prefix.'); 43 | } 44 | 45 | return translate('ID must be a valid QName.'); 46 | } 47 | } 48 | 49 | export function containsSpace(value) { 50 | return SPACE_REGEX.test(value); 51 | } -------------------------------------------------------------------------------- /src/provider/camunda-platform/index.js: -------------------------------------------------------------------------------- 1 | import CamundaPlatformPropertiesProvider from './CamundaPlatformPropertiesProvider'; 2 | 3 | export default { 4 | __init__: [ 'camundaPlatformPropertiesProvider' ], 5 | camundaPlatformPropertiesProvider: [ 'type', CamundaPlatformPropertiesProvider ] 6 | }; -------------------------------------------------------------------------------- /src/provider/camunda-platform/properties/HistoryCleanupProps.js: -------------------------------------------------------------------------------- 1 | import { 2 | getBusinessObject, 3 | is 4 | } from 'bpmn-js/lib/util/ModelUtil'; 5 | 6 | import TextField, { isEdited as textFieldIsEdited } from '@bpmn-io/properties-panel/lib/components/entries/TextField'; 7 | 8 | import { 9 | useService 10 | } from '../../../hooks'; 11 | 12 | 13 | export function HistoryCleanupProps(props) { 14 | const { 15 | element 16 | } = props; 17 | 18 | const businessObject = getBusinessObject(element); 19 | 20 | if (!is(element, 'bpmn:Process') && 21 | !(is(element, 'bpmn:Participant') && businessObject.get('processRef'))) { 22 | return []; 23 | } 24 | 25 | return [ 26 | { 27 | id: 'historyTimeToLive', 28 | component: , 29 | isEdited: textFieldIsEdited 30 | }, 31 | ]; 32 | } 33 | 34 | function HistoryTimeToLive(props) { 35 | const { element } = props; 36 | 37 | const commandStack = useService('commandStack'); 38 | const translate = useService('translate'); 39 | const debounce = useService('debounceInput'); 40 | 41 | const process = getProcess(element); 42 | 43 | const getValue = () => { 44 | return process.get('camunda:historyTimeToLive') || ''; 45 | }; 46 | 47 | const setValue = (value) => { 48 | commandStack.execute('properties-panel.update-businessobject', { 49 | element: element, 50 | businessObject: process, 51 | properties: { 52 | 'camunda:historyTimeToLive': value 53 | } 54 | }); 55 | }; 56 | 57 | return TextField({ 58 | element, 59 | id: 'historyTimeToLive', 60 | label: translate('Time to live'), 61 | getValue, 62 | setValue, 63 | debounce 64 | }); 65 | } 66 | 67 | 68 | // helper ////////////////// 69 | 70 | function getProcess(element) { 71 | return is(element, 'bpmn:Process') ? 72 | getBusinessObject(element) : 73 | getBusinessObject(element).get('processRef'); 74 | } 75 | -------------------------------------------------------------------------------- /src/provider/camunda-platform/properties/InitiatorProps.js: -------------------------------------------------------------------------------- 1 | import { 2 | getBusinessObject, 3 | is 4 | } from 'bpmn-js/lib/util/ModelUtil'; 5 | 6 | import TextField, { isEdited } from '@bpmn-io/properties-panel/lib/components/entries/TextField'; 7 | 8 | import { 9 | useService 10 | } from '../../../hooks'; 11 | 12 | 13 | export function InitiatorProps(props) { 14 | const { 15 | element 16 | } = props; 17 | 18 | if (!isInitiator(element)) { 19 | return []; 20 | } 21 | 22 | return [ 23 | { 24 | id: 'initiator', 25 | component: , 26 | isEdited 27 | }, 28 | ]; 29 | } 30 | 31 | function Initiator(props) { 32 | const { element } = props; 33 | 34 | const commandStack = useService('commandStack'); 35 | const translate = useService('translate'); 36 | const debounce = useService('debounceInput'); 37 | 38 | const businessObject = getBusinessObject(element); 39 | 40 | const getValue = () => { 41 | return businessObject.get('camunda:initiator'); 42 | }; 43 | 44 | const setValue = (value) => { 45 | commandStack.execute('properties-panel.update-businessobject', { 46 | element: element, 47 | businessObject: businessObject, 48 | properties: { 49 | 'camunda:initiator': value 50 | } 51 | }); 52 | }; 53 | 54 | return TextField({ 55 | element, 56 | id: 'initiator', 57 | label: translate('Initiator'), 58 | getValue, 59 | setValue, 60 | debounce 61 | }); 62 | } 63 | 64 | 65 | // helper /////////////////// 66 | 67 | function isInitiator(element) { 68 | return is(element, 'camunda:Initiator') && !is(element.parent, 'bpmn:SubProcess'); 69 | } -------------------------------------------------------------------------------- /src/provider/camunda-platform/properties/InputProps.js: -------------------------------------------------------------------------------- 1 | import InputOutputParameter from './InputOutputParameter'; 2 | 3 | import { 4 | AddParameterCmd, 5 | areInputParametersSupported, 6 | getInputParameters, 7 | getInputOutput 8 | } from '../utils/InputOutputUtil'; 9 | 10 | 11 | export function InputProps(props) { 12 | const { 13 | element, 14 | injector 15 | } = props; 16 | 17 | if (!areInputParametersSupported(element)) { 18 | return null; 19 | } 20 | 21 | const inputParameters = getInputParameters(element) || []; 22 | 23 | const bpmnFactory = injector.get('bpmnFactory'), 24 | commandStack = injector.get('commandStack'); 25 | 26 | const items = inputParameters.map((parameter, index) => { 27 | const id = element.id + '-inputParameter-' + index; 28 | 29 | return { 30 | id, 31 | label: parameter.get('name') || '', 32 | entries: InputOutputParameter({ 33 | idPrefix: id, 34 | element, 35 | parameter 36 | }), 37 | autoFocusEntry: id + '-name', 38 | remove: removeFactory({ element, commandStack, parameter }) 39 | }; 40 | }); 41 | 42 | function add(event) { 43 | event.stopPropagation(); 44 | 45 | commandStack.execute( 46 | 'properties-panel.multi-command-executor', 47 | AddParameterCmd(element, 'camunda:InputParameter', bpmnFactory) 48 | ); 49 | } 50 | 51 | return { 52 | items, 53 | add 54 | }; 55 | } 56 | 57 | function removeFactory(props) { 58 | const { 59 | commandStack, 60 | element, 61 | parameter 62 | } = props; 63 | 64 | return function(event) { 65 | event.stopPropagation(); 66 | 67 | const inputOutput = getInputOutput(element); 68 | 69 | if (!inputOutput) { 70 | return; 71 | } 72 | 73 | commandStack.execute('properties-panel.update-businessobject-list', { 74 | element: element, 75 | currentObject: inputOutput, 76 | propertyName: 'inputParameters', 77 | objectsToRemove: [ parameter ] 78 | }); 79 | }; 80 | } 81 | -------------------------------------------------------------------------------- /src/provider/camunda-platform/properties/OutputProps.js: -------------------------------------------------------------------------------- 1 | import InputOutputParameter from './InputOutputParameter'; 2 | 3 | import { 4 | AddParameterCmd, 5 | areOutputParametersSupported, 6 | getOutputParameters, 7 | getInputOutput 8 | } from '../utils/InputOutputUtil'; 9 | 10 | 11 | export function OutputProps({ element, injector }) { 12 | 13 | if (!areOutputParametersSupported(element)) { 14 | return null; 15 | } 16 | 17 | const outputParameters = getOutputParameters(element) || []; 18 | 19 | const bpmnFactory = injector.get('bpmnFactory'), 20 | commandStack = injector.get('commandStack'); 21 | 22 | const items = outputParameters.map((parameter, index) => { 23 | const id = element.id + '-outputParameter-' + index; 24 | 25 | return { 26 | id, 27 | label: parameter.get('name') || '', 28 | entries: InputOutputParameter({ 29 | idPrefix: id, 30 | element, 31 | parameter 32 | }), 33 | autoFocusEntry: id + '-name', 34 | remove: removeFactory({ commandStack, element, parameter }) 35 | }; 36 | }); 37 | 38 | return { 39 | items, 40 | add: addFactory({ bpmnFactory, commandStack, element }) 41 | }; 42 | } 43 | 44 | function removeFactory({ commandStack, element, parameter }) { 45 | return function(event) { 46 | event.stopPropagation(); 47 | 48 | const inputOutput = getInputOutput(element); 49 | 50 | if (!inputOutput) { 51 | return; 52 | } 53 | 54 | commandStack.execute('properties-panel.update-businessobject-list', { 55 | element: element, 56 | currentObject: inputOutput, 57 | propertyName: 'outputParameters', 58 | objectsToRemove: [ parameter ] 59 | }); 60 | }; 61 | } 62 | 63 | function addFactory({ bpmnFactory, commandStack, element }) { 64 | return function(event) { 65 | event.stopPropagation(); 66 | 67 | commandStack.execute( 68 | 'properties-panel.multi-command-executor', 69 | AddParameterCmd(element, 'camunda:OutputParameter', bpmnFactory) 70 | ); 71 | }; 72 | } 73 | -------------------------------------------------------------------------------- /src/provider/camunda-platform/properties/ScriptTaskProps.js: -------------------------------------------------------------------------------- 1 | import { 2 | is, 3 | getBusinessObject 4 | } from 'bpmn-js/lib/util/ModelUtil'; 5 | 6 | import TextField, { isEdited as textFieldIsEdited } from '@bpmn-io/properties-panel/lib/components/entries/TextField'; 7 | 8 | import { 9 | useService 10 | } from '../../../hooks'; 11 | 12 | import { 13 | ScriptProps 14 | } from './ScriptProps'; 15 | 16 | 17 | export function ScriptTaskProps(props) { 18 | const { 19 | element 20 | } = props; 21 | 22 | if (!is(element, 'bpmn:ScriptTask')) { 23 | return []; 24 | } 25 | 26 | const entries = [ 27 | ...ScriptProps({ element }) 28 | ]; 29 | 30 | entries.push({ 31 | id: 'scriptResultVariable', 32 | component: , 33 | isEdited: textFieldIsEdited 34 | }); 35 | 36 | return entries; 37 | } 38 | 39 | function ResultVariable(props) { 40 | const { element } = props; 41 | 42 | const commandStack = useService('commandStack'); 43 | const translate = useService('translate'); 44 | const debounce = useService('debounceInput'); 45 | 46 | const businessObject = getBusinessObject(element); 47 | 48 | const getValue = () => { 49 | return businessObject.get('camunda:resultVariable'); 50 | }; 51 | 52 | 53 | const setValue = (value) => { 54 | commandStack.execute('properties-panel.update-businessobject', { 55 | element: element, 56 | businessObject: businessObject, 57 | properties: { 58 | 'camunda:resultVariable': value 59 | } 60 | }); 61 | }; 62 | 63 | return TextField({ 64 | element, 65 | id: 'scriptResultVariable', 66 | label: translate('Result variable'), 67 | getValue, 68 | setValue, 69 | debounce 70 | }); 71 | } -------------------------------------------------------------------------------- /src/provider/camunda-platform/properties/TasklistProps.js: -------------------------------------------------------------------------------- 1 | import { 2 | getBusinessObject, 3 | is 4 | } from 'bpmn-js/lib/util/ModelUtil'; 5 | 6 | import Checkbox from '@bpmn-io/properties-panel/lib/components/entries/Checkbox'; 7 | 8 | import { 9 | useService 10 | } from '../../../hooks'; 11 | 12 | 13 | export function TasklistProps(props) { 14 | const { 15 | element 16 | } = props; 17 | 18 | const businessObject = getBusinessObject(element); 19 | 20 | const isEdited = (node) => { 21 | return node && !node.checked; 22 | }; 23 | 24 | if (!is(element, 'bpmn:Process') && 25 | !(is(element, 'bpmn:Participant') && businessObject.get('processRef'))) { 26 | return []; 27 | } 28 | 29 | return [ 30 | { 31 | id: 'isStartableInTasklist', 32 | component: , 33 | isEdited 34 | }, 35 | ]; 36 | } 37 | 38 | function Startable(props) { 39 | const { element } = props; 40 | 41 | const commandStack = useService('commandStack'); 42 | const translate = useService('translate'); 43 | 44 | const process = getProcess(element); 45 | 46 | const getValue = () => { 47 | return process.get('camunda:isStartableInTasklist'); 48 | }; 49 | 50 | const setValue = (value) => { 51 | commandStack.execute('properties-panel.update-businessobject', { 52 | element: element, 53 | businessObject: process, 54 | properties: { 55 | 'camunda:isStartableInTasklist': value 56 | } 57 | }); 58 | }; 59 | 60 | return Checkbox({ 61 | element, 62 | id: 'isStartableInTasklist', 63 | label: translate('Startable'), 64 | getValue, 65 | setValue 66 | }); 67 | } 68 | 69 | 70 | // helper ////////////////// 71 | 72 | function getProcess(element) { 73 | return is(element, 'bpmn:Process') ? 74 | getBusinessObject(element) : 75 | getBusinessObject(element).get('processRef'); 76 | } 77 | -------------------------------------------------------------------------------- /src/provider/camunda-platform/properties/VersionTagProps.js: -------------------------------------------------------------------------------- 1 | import { 2 | getBusinessObject, 3 | is 4 | } from 'bpmn-js/lib/util/ModelUtil'; 5 | 6 | import TextField, { isEdited as textFieldIsEdited } from '@bpmn-io/properties-panel/lib/components/entries/TextField'; 7 | 8 | import { 9 | useService 10 | } from '../../../hooks'; 11 | 12 | 13 | export function VersionTagProps(props) { 14 | const { 15 | element 16 | } = props; 17 | 18 | const businessObject = getBusinessObject(element); 19 | 20 | if (!is(element, 'bpmn:Process') && 21 | !(is(element, 'bpmn:Participant') && businessObject.get('processRef'))) { 22 | return []; 23 | } 24 | 25 | return [ 26 | { 27 | id: 'versionTag', 28 | component: , 29 | isEdited: textFieldIsEdited 30 | }, 31 | ]; 32 | } 33 | 34 | function VersionTag(props) { 35 | const { element } = props; 36 | 37 | const commandStack = useService('commandStack'); 38 | const translate = useService('translate'); 39 | const debounce = useService('debounceInput'); 40 | 41 | const process = getProcess(element); 42 | 43 | const getValue = () => { 44 | return process.get('camunda:versionTag') || ''; 45 | }; 46 | 47 | const setValue = (value) => { 48 | commandStack.execute('properties-panel.update-businessobject', { 49 | element: element, 50 | businessObject: process, 51 | properties: { 52 | 'camunda:versionTag': value 53 | } 54 | }); 55 | }; 56 | 57 | return TextField({ 58 | element, 59 | id: 'versionTag', 60 | label: translate('Version tag'), 61 | getValue, 62 | setValue, 63 | debounce 64 | }); 65 | } 66 | 67 | 68 | // helper ////////////////// 69 | 70 | function getProcess(element) { 71 | return is(element, 'bpmn:Process') ? 72 | getBusinessObject(element) : 73 | getBusinessObject(element).get('processRef'); 74 | } -------------------------------------------------------------------------------- /src/provider/camunda-platform/properties/index.js: -------------------------------------------------------------------------------- 1 | export { AsynchronousContinuationsProps } from './AsynchronousContinuationsProps'; 2 | export { BusinessKeyProps } from './BusinessKeyProps'; 3 | export { CallActivityProps } from './CallActivityProps'; 4 | export { CandidateStarterProps } from './CandidateStarterProps'; 5 | export { ConditionProps } from './ConditionProps'; 6 | export { ConnectorInputProps } from './ConnectorInputProps'; 7 | export { ConnectorOutputProps } from './ConnectorOutputProps'; 8 | export { ErrorProps } from './ErrorProps'; 9 | export { ErrorsProps } from './ErrorsProps'; 10 | export { EscalationProps } from './EscalationProps'; 11 | export { ExtensionPropertiesProps } from './ExtensionPropertiesProps'; 12 | export { ExternalTaskPriorityProps } from './ExternalTaskPriorityProps'; 13 | export { FieldInjectionProps } from './FieldInjectionProps'; 14 | export { FormDataProps } from './FormDataProps'; 15 | export { FormProps } from './FormProps'; 16 | export { HistoryCleanupProps } from './HistoryCleanupProps'; 17 | export { ImplementationProps } from './ImplementationProps'; 18 | export { InitiatorProps } from './InitiatorProps'; 19 | export { InMappingPropagationProps } from './InMappingPropagationProps'; 20 | export { InMappingProps } from './InMappingProps'; 21 | export { InputProps } from './InputProps'; 22 | export { JobExecutionProps } from './JobExecutionProps'; 23 | export { MultiInstanceProps } from './MultiInstanceProps'; 24 | export { OutMappingPropagationProps } from './OutMappingPropagationProps'; 25 | export { OutMappingProps } from './OutMappingProps'; 26 | export { OutputProps } from './OutputProps'; 27 | export { ExecutionListenerProps } from './ListenerProps'; 28 | export { TaskListenerProps } from './ListenerProps'; 29 | export { ProcessVariablesProps } from './ProcessVariablesProps'; 30 | export { ScriptTaskProps } from './ScriptTaskProps'; 31 | export { TasklistProps } from './TasklistProps'; 32 | export { UserAssignmentProps } from './UserAssignmentProps'; 33 | export { VersionTagProps } from './VersionTagProps'; 34 | -------------------------------------------------------------------------------- /src/provider/camunda-platform/utils/ConnectorUtil.js: -------------------------------------------------------------------------------- 1 | import { 2 | getExtensionElementsList 3 | } from './ExtensionElementsUtil'; 4 | 5 | import { 6 | getImplementationType, 7 | getServiceTaskLikeBusinessObject 8 | } from './ImplementationTypeUtils'; 9 | 10 | export function areConnectorsSupported(element) { 11 | const businessObject = getServiceTaskLikeBusinessObject(element); 12 | return businessObject && getImplementationType(businessObject) === 'connector'; 13 | } 14 | 15 | export function getConnectors(businessObject) { 16 | return getExtensionElementsList(businessObject, 'camunda:Connector'); 17 | } 18 | 19 | export function getConnector(element) { 20 | const businessObject = getServiceTaskLikeBusinessObject(element); 21 | const connectors = getConnectors(businessObject); 22 | 23 | return connectors[0]; 24 | } -------------------------------------------------------------------------------- /src/provider/camunda-platform/utils/FormTypeUtils.js: -------------------------------------------------------------------------------- 1 | import { isDefined } from 'min-dash'; 2 | 3 | import { 4 | getBusinessObject, 5 | is 6 | } from 'bpmn-js/lib/util/ModelUtil'; 7 | 8 | export function getFormRefBinding(element) { 9 | const businessObject = getBusinessObject(element); 10 | 11 | return businessObject.get('camunda:formRefBinding') || 'latest'; 12 | } 13 | 14 | export function getFormType(element) { 15 | const businessObject = getBusinessObject(element); 16 | 17 | if (isDefined(businessObject.get('camunda:formKey'))) { 18 | return 'formKey'; 19 | } else if (isDefined(businessObject.get('camunda:formRef'))) { 20 | return 'formRef'; 21 | } 22 | } 23 | 24 | export function isFormSupported(element) { 25 | return (is(element, 'bpmn:StartEvent') && !is(element.parent, 'bpmn:SubProcess')) 26 | || is(element, 'bpmn:UserTask'); 27 | } -------------------------------------------------------------------------------- /src/provider/element-templates/ReplaceBehavior.js: -------------------------------------------------------------------------------- 1 | import { is } from 'bpmn-js/lib/util/ModelUtil'; 2 | 3 | /** 4 | * This function catches the event 5 | * and only allows the copy of the modelerTemplate property 6 | * if the element's type or its parent's is in 7 | * the list of elements the template applies to. 8 | */ 9 | export default function ReplaceBehavior(elementTemplates, eventBus) { 10 | eventBus.on('moddleCopy.canCopyProperty', function(context) { 11 | const { 12 | parent, 13 | property, 14 | propertyName 15 | } = context; 16 | 17 | if (propertyName !== 'modelerTemplate') { 18 | return; 19 | } 20 | 21 | const elementTemplate = elementTemplates.get(property); 22 | 23 | if (!elementTemplate) { 24 | return false; 25 | } 26 | 27 | const { appliesTo } = elementTemplate; 28 | 29 | const allowed = appliesTo.reduce((allowed, type) => { 30 | return allowed || is(parent, type); 31 | }, false); 32 | 33 | if (!allowed) { 34 | return false; 35 | } 36 | }); 37 | } 38 | 39 | ReplaceBehavior.$inject = [ 40 | 'elementTemplates', 41 | 'eventBus' 42 | ]; 43 | -------------------------------------------------------------------------------- /src/provider/element-templates/cmd/index.js: -------------------------------------------------------------------------------- 1 | import ChangeElementTemplateHandler from './ChangeElementTemplateHandler'; 2 | 3 | function registerHandlers(commandStack, elementTemplates, eventBus) { 4 | commandStack.registerHandler( 5 | 'propertiesPanel.camunda.changeTemplate', 6 | ChangeElementTemplateHandler 7 | ); 8 | 9 | // apply default element templates on shape creation 10 | eventBus.on([ 'commandStack.shape.create.postExecuted' ], function(context) { 11 | applyDefaultTemplate(context.context.shape, elementTemplates, commandStack); 12 | }); 13 | 14 | // apply default element templates on connection creation 15 | eventBus.on([ 'commandStack.connection.create.postExecuted' ], function(context) { 16 | applyDefaultTemplate(context.context.connection, elementTemplates, commandStack); 17 | }); 18 | } 19 | 20 | registerHandlers.$inject = [ 'commandStack', 'elementTemplates', 'eventBus' ]; 21 | 22 | 23 | export default { 24 | __init__: [ registerHandlers ] 25 | }; 26 | 27 | 28 | function applyDefaultTemplate(element, elementTemplates, commandStack) { 29 | 30 | if (!elementTemplates.get(element) && elementTemplates.getDefault(element)) { 31 | 32 | const command = 'propertiesPanel.camunda.changeTemplate'; 33 | const commandContext = { 34 | element: element, 35 | newTemplate: elementTemplates.getDefault(element) 36 | }; 37 | 38 | commandStack.execute(command, commandContext); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/provider/element-templates/components/TemplateProps.js: -------------------------------------------------------------------------------- 1 | import { useService } from '../../../hooks'; 2 | 3 | import { getVersionOrDateFromTemplate } from '../util/templateUtil'; 4 | 5 | export function TemplateProps({ element, elementTemplates }) { 6 | const template = elementTemplates.get(element); 7 | 8 | if (!template) { 9 | return []; 10 | } 11 | 12 | return [ 13 | { 14 | id: 'template-name', 15 | component: 16 | }, 17 | { 18 | id: 'template-version', 19 | component: 20 | }, 21 | { 22 | id: 'template-description', 23 | component: 24 | } 25 | ].filter(entry => !!entry.component); 26 | } 27 | 28 | function TemplateName({ id, template }) { 29 | const translate = useService('translate'); 30 | 31 | return ; 32 | } 33 | 34 | function TemplateVersion({ id, template }) { 35 | const translate = useService('translate'); 36 | 37 | const version = getVersionOrDateFromTemplate(template); 38 | 39 | return version ? : null; 40 | } 41 | 42 | function TemplateDescription({ id, template }) { 43 | const translate = useService('translate'); 44 | 45 | const { description } = template; 46 | 47 | return description ? 48 | : 49 | null; 50 | } 51 | 52 | function TextEntry({ id, label, content }) { 53 | return
54 | { label } 55 | { content } 56 |
; 57 | } 58 | -------------------------------------------------------------------------------- /src/provider/element-templates/components/index.js: -------------------------------------------------------------------------------- 1 | export { ElementTemplatesGroup } from './ElementTemplatesGroup'; 2 | export { TemplateProps } from './TemplateProps'; 3 | -------------------------------------------------------------------------------- /src/provider/element-templates/index.js: -------------------------------------------------------------------------------- 1 | import translateModule from 'diagram-js/lib/i18n/translate'; 2 | 3 | import ElementTemplates from './ElementTemplates'; 4 | import ElementTemplatesLoader from './ElementTemplatesLoader'; 5 | import ReplaceBehavior from './ReplaceBehavior'; 6 | import commandsModule from './cmd'; 7 | import ElementTemplatesPropertiesProvider from './ElementTemplatesPropertiesProvider'; 8 | 9 | import camundaPlatformPropertiesProviderModule from '../camunda-platform'; 10 | 11 | export default { 12 | __depends__: [ 13 | commandsModule, 14 | translateModule, 15 | camundaPlatformPropertiesProviderModule 16 | ], 17 | __init__: [ 18 | 'elementTemplatesLoader', 19 | 'replaceBehavior', 20 | 'elementTemplatesPropertiesProvider' 21 | ], 22 | elementTemplates: [ 'type', ElementTemplates ], 23 | elementTemplatesLoader: [ 'type', ElementTemplatesLoader ], 24 | replaceBehavior: [ 'type', ReplaceBehavior ], 25 | elementTemplatesPropertiesProvider: [ 'type', ElementTemplatesPropertiesProvider ] 26 | }; 27 | -------------------------------------------------------------------------------- /src/provider/element-templates/properties/index.js: -------------------------------------------------------------------------------- 1 | export { CustomProperties } from './CustomProperties'; 2 | export { ErrorProperties } from './ErrorProperties'; 3 | export { InputProperties } from './InputProperties'; 4 | export { OutputProperties } from './OutputProperties'; -------------------------------------------------------------------------------- /src/provider/element-templates/util/handleLegacyScopes.js: -------------------------------------------------------------------------------- 1 | import { 2 | assign, 3 | forEach, 4 | isObject, 5 | keys 6 | } from 'min-dash'; 7 | 8 | /** 9 | * Converts legacy scopes descriptor to newer supported array structure. 10 | * 11 | * For example, it transforms 12 | * 13 | * scopes: { 14 | * 'camunda:Connector': 15 | * { properties: [] 16 | * } 17 | * } 18 | * 19 | * to 20 | * 21 | * scopes: [ 22 | * { 23 | * type: 'camunda:Connector', 24 | * properties: [] 25 | * } 26 | * ] 27 | * 28 | * @param {ScopesDescriptor} scopes 29 | * 30 | * @returns {Array} 31 | */ 32 | export default function handleLegacyScopes(scopes = []) { 33 | const scopesAsArray = []; 34 | 35 | if (!isObject(scopes)) { 36 | return scopes; 37 | } 38 | 39 | forEach(keys(scopes), function(scopeName) { 40 | scopesAsArray.push(assign({ 41 | type: scopeName 42 | }, scopes[scopeName])); 43 | }); 44 | 45 | return scopesAsArray; 46 | } 47 | -------------------------------------------------------------------------------- /src/provider/element-templates/util/validate.js: -------------------------------------------------------------------------------- 1 | import { Validator } from '../Validator'; 2 | 3 | /** 4 | * Validate the given template descriptors and 5 | * return a list of errors. 6 | * 7 | * @param {Array} descriptors 8 | * 9 | * @return {Array} 10 | */ 11 | export default function validate(descriptors) { 12 | return new Validator().addAll(descriptors).getErrors(); 13 | } 14 | -------------------------------------------------------------------------------- /src/provider/zeebe/index.js: -------------------------------------------------------------------------------- 1 | import ZeebePropertiesProvider from './ZeebePropertiesProvider'; 2 | 3 | export default { 4 | __init__: [ 'zeebePropertiesProvider' ], 5 | zeebePropertiesProvider: [ 'type', ZeebePropertiesProvider ] 6 | }; -------------------------------------------------------------------------------- /src/provider/zeebe/properties/index.js: -------------------------------------------------------------------------------- 1 | export { AssignmentDefinitionProps } from './AssignmentDefinitionProps'; 2 | export { BusinessRuleImplementationProps } from './BusinessRuleImplementationProps'; 3 | export { CalledDecisionProps } from './CalledDecisionProps'; 4 | export { ConditionProps } from './ConditionProps'; 5 | export { FormProps } from './FormProps'; 6 | export { HeaderProps } from './HeaderProps'; 7 | export { InputProps } from './InputProps'; 8 | export { MessageProps } from './MessageProps'; 9 | export { MultiInstanceProps } from './MultiInstanceProps'; 10 | export { OutputPropagationProps } from './OutputPropagationProps'; 11 | export { OutputProps } from './OutputProps'; 12 | export { TargetProps } from './TargetProps'; 13 | export { TaskDefinitionProps } from './TaskDefinitionProps'; 14 | export { TimerProps } from './TimerProps'; 15 | -------------------------------------------------------------------------------- /src/provider/zeebe/utils/CalledElementUtil.js: -------------------------------------------------------------------------------- 1 | import { 2 | getBusinessObject 3 | } from 'bpmn-js/lib/util/ModelUtil'; 4 | 5 | import { 6 | getExtensionElementsList 7 | } from './ExtensionElementsUtil'; 8 | 9 | 10 | export function getPropagateAllChildVariables(element) { 11 | const calledElement = getCalledElement(element); 12 | 13 | return calledElement ? calledElement.get('propagateAllChildVariables') : undefined; 14 | } 15 | 16 | export function getProcessId(element) { 17 | const calledElement = getCalledElement(element); 18 | 19 | return calledElement ? calledElement.get('processId') : ''; 20 | } 21 | 22 | export function getCalledElement(element) { 23 | const calledElements = getCalledElements(element); 24 | return calledElements[0]; 25 | } 26 | 27 | function getCalledElements(element) { 28 | const bo = getBusinessObject(element); 29 | const extElements = getExtensionElementsList(bo, 'zeebe:CalledElement'); 30 | return extElements; 31 | } 32 | -------------------------------------------------------------------------------- /src/provider/zeebe/utils/ExtensionElementsUtil.js: -------------------------------------------------------------------------------- 1 | import { 2 | is 3 | } from 'bpmn-js/lib/util/ModelUtil'; 4 | 5 | 6 | /** 7 | * getExtensionElementsList - get the extensionElements of a given type for a given 8 | * businessObject as list. Will return an empty list if no extensionElements (of 9 | * given type) are present 10 | * 11 | * @param {ModdleElement} businessObject 12 | * @param {string} [type=undefined] 13 | * @return {Array} 14 | */ 15 | export function getExtensionElementsList(businessObject, type = undefined) { 16 | const elements = ((businessObject.get('extensionElements') && 17 | businessObject.get('extensionElements').get('values')) || []); 18 | 19 | return (elements.length && type) ? 20 | elements.filter((value) => is(value, type)) : 21 | elements; 22 | } 23 | -------------------------------------------------------------------------------- /src/provider/zeebe/utils/HeadersUtil.js: -------------------------------------------------------------------------------- 1 | import { 2 | getBusinessObject, 3 | is 4 | } from 'bpmn-js/lib/util/ModelUtil'; 5 | 6 | import { 7 | getExtensionElementsList 8 | } from './ExtensionElementsUtil'; 9 | import { isZeebeServiceTask } from './ZeebeServiceTaskUtil'; 10 | 11 | export function areHeadersSupported(element) { 12 | return is(element, 'bpmn:UserTask') || isZeebeServiceTask(element); 13 | } 14 | 15 | /** 16 | * Get first zeebe:TaskHeaders element for a specific element. 17 | * 18 | * @param {ModdleElement} element 19 | * 20 | * @return {ModdleElement} a zeebe:TaskHeader element 21 | */ 22 | export function getTaskHeaders(element) { 23 | const businessObject = getBusinessObject(element); 24 | 25 | return getExtensionElementsList(businessObject, 'zeebe:TaskHeaders')[0]; 26 | } 27 | 28 | /** 29 | * Retrieve all zeebe:Header elements for a specific element. 30 | * 31 | * @param {ModdleElement} element 32 | * 33 | * @return {Array} a list of zeebe:Header elements 34 | */ 35 | export function getHeaders(element) { 36 | const taskHeaders = getTaskHeaders(element); 37 | 38 | return taskHeaders ? taskHeaders.get('values') : []; 39 | } 40 | -------------------------------------------------------------------------------- /src/provider/zeebe/utils/ZeebeServiceTaskUtil.js: -------------------------------------------------------------------------------- 1 | import { 2 | is 3 | } from 'bpmn-js/lib/util/ModelUtil'; 4 | 5 | import { 6 | getMessageEventDefinition 7 | } from '../../bpmn/utils/EventDefinitionUtil'; 8 | 9 | 10 | export function isZeebeServiceTask(element) { 11 | if (!is(element, 'zeebe:ZeebeServiceTask')) return false; 12 | 13 | if (is(element, 'bpmn:EndEvent') || is(element, 'bpmn:IntermediateThrowEvent')) { 14 | return !!getMessageEventDefinition(element); 15 | } 16 | 17 | // Due to delayed Zeebe 1.3 implementation, temporarily unbuild this 18 | // TODO: re-enable for Zeebe 1.4 release 19 | // Cf. https://github.com/camunda/camunda-modeler/issues/2524#issuecomment-979049379 20 | // A BusinessRuleTask is per default not a ServiceTask, only if it has a TaskDefinition 21 | // (ie. if the implementation is set to ==JobWorker) 22 | /* if (is(element, 'bpmn:BusinessRuleTask') && !getTaskDefinition(element)) { 23 | return false; 24 | }*/ 25 | 26 | return true; 27 | } 28 | 29 | export function isMessageEndEvent(element) { 30 | return is(element, 'bpmn:EndEvent') && !!getMessageEventDefinition(element); 31 | } 32 | 33 | export function isMessageThrowEvent(element) { 34 | return is(element, 'bpmn:IntermediateThrowEvent') && !!getMessageEventDefinition(element); 35 | } 36 | 37 | // helper //////////////// 38 | 39 | /* function getTaskDefinition(element) { 40 | const businessObject = getBusinessObject(element); 41 | 42 | return getExtensionElementsList(businessObject, 'zeebe:TaskDefinition')[0]; 43 | }*/ 44 | -------------------------------------------------------------------------------- /src/render/index.js: -------------------------------------------------------------------------------- 1 | import BpmnPropertiesPanelRenderer from './BpmnPropertiesPanelRenderer'; 2 | 3 | import Commands from '../cmd'; 4 | import DebounceInputModule from '@bpmn-io/properties-panel/lib/features/debounce-input'; 5 | 6 | export default { 7 | __depends__: [ 8 | Commands, 9 | DebounceInputModule 10 | ], 11 | __init__: [ 12 | 'propertiesPanel' 13 | ], 14 | propertiesPanel: [ 'type', BpmnPropertiesPanelRenderer ] 15 | }; -------------------------------------------------------------------------------- /src/utils/ElementUtil.js: -------------------------------------------------------------------------------- 1 | import Ids from 'ids'; 2 | 3 | import { 4 | is 5 | } from 'bpmn-js/lib/util/ModelUtil'; 6 | 7 | /** 8 | * Create a new element and set its parent. 9 | * 10 | * @param {String} elementType of the new element 11 | * @param {Object} properties of the new element in key-value pairs 12 | * @param {moddle.object} parent of the new element 13 | * @param {BpmnFactory} factory which creates the new element 14 | * 15 | * @returns {djs.model.Base} element which is created 16 | */ 17 | export function createElement(elementType, properties, parent, factory) { 18 | const element = factory.create(elementType, properties); 19 | element.$parent = parent; 20 | 21 | return element; 22 | } 23 | 24 | /** 25 | * generate a semantic id with given prefix 26 | */ 27 | export function nextId(prefix) { 28 | const ids = new Ids([32,32,1]); 29 | 30 | return ids.nextPrefixed(prefix); 31 | } 32 | 33 | export function getRoot(businessObject) { 34 | let parent = businessObject; 35 | 36 | while (parent.$parent) { 37 | parent = parent.$parent; 38 | } 39 | 40 | return parent; 41 | } 42 | 43 | export function filterElementsByType(objectList, type) { 44 | const list = objectList || []; 45 | 46 | return list.filter(element => is(element, type)); 47 | } 48 | 49 | export function findRootElementsByType(businessObject, referencedType) { 50 | const root = getRoot(businessObject); 51 | 52 | return filterElementsByType(root.get('rootElements'), referencedType); 53 | } 54 | 55 | export function findRootElementById(businessObject, type, id) { 56 | const elements = findRootElementsByType(businessObject, type); 57 | 58 | return elements.find(element => element.id === id); 59 | } 60 | -------------------------------------------------------------------------------- /test/.eslintrc: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": [ 4 | "plugin:bpmn-io/mocha" 5 | ], 6 | "globals": { 7 | "sinon": true 8 | } 9 | } -------------------------------------------------------------------------------- /test/coverageBundle.js: -------------------------------------------------------------------------------- 1 | const allTests = require.context('.', true, /.spec\.js$/); 2 | 3 | allTests.keys().forEach(allTests); 4 | 5 | const allSources = require.context('../src', true, /.*\.js$/); 6 | 7 | allSources.keys().forEach(allSources); -------------------------------------------------------------------------------- /test/distro/distroSpec.js: -------------------------------------------------------------------------------- 1 | const { 2 | expect 3 | } = require('chai'); 4 | 5 | const fs = require('fs'), 6 | path = require('path'); 7 | 8 | const DIST_DIR = path.join(__dirname, '../../dist'); 9 | 10 | describe('modules', function() { 11 | 12 | it('should expose CJS bundle', function() { 13 | 14 | // given 15 | const { 16 | BpmnPropertiesPanelModule, 17 | BpmnPropertiesProviderModule, 18 | ZeebePropertiesProviderModule, 19 | useService 20 | } = require(DIST_DIR); 21 | 22 | // then 23 | expect(BpmnPropertiesPanelModule).to.exist; 24 | expect(BpmnPropertiesProviderModule).to.exist; 25 | expect(ZeebePropertiesProviderModule).to.exist; 26 | 27 | expect(useService).to.exist; 28 | }); 29 | }); 30 | 31 | 32 | describe('assets', function() { 33 | 34 | 35 | 36 | it('should expose properties panel styles', verifyExists('assets/properties-panel.css')); 37 | 38 | 39 | it('should expose element templates styles', verifyExists('assets/element-templates.css')); 40 | 41 | 42 | }); 43 | 44 | function verifyExists(relativePath) { 45 | return function() { 46 | 47 | // given 48 | const filePath = path.join(DIST_DIR, relativePath); 49 | 50 | // then 51 | expect(fs.existsSync(filePath), `file ${relativePath} does not exist`).to.be.true; 52 | }; 53 | } 54 | -------------------------------------------------------------------------------- /test/spec/mocks/index.js: -------------------------------------------------------------------------------- 1 | class Canvas { 2 | getRootElement() {} 3 | } 4 | 5 | 6 | export class ElementRegistry { 7 | constructor() { 8 | this.elements = []; 9 | } 10 | 11 | setElements(elements) { 12 | this.elements = elements; 13 | } 14 | 15 | get(id) { 16 | return this.elements.find(e => e.id === id); 17 | } 18 | } 19 | 20 | export class EventBus { 21 | constructor() { 22 | this.listeners = {}; 23 | } 24 | 25 | on(event, priority, callback) { 26 | if (!callback) { 27 | callback = priority; 28 | } 29 | 30 | if (!this.listeners[ event ]) { 31 | this.listeners[ event ] = []; 32 | } 33 | 34 | this.listeners[ event ].push(callback); 35 | } 36 | 37 | off() {} 38 | 39 | fire(event, context) { 40 | if (this.listeners[ event ]) { 41 | this.listeners[ event ].forEach(callback => callback(context)); 42 | } 43 | } 44 | } 45 | 46 | export class Injector { 47 | 48 | constructor(options = {}) { 49 | this._options = options; 50 | } 51 | 52 | get(type) { 53 | 54 | if (type === 'elementRegistry') { 55 | return this._options.elementRegistry || new ElementRegistry(); 56 | } 57 | 58 | if (type === 'eventBus') { 59 | return this._options.eventBus || new EventBus(); 60 | } 61 | 62 | if (type === 'canvas') { 63 | return new Canvas(); 64 | } 65 | } 66 | } 67 | 68 | export function getProviders() { 69 | return [{ 70 | getGroups: () => (groups) => groups 71 | }]; 72 | } -------------------------------------------------------------------------------- /test/spec/provider/bpmn/ExecutableProps.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/spec/provider/bpmn/ExecutableProps.participants.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /test/spec/provider/bpmn/IdProps.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /test/spec/provider/bpmn/LinkProps.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /test/spec/provider/camunda-platform/AsynchronousContinuationsProps.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /test/spec/provider/camunda-platform/ExtensionProperty.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /test/spec/provider/camunda-platform/ExternalTaskPriority-Collaboration.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /test/spec/provider/camunda-platform/HistoryCleanupProps-collaboration.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /test/spec/provider/camunda-platform/HistoryCleanupProps-process.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/spec/provider/camunda-platform/InitiatorProps.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /test/spec/provider/camunda-platform/JobExecutionProps-Collaboration.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /test/spec/provider/camunda-platform/ListProps.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | value1 10 | value2 11 | value2 12 | 13 | 14 | value 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /test/spec/provider/camunda-platform/TasklistProps-collaboration.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /test/spec/provider/camunda-platform/TasklistProps-process.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/spec/provider/camunda-platform/UserAssignmentProps.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /test/spec/provider/camunda-platform/VersionTagProps-collaboration.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /test/spec/provider/camunda-platform/VersionTagProps-process.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/CreateHelper.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/ElementTemplates.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/cmd/call-activity-ins-and-outs.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/cmd/call-activity-template-no-properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Call Activity Template no Properties", 3 | "id": "call-activity-template-no-properties", 4 | "appliesTo": [ 5 | "bpmn:CallActivity" 6 | ], 7 | "properties": [] 8 | } -------------------------------------------------------------------------------- /test/spec/provider/element-templates/cmd/call-activity.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/cmd/default-templates.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/cmd/default-templates.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "FooBarTask", 4 | "id": "com.foo.bar", 5 | "appliesTo": [ 6 | "bpmn:Task" 7 | ], 8 | "properties": [ 9 | { 10 | "label": "Label", 11 | "type": "Text", 12 | "value": "FOO BAR", 13 | "binding": { 14 | "type": "property", 15 | "name": "name" 16 | } 17 | } 18 | ] 19 | }, 20 | 21 | { 22 | "name": "DefaultFooBarTask", 23 | "id": "com.foo.bar.default", 24 | "appliesTo": [ 25 | "bpmn:Task" 26 | ], 27 | "isDefault": true, 28 | "properties": [ 29 | { 30 | "label": "Label", 31 | "type": "Text", 32 | "value": "DEFAULT FOO BAR", 33 | "binding": { 34 | "type": "property", 35 | "name": "name" 36 | } 37 | } 38 | ] 39 | }, 40 | 41 | { 42 | "name": "FooBarSequenceFlow", 43 | "id": "com.foo.bar.flow", 44 | "appliesTo": [ 45 | "bpmn:SequenceFlow" 46 | ], 47 | "properties": [ 48 | { 49 | "label": "Label", 50 | "type": "Text", 51 | "value": "FOO BAR FLOW", 52 | "binding": { 53 | "type": "property", 54 | "name": "name" 55 | } 56 | } 57 | ] 58 | }, 59 | 60 | { 61 | "name": "DefaultFooBarSequenceFlow", 62 | "id": "com.foo.bar.default.flow", 63 | "appliesTo": [ 64 | "bpmn:SequenceFlow" 65 | ], 66 | "isDefault": true, 67 | "properties": [ 68 | { 69 | "label": "Label", 70 | "type": "Text", 71 | "value": "DEFAULT FOO BAR FLOW", 72 | "binding": { 73 | "type": "property", 74 | "name": "name" 75 | } 76 | } 77 | ] 78 | } 79 | ] 80 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/cmd/error-template-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Error template", 3 | "version": 1, 4 | "id": "error-template", 5 | "appliesTo": [ 6 | "bpmn:ServiceTask" 7 | ], 8 | "properties": [ 9 | { 10 | "value": "expression-value", 11 | "binding": { 12 | "type": "camunda:errorEventDefinition", 13 | "errorRef": "Error_1" 14 | } 15 | } 16 | ], 17 | "scopes": [ 18 | { 19 | "type": "bpmn:Error", 20 | "id": "Error_1", 21 | "properties": [ 22 | { 23 | "value": "error-code", 24 | "binding": { 25 | "type": "property", 26 | "name": "errorCode" 27 | } 28 | }, 29 | { 30 | "value": "error-message", 31 | "binding": { 32 | "type": "property", 33 | "name": "camunda:errorMessage" 34 | } 35 | }, 36 | { 37 | "value": "error-name", 38 | "binding": { 39 | "type": "property", 40 | "name": "name" 41 | } 42 | } 43 | ] 44 | } 45 | ] 46 | } -------------------------------------------------------------------------------- /test/spec/provider/element-templates/cmd/sequence-flow-template-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Sequence Flow Template v1", 3 | "id": "sequence-flow-template", 4 | "version": 1, 5 | "appliesTo": [ 6 | "bpmn:SequenceFlow" 7 | ], 8 | "properties": [ 9 | { 10 | "value": "${foo}", 11 | "binding": { 12 | "type": "property", 13 | "name": "conditionExpression", 14 | "scriptFormat": "fooScript" 15 | } 16 | } 17 | ] 18 | } -------------------------------------------------------------------------------- /test/spec/provider/element-templates/cmd/sequence-flow.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SequenceFlow_1 6 | 7 | 8 | SequenceFlow_1 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/cmd/service-task-class.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/cmd/service-task-connector-template-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Service Task Template - Connector V1", 3 | "id": "service-task-template-connector", 4 | "version": 1, 5 | "appliesTo": [ 6 | "bpmn:ServiceTask" 7 | ], 8 | "properties": [], 9 | "scopes": [ 10 | { 11 | "type": "camunda:Connector", 12 | "properties": [ 13 | { 14 | "value": "foo", 15 | "binding": { 16 | "type": "property", 17 | "name": "connectorId" 18 | } 19 | }, 20 | { 21 | "value": "input-1-value", 22 | "binding": { 23 | "type": "camunda:inputParameter", 24 | "name": "input-1-name" 25 | } 26 | }, 27 | { 28 | "value": "output-1-value", 29 | "binding": { 30 | "type": "camunda:outputParameter", 31 | "source": "output-1-source" 32 | } 33 | } 34 | ] 35 | } 36 | ] 37 | } -------------------------------------------------------------------------------- /test/spec/provider/element-templates/cmd/service-task-connector.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | input-1-value 9 | output-1-value 10 | 11 | foo 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/cmd/service-task-error.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/cmd/service-task-field.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | foo 8 | 9 | 10 | ${bar} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/cmd/service-task-template-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Service Task Template v1", 3 | "id": "service-task-template", 4 | "version": 1, 5 | "appliesTo": [ 6 | "bpmn:ServiceTask" 7 | ], 8 | "properties": [ 9 | { 10 | "value": "${foo}", 11 | "binding": { 12 | "type": "property", 13 | "name": "camunda:expression" 14 | } 15 | }, 16 | { 17 | "value": "foo", 18 | "binding": { 19 | "type": "camunda:field", 20 | "name": "foo" 21 | } 22 | }, 23 | { 24 | "value": "${bar}", 25 | "binding": { 26 | "type": "camunda:field", 27 | "name": "bar", 28 | "expression": true 29 | } 30 | } 31 | ], 32 | "scopes": { 33 | "camunda:Connector": { 34 | "properties": [ 35 | { 36 | "value": "foo", 37 | "binding": { 38 | "type": "property", 39 | "name": "connectorId" 40 | } 41 | }, 42 | { 43 | "value": "input-1-value", 44 | "binding": { 45 | "type": "camunda:inputParameter", 46 | "name": "input-1-name" 47 | } 48 | }, 49 | { 50 | "value": "output-1-value", 51 | "binding": { 52 | "type": "camunda:outputParameter", 53 | "source": "output-1-source" 54 | } 55 | } 56 | ] 57 | } 58 | } 59 | } -------------------------------------------------------------------------------- /test/spec/provider/element-templates/cmd/service-task-template-no-properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Service Task Template No Properties", 3 | "id": "service-task-template-no-properties", 4 | "appliesTo": [ 5 | "bpmn:ServiceTask" 6 | ], 7 | "properties": [] 8 | } -------------------------------------------------------------------------------- /test/spec/provider/element-templates/cmd/service-task.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/cmd/task-execution-listener.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/cmd/task-input-output.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | input-1-value 8 | output-1-source 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/cmd/task-property.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/cmd/task-template-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Task Template v1", 3 | "version": 1, 4 | "id": "task-template", 5 | "appliesTo": [ 6 | "bpmn:Task" 7 | ], 8 | "properties": [ 9 | { 10 | "value": true, 11 | "binding": { 12 | "type": "property", 13 | "name": "camunda:asyncBefore" 14 | } 15 | }, 16 | { 17 | "value": "bar", 18 | "binding": { 19 | "type": "camunda:executionListener", 20 | "event": "start", 21 | "scriptFormat": "foo" 22 | } 23 | }, 24 | { 25 | "value": "input-1-value", 26 | "binding": { 27 | "type": "camunda:inputParameter", 28 | "name": "input-1-name" 29 | } 30 | }, 31 | { 32 | "value": "output-1-value", 33 | "binding": { 34 | "type": "camunda:outputParameter", 35 | "source": "output-1-source" 36 | } 37 | }, 38 | { 39 | "value": "${input-2-value}", 40 | "binding": { 41 | "type": "camunda:inputParameter", 42 | "name": "input-2-name", 43 | "scriptFormat": "foo" 44 | } 45 | }, 46 | { 47 | "value": "output-2-value", 48 | "binding": { 49 | "type": "camunda:outputParameter", 50 | "source": "${output-2-source}", 51 | "scriptFormat": "foo" 52 | } 53 | }, 54 | { 55 | "value": "bar", 56 | "binding": { 57 | "type": "camunda:property", 58 | "name": "foo" 59 | } 60 | } 61 | ] 62 | } -------------------------------------------------------------------------------- /test/spec/provider/element-templates/cmd/task-template-2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Task Template v2", 3 | "version": 2, 4 | "id": "task-template", 5 | "appliesTo": [ 6 | "bpmn:Task" 7 | ], 8 | "properties": [ 9 | { 10 | "value": true, 11 | "binding": { 12 | "type": "property", 13 | "name": "camunda:asyncBefore" 14 | } 15 | }, 16 | { 17 | "value": "bar", 18 | "binding": { 19 | "type": "camunda:executionListener", 20 | "event": "start", 21 | "scriptFormat": "foo" 22 | } 23 | }, 24 | { 25 | "value": "input-1-value", 26 | "binding": { 27 | "type": "camunda:inputParameter", 28 | "name": "input-1-name" 29 | } 30 | }, 31 | { 32 | "value": "output-1-value", 33 | "binding": { 34 | "type": "camunda:outputParameter", 35 | "source": "output-1-source" 36 | } 37 | }, 38 | { 39 | "value": "${input-2-value}", 40 | "binding": { 41 | "type": "camunda:inputParameter", 42 | "name": "input-2-name", 43 | "scriptFormat": "foo" 44 | } 45 | }, 46 | { 47 | "value": "output-2-value", 48 | "binding": { 49 | "type": "camunda:outputParameter", 50 | "source": "${output-2-source}", 51 | "scriptFormat": "foo" 52 | } 53 | }, 54 | { 55 | "value": "bar", 56 | "binding": { 57 | "type": "camunda:property", 58 | "name": "foo" 59 | } 60 | } 61 | ] 62 | } -------------------------------------------------------------------------------- /test/spec/provider/element-templates/cmd/task-template-no-properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Task Template No Properties", 3 | "id": "task-template-no-properties", 4 | "appliesTo": [ 5 | "bpmn:Task" 6 | ], 7 | "properties": [] 8 | } -------------------------------------------------------------------------------- /test/spec/provider/element-templates/cmd/task-template.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | bar 8 | 9 | 10 | input-1-value 11 | 12 | ${input-2-value} 13 | 14 | output-1-source 15 | 16 | ${output-2-source} 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/cmd/task.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/dropdown.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Priority Task", 4 | "id": "com.mycompany.whateverdomain.PriorityTask", 5 | "appliesTo": [ 6 | "bpmn:UserTask" 7 | ], 8 | "properties": [ 9 | { 10 | "label": "Priority", 11 | "description": "The priority assigned to this task", 12 | "type": "Dropdown", 13 | "choices": [ 14 | { "name": "low", "value": "50" }, 15 | { "name": "medium", "value": "100" }, 16 | { "name": "high", "value": "150" } 17 | ], 18 | "value": "50", 19 | "binding": { 20 | "type": "property", 21 | "name": "camunda:priority" 22 | } 23 | } 24 | ] 25 | } 26 | ] -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/empty-diagram.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/error-appliesTo-missing.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Invalid", 4 | "id": "foo", 5 | "properties": [] 6 | } 7 | ] -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/error-bindings-invalid.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Invalid", 4 | "id": "foo", 5 | "appliesTo": [ 6 | "bpmn:UserTask" 7 | ], 8 | "properties": [ 9 | { 10 | "label": "Missing Name (1)", 11 | "type": "String", 12 | "binding": { 13 | "type": "property" 14 | } 15 | }, 16 | { 17 | "label": "Missing Name (2)", 18 | "type": "String", 19 | "binding": { 20 | "type": "camunda:property" 21 | } 22 | }, 23 | { 24 | "label": "Missing Name (3)", 25 | "type": "String", 26 | "binding": { 27 | "type": "camunda:inputParameter" 28 | } 29 | }, 30 | { 31 | "label": "Missing Source", 32 | "type": "String", 33 | "binding": { 34 | "type": "camunda:outputParameter" 35 | } 36 | }, 37 | { 38 | "label": "Missing camunda:in target/variables", 39 | "type": "String", 40 | "binding": { 41 | "type": "camunda:in" 42 | } 43 | }, 44 | { 45 | "label": "Missing camunda:out target/variables", 46 | "type": "String", 47 | "binding": { 48 | "type": "camunda:out" 49 | } 50 | }, 51 | { 52 | "label": "Missing camunda:errorEventDefinition errorRef", 53 | "type": "String", 54 | "binding": { 55 | "type": "camunda:errorEventDefinition" 56 | } 57 | } 58 | ] 59 | } 60 | ] -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/error-dropdown-choices-invalid.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Task", 4 | "id": "bar", 5 | "appliesTo": [ 6 | "bpmn:UserTask" 7 | ], 8 | "properties": [ 9 | { 10 | "label": "FOO", 11 | "type": "Dropdown", 12 | "value": "50", 13 | "choices": [ 14 | { "name": "low", "x": "50" }, 15 | { "name": "medium", "value": "100" }, 16 | { "name": "high", "value": "150" } 17 | ], 18 | "binding": { 19 | "type": "property", 20 | "name": "camunda:priority" 21 | } 22 | } 23 | ] 24 | } 25 | ] -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/error-dropdown-choices-missing.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Task", 4 | "id": "bar", 5 | "appliesTo": [ 6 | "bpmn:UserTask" 7 | ], 8 | "properties": [ 9 | { 10 | "label": "FOO", 11 | "type": "Dropdown", 12 | "value": "50", 13 | "binding": { 14 | "type": "property", 15 | "name": "camunda:priority" 16 | } 17 | } 18 | ] 19 | } 20 | ] -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/error-execution-listener-invalid-type.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Execution Listener", 4 | "id": "my.execution.listener.task", 5 | "appliesTo": [ 6 | "bpmn:Task" 7 | 8 | ], 9 | "properties": [ 10 | { 11 | "value": "println end", 12 | "type": "String", 13 | "binding": { 14 | "type": "camunda:executionListener", 15 | "event": "end", 16 | "scriptFormat": "groovy" 17 | } 18 | }, 19 | { 20 | "value": "println end", 21 | "type": "Text", 22 | "binding": { 23 | "type": "camunda:executionListener", 24 | "event": "end", 25 | "scriptFormat": "groovy" 26 | } 27 | }, 28 | { 29 | "value": "println end", 30 | "type": "Boolean", 31 | "binding": { 32 | "type": "camunda:executionListener", 33 | "event": "end", 34 | "scriptFormat": "groovy" 35 | } 36 | }, 37 | { 38 | "value": "println end", 39 | "type": "Dropdown", 40 | "binding": { 41 | "type": "camunda:executionListener", 42 | "event": "end", 43 | "scriptFormat": "groovy" 44 | } 45 | } 46 | ] 47 | } 48 | ] -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/error-id-duplicate.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "FOO 1", 4 | "id": "foo", 5 | "appliesTo": [ 6 | "bpmn:UserTask" 7 | ], 8 | "properties": [] 9 | }, 10 | { 11 | "name": "Foo 2", 12 | "id": "foo", 13 | "appliesTo": [ 14 | "bpmn:UserTask" 15 | ], 16 | "properties": [] 17 | } 18 | ] -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/error-id-missing.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Invalid", 4 | "appliesTo": [ 5 | "bpmn:UserTask" 6 | ], 7 | "properties": [] 8 | } 9 | ] -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/error-id-version-duplicate.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "FOO 1", 4 | "id": "foo", 5 | "version": 1, 6 | "appliesTo": [ 7 | "bpmn:UserTask" 8 | ], 9 | "properties": [] 10 | }, 11 | { 12 | "name": "Foo 2", 13 | "id": "foo", 14 | "version": 1, 15 | "appliesTo": [ 16 | "bpmn:UserTask" 17 | ], 18 | "properties": [] 19 | } 20 | ] -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/error-name-missing.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "invalid", 4 | "appliesTo": [ 5 | "bpmn:UserTask" 6 | ], 7 | "properties": [] 8 | } 9 | ] -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/error-properties-missing.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Invalid", 4 | "id": "foo", 5 | "appliesTo": [ 6 | "bpmn:UserTask" 7 | ] 8 | } 9 | ] -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/error-property-invalid.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Invalid", 4 | "id": "foo", 5 | "appliesTo": [ 6 | "bpmn:UserTask" 7 | ], 8 | "properties": [ 9 | { 10 | "label": "Label", 11 | "type": "InvalidType", 12 | "value": "YEY YEA!", 13 | "binding": { 14 | "type": "alsoInvalid", 15 | "name": "label" 16 | } 17 | } 18 | ] 19 | } 20 | ] -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/error-scopes-properties-missing.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Invalid", 4 | "id": "foo", 5 | "appliesTo": [ 6 | "bpmn:UserTask" 7 | ], 8 | "properties": [], 9 | "scopes": [ 10 | { 11 | "type": "camunda:Connector" 12 | } 13 | ] 14 | } 15 | ] -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/error-scopes-property-invalid.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Invalid", 4 | "id": "foo", 5 | "appliesTo": [ 6 | "bpmn:UserTask" 7 | ], 8 | "properties": [], 9 | "scopes": [ 10 | { 11 | "type": "camunda:Connector", 12 | "properties": [ 13 | { 14 | "label": "Label", 15 | "type": "InvalidType", 16 | "value": "YEY YEA!", 17 | "binding": { 18 | "type": "alsoInvalid", 19 | "name": "label" 20 | } 21 | } 22 | ] 23 | } 24 | ] 25 | } 26 | ] -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/error-scopes-type-missing.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Invalid", 4 | "id": "foo", 5 | "appliesTo": [ 6 | "bpmn:UserTask" 7 | ], 8 | "properties": [], 9 | "scopes": [ 10 | { 11 | "properties": [] 12 | } 13 | ] 14 | } 15 | ] -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/error-templates.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Error template", 4 | "version": 1, 5 | "id": "error-template", 6 | "appliesTo": [ 7 | "bpmn:ServiceTask" 8 | ], 9 | "properties": [ 10 | { 11 | "value": "expression-value", 12 | "binding": { 13 | "type": "camunda:errorEventDefinition", 14 | "errorRef": "Error_1" 15 | } 16 | } 17 | ], 18 | "scopes": [ 19 | { 20 | "type": "bpmn:Error", 21 | "id": "Error_1", 22 | "properties": [ 23 | { 24 | "value": "error-code", 25 | "binding": { 26 | "type": "property", 27 | "name": "errorCode" 28 | } 29 | }, 30 | { 31 | "value": "error-message", 32 | "binding": { 33 | "type": "property", 34 | "name": "camunda:errorMessage" 35 | } 36 | }, 37 | { 38 | "value": "error-name", 39 | "binding": { 40 | "type": "property", 41 | "name": "name" 42 | } 43 | } 44 | ] 45 | } 46 | ] 47 | } 48 | ] -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/execution-listener.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Execution Listener", 4 | "id": "my.execution.listener.task", 5 | "appliesTo": [ 6 | "bpmn:Task" 7 | 8 | ], 9 | "properties": [ 10 | { 11 | "value": "println execution.eventName", 12 | "type": "Hidden", 13 | "binding": { 14 | "type": "camunda:executionListener", 15 | "event": "start", 16 | "scriptFormat": "groovy" 17 | } 18 | } 19 | ] 20 | } 21 | ] -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/falsy-version.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "foo", 4 | "name":"Foo 1", 5 | "version": 0, 6 | "appliesTo": [ "bpmn:Task" ], 7 | "properties": [] 8 | } 9 | ] -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/field-injections.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Valid", 4 | "id": "foo", 5 | "appliesTo": [ 6 | "bpmn:ServiceTask" 7 | ], 8 | "properties": [ 9 | { 10 | "label": "Sender", 11 | "type": "String", 12 | "value": "My Field Injection Value", 13 | "binding": { 14 | "type": "camunda:field", 15 | "name": "sender", 16 | "expression": false 17 | } 18 | } 19 | ] 20 | } 21 | ] 22 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/mail-connector-templates.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "mailtask", 4 | "id": "my.mail.Task", 5 | "appliesTo": [ 6 | "bpmn:ServiceTask" 7 | ], 8 | "connector": "com.my.connector.MailConnector", 9 | "properties": [ 10 | { 11 | "label": "Empfänger", 12 | "type": "String", 13 | "binding": { 14 | "type": "camunda:connectorInputParameter", 15 | "name": "FOO" 16 | } 17 | }, 18 | { 19 | "label": "Template", 20 | "type": "Text", 21 | "description": "Übrigens, hier kannst du freemarke templates ${...} benutzen", 22 | "value": "Hello ${firstName}!", 23 | "binding": { 24 | "type": "camunda:connectorInputParameter", 25 | "name": "messageBody", 26 | "scriptFormat": "freemarker" 27 | } 28 | }, 29 | { 30 | "label": "VOLL KRASS", 31 | "type": "Boolean", 32 | "value": true, 33 | "binding": { 34 | "type": "property", 35 | "name": "camunda:async" 36 | } 37 | } 38 | ] 39 | } 40 | ] -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/missing-types.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Missing type", 4 | "id": "com.mycompany.whateverdomain.MissingType", 5 | "appliesTo": [ 6 | "bpmn:ServiceTask" 7 | ], 8 | "properties": [ 9 | { 10 | "label": "foo", 11 | "value": "45", 12 | "binding": { 13 | "type": "camunda:inputParameter", 14 | "name": "foo" 15 | } 16 | }, 17 | { 18 | "label": "bar", 19 | "visible": false, 20 | "editable": true, 21 | "value": "shoeResult", 22 | "binding": { 23 | "type": "camunda:outputParameter", 24 | "source": "${bar}" 25 | } 26 | } 27 | ] 28 | } 29 | ] -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/replace-behavior.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/replace-behavior.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "replace_1", 4 | "id": "replace_1", 5 | "appliesTo": [ 6 | "bpmn:Task", 7 | "bpmn:CallActivity" 8 | ], 9 | "properties": [] 10 | } 11 | ] -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/scopes-array.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Connector - Array", 4 | "id": "foo", 5 | "appliesTo": [ 6 | "bpmn:UserTask" 7 | ], 8 | "properties": [], 9 | "scopes": [ 10 | { 11 | "type": "camunda:Connector", 12 | "properties": [ 13 | { 14 | "label": "ConnectorId", 15 | "type": "String", 16 | "value": "My Connector HTTP - GET", 17 | "binding": { 18 | "type": "property", 19 | "name": "connectorId" 20 | } 21 | } 22 | ] 23 | } 24 | ] 25 | } 26 | ] -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/scopes-single-connector.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Connector", 4 | "id": "foo", 5 | "appliesTo": [ 6 | "bpmn:UserTask" 7 | ], 8 | "properties": [], 9 | "scopes": { 10 | "camunda:Connector": { 11 | "properties": [ 12 | { 13 | "label": "ConnectorId", 14 | "type": "String", 15 | "value": "HTTP Connector", 16 | "binding": { 17 | "type": "property", 18 | "name": "connectorId" 19 | } 20 | } 21 | ] 22 | } 23 | } 24 | } 25 | ] -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/simple-high-schema-version.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "$schema": "https://unpkg.com/@camunda/element-templates-json-schema@99.99.99/resources/schema.json", 4 | "id": "foo", 5 | "name":"Foo", 6 | "appliesTo": [ "bpmn:Task" ], 7 | "properties": [] 8 | }, 9 | { 10 | "$schema": "https://unpkg.com/@camunda/element-templates-json-schema@99.99.99/resources/schema.json", 11 | "id": "foo", 12 | "name":"Foo 1", 13 | "version": 1, 14 | "isDefault": true, 15 | "appliesTo": [ "bpmn:Task" ], 16 | "properties": [] 17 | }, 18 | { 19 | "$schema": "https://unpkg.com/@camunda/element-templates-json-schema@99.99.99/resources/schema.json", 20 | "id": "foo", 21 | "name":"Foo 2", 22 | "version": 2, 23 | "appliesTo": [ "bpmn:Task" ], 24 | "properties": [] 25 | }, 26 | { 27 | "$schema": "https://unpkg.com/@camunda/element-templates-json-schema@99.99.99/resources/schema.json", 28 | "id": "bar", 29 | "name":"Bar 1", 30 | "version": 1, 31 | "appliesTo": [ "bpmn:Task" ], 32 | "properties": [] 33 | }, 34 | { 35 | "$schema": "https://unpkg.com/@camunda/element-templates-json-schema@99.99.99/resources/schema.json", 36 | "id": "bar", 37 | "name":"Bar 2", 38 | "version": 2, 39 | "appliesTo": [ "bpmn:Task" ], 40 | "properties": [] 41 | }, 42 | { 43 | "$schema": "https://unpkg.com/@camunda/element-templates-json-schema@99.99.99/resources/schema.json", 44 | "id": "baz", 45 | "name":"Baz", 46 | "appliesTo": [ "bpmn:Task" ], 47 | "properties": [] 48 | } 49 | ] 50 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/simple-latest-schema-version.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "$schema": "https://unpkg.com/@camunda/element-templates-json-schema/resources/schema.json", 4 | "id": "foo", 5 | "name":"Foo", 6 | "appliesTo": [ "bpmn:Task" ], 7 | "properties": [] 8 | }, 9 | { 10 | "$schema": "https://unpkg.com/@camunda/element-templates-json-schema/resources/schema.json", 11 | "id": "foo", 12 | "name":"Foo 1", 13 | "version": 1, 14 | "isDefault": true, 15 | "appliesTo": [ "bpmn:Task" ], 16 | "properties": [] 17 | }, 18 | { 19 | "$schema": "https://unpkg.com/@camunda/element-templates-json-schema/resources/schema.json", 20 | "id": "foo", 21 | "name":"Foo 2", 22 | "version": 2, 23 | "appliesTo": [ "bpmn:Task" ], 24 | "properties": [] 25 | }, 26 | { 27 | "$schema": "https://unpkg.com/@camunda/element-templates-json-schema/resources/schema.json", 28 | "id": "bar", 29 | "name":"Bar 1", 30 | "version": 1, 31 | "appliesTo": [ "bpmn:Task" ], 32 | "properties": [] 33 | }, 34 | { 35 | "$schema": "https://unpkg.com/@camunda/element-templates-json-schema/resources/schema.json", 36 | "id": "bar", 37 | "name":"Bar 2", 38 | "version": 2, 39 | "appliesTo": [ "bpmn:Task" ], 40 | "properties": [] 41 | }, 42 | { 43 | "$schema": "https://unpkg.com/@camunda/element-templates-json-schema/resources/schema.json", 44 | "id": "baz", 45 | "name":"Baz", 46 | "appliesTo": [ "bpmn:Task" ], 47 | "properties": [] 48 | } 49 | ] 50 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/simple-low-schema-version.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "$schema": "https://unpkg.com/@camunda/element-templates-json-schema@0.0.1/resources/schema.json", 4 | "id": "foo", 5 | "name":"Foo", 6 | "appliesTo": [ "bpmn:Task" ], 7 | "properties": [] 8 | }, 9 | { 10 | "$schema": "https://unpkg.com/@camunda/element-templates-json-schema@0.0.1/resources/schema.json", 11 | "id": "foo", 12 | "name":"Foo 1", 13 | "version": 1, 14 | "isDefault": true, 15 | "appliesTo": [ "bpmn:Task" ], 16 | "properties": [] 17 | }, 18 | { 19 | "$schema": "https://unpkg.com/@camunda/element-templates-json-schema@0.0.1/resources/schema.json", 20 | "id": "foo", 21 | "name":"Foo 2", 22 | "version": 2, 23 | "appliesTo": [ "bpmn:Task" ], 24 | "properties": [] 25 | }, 26 | { 27 | "$schema": "https://unpkg.com/@camunda/element-templates-json-schema@0.0.1/resources/schema.json", 28 | "id": "bar", 29 | "name":"Bar 1", 30 | "version": 1, 31 | "appliesTo": [ "bpmn:Task" ], 32 | "properties": [] 33 | }, 34 | { 35 | "$schema": "https://unpkg.com/@camunda/element-templates-json-schema@0.0.1/resources/schema.json", 36 | "id": "bar", 37 | "name":"Bar 2", 38 | "version": 2, 39 | "appliesTo": [ "bpmn:Task" ], 40 | "properties": [] 41 | }, 42 | { 43 | "$schema": "https://unpkg.com/@camunda/element-templates-json-schema@0.0.1/resources/schema.json", 44 | "id": "baz", 45 | "name":"Baz", 46 | "appliesTo": [ "bpmn:Task" ], 47 | "properties": [] 48 | } 49 | ] 50 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/simple-mixed-schema-version.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "$schema": "https://unpkg.com/@camunda/element-templates-json-schema@0.0.1/resources/schema.json", 4 | "id": "foo", 5 | "name":"Foo", 6 | "appliesTo": [ "bpmn:Task" ], 7 | "properties": [] 8 | }, 9 | { 10 | "$schema": "https://unpkg.com/@camunda/element-templates-json-schema@0.0.1/resources/schema.json", 11 | "id": "foo", 12 | "name":"Foo 1", 13 | "version": 1, 14 | "isDefault": true, 15 | "appliesTo": [ "bpmn:Task" ], 16 | "properties": [] 17 | }, 18 | { 19 | "$schema": "https://unpkg.com/@camunda/element-templates-json-schema@0.0.1/resources/schema.json", 20 | "id": "foo", 21 | "name":"Foo 2", 22 | "version": 2, 23 | "appliesTo": [ "bpmn:Task" ], 24 | "properties": [] 25 | }, 26 | { 27 | "$schema": "https://unpkg.com/@camunda/element-templates-json-schema@99.99.99/resources/schema.json", 28 | "id": "bar", 29 | "name":"Bar 1", 30 | "version": 1, 31 | "appliesTo": [ "bpmn:Task" ], 32 | "properties": [] 33 | }, 34 | { 35 | "$schema": "https://unpkg.com/@camunda/element-templates-json-schema@99.99.99/resources/schema.json", 36 | "id": "bar", 37 | "name":"Bar 2", 38 | "version": 2, 39 | "appliesTo": [ "bpmn:Task" ], 40 | "properties": [] 41 | }, 42 | { 43 | "$schema": "https://unpkg.com/@camunda/element-templates-json-schema@99.99.99/resources/schema.json", 44 | "id": "baz", 45 | "name":"Baz", 46 | "appliesTo": [ "bpmn:Task" ], 47 | "properties": [] 48 | } 49 | ] 50 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/simple-same-schema-version.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "$schema": "", 4 | "id": "foo", 5 | "name":"Foo", 6 | "appliesTo": [ "bpmn:Task" ], 7 | "properties": [] 8 | }, 9 | { 10 | "$schema": "", 11 | "id": "foo", 12 | "name":"Foo 1", 13 | "version": 1, 14 | "isDefault": true, 15 | "appliesTo": [ "bpmn:Task" ], 16 | "properties": [] 17 | }, 18 | { 19 | "$schema": "", 20 | "id": "foo", 21 | "name":"Foo 2", 22 | "version": 2, 23 | "appliesTo": [ "bpmn:Task" ], 24 | "properties": [] 25 | }, 26 | { 27 | "$schema": "", 28 | "id": "bar", 29 | "name":"Bar 1", 30 | "version": 1, 31 | "appliesTo": [ "bpmn:Task" ], 32 | "properties": [] 33 | }, 34 | { 35 | "$schema": "", 36 | "id": "bar", 37 | "name":"Bar 2", 38 | "version": 2, 39 | "appliesTo": [ "bpmn:Task" ], 40 | "properties": [] 41 | }, 42 | { 43 | "$schema": "", 44 | "id": "baz", 45 | "name":"Baz", 46 | "appliesTo": [ "bpmn:Task" ], 47 | "properties": [] 48 | } 49 | ] 50 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/simple.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "foo", 4 | "name":"Foo", 5 | "appliesTo": [ "bpmn:Task" ], 6 | "properties": [] 7 | }, 8 | { 9 | "id": "foo", 10 | "name":"Foo 1", 11 | "version": 1, 12 | "appliesTo": [ "bpmn:Task" ], 13 | "properties": [] 14 | }, 15 | { 16 | "id": "foo", 17 | "name":"Foo 2", 18 | "version": 2, 19 | "appliesTo": [ "bpmn:Task" ], 20 | "properties": [] 21 | }, 22 | { 23 | "id": "foo", 24 | "name":"Foo 3", 25 | "version": 3, 26 | "appliesTo": [ "bpmn:Task" ], 27 | "properties": [] 28 | }, 29 | { 30 | "id": "bar", 31 | "name":"Bar 1", 32 | "version": 1, 33 | "appliesTo": [ "bpmn:Task" ], 34 | "properties": [] 35 | }, 36 | { 37 | "id": "bar", 38 | "name":"Bar 2", 39 | "version": 2, 40 | "appliesTo": [ "bpmn:Task" ], 41 | "properties": [] 42 | }, 43 | { 44 | "id": "baz", 45 | "name":"Baz", 46 | "appliesTo": [ "bpmn:Task" ], 47 | "properties": [] 48 | }, 49 | { 50 | "id": "default", 51 | "name": "Default Template", 52 | "version": 1, 53 | "isDefault": true, 54 | "appliesTo": [ "bpmn:ServiceTask" ], 55 | "properties": [] 56 | } 57 | ] -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/template-util.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | myExpression == true 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/fixtures/template-util.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "foo", 4 | "name":"Foo", 5 | "appliesTo": [ "bpmn:Task" ], 6 | "properties": [] 7 | }, 8 | { 9 | "id": "foo", 10 | "name":"Foo 1", 11 | "version": 1, 12 | "appliesTo": [ "bpmn:Task" ], 13 | "properties": [] 14 | }, 15 | { 16 | "id": "foo", 17 | "name":"Foo 2", 18 | "version": 2, 19 | "appliesTo": [ "bpmn:Task" ], 20 | "properties": [] 21 | }, 22 | { 23 | "id": "bar", 24 | "name":"Bar 1", 25 | "version": 1, 26 | "appliesTo": [ "bpmn:Task" ], 27 | "properties": [] 28 | }, 29 | { 30 | "id": "bar", 31 | "name":"Bar 2", 32 | "version": 2, 33 | "appliesTo": [ "bpmn:Task" ], 34 | "properties": [] 35 | }, 36 | { 37 | "id": "baz", 38 | "name":"Baz", 39 | "appliesTo": [ "bpmn:Task" ], 40 | "properties": [] 41 | } 42 | ] -------------------------------------------------------------------------------- /test/spec/provider/element-templates/properties/CustomProperties.description.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "$schema": "https://unpkg.com/@camunda/element-templates-json-schema@0.4.0/resources/schema.json", 4 | "name": "Description Task", 5 | "id": "com.camunda.example.description", 6 | "description": "Shows description for each type of property", 7 | "appliesTo": [ 8 | "bpmn:Task" 9 | ], 10 | "properties": [ 11 | { 12 | "label": "string", 13 | "description": "STRING_DESCRIPTION", 14 | "type": "String", 15 | "binding": { 16 | "type": "property", 17 | "name": "string" 18 | } 19 | }, 20 | { 21 | "label": "text", 22 | "description": "TEXT_DESCRIPTION", 23 | "type": "Text", 24 | "binding": { 25 | "type": "property", 26 | "name": "text" 27 | } 28 | }, 29 | { 30 | "label": "boolean", 31 | "description": "BOOLEAN_DESCRIPTION", 32 | "type": "Boolean", 33 | "binding": { 34 | "type": "property", 35 | "name": "boolean" 36 | } 37 | }, 38 | { 39 | "label": "dropdown", 40 | "description": "DROPDOWN_DESCRIPTION", 41 | "type": "Dropdown", 42 | "choices": [ 43 | { 44 | "value": "GET", 45 | "name": "GET" 46 | }, 47 | { 48 | "value": "POST", 49 | "name": "POST" 50 | }, 51 | { 52 | "value": "PUT", 53 | "name": "PUT" 54 | }, 55 | { 56 | "value": "PATCH", 57 | "name": "PATCH" 58 | }, 59 | { 60 | "value": "DELETE", 61 | "name": "DELETE" 62 | } 63 | ], 64 | "binding": { 65 | "type": "camunda:inputParameter", 66 | "name": "dropdown" 67 | } 68 | } 69 | ] 70 | } 71 | ] 72 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/properties/CustomProperties.dropdown.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/properties/CustomProperties.missing-types.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | ${output} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /test/spec/provider/element-templates/properties/CustomProperties.missing-types.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Default Types", 4 | "id": "com.mycompany.whateverdomain.DefaultTypes", 5 | "appliesTo": [ 6 | "bpmn:ServiceTask" 7 | ], 8 | "properties": [ 9 | { 10 | "label": "inputParameter", 11 | "binding": { 12 | "type": "camunda:inputParameter", 13 | "name": "input" 14 | } 15 | }, 16 | { 17 | "label": "outputParameter", 18 | "binding": { 19 | "type": "camunda:outputParameter", 20 | "source": "${output}" 21 | } 22 | }, 23 | { 24 | "label": "property", 25 | "binding": { 26 | "type": "property", 27 | "name": "property" 28 | } 29 | }, 30 | { 31 | "label": "camundaProperty", 32 | "binding": { 33 | "type": "camunda:property", 34 | "name": "camundaProperty" 35 | } 36 | }, 37 | { 38 | "label": "camundaIn", 39 | "binding": { 40 | "type": "camunda:in", 41 | "target": "input" 42 | } 43 | }, 44 | { 45 | "label": "camundaInBusinessKey", 46 | "binding": { 47 | "type": "camunda:in:businessKey" 48 | } 49 | }, 50 | { 51 | "label": "camundaOut", 52 | "binding": { 53 | "type": "camunda:out", 54 | "source": "output" 55 | } 56 | }, 57 | { 58 | "label": "camundaField", 59 | "binding": { 60 | "type": "camunda:field", 61 | "name": "field", 62 | "expression": false 63 | } 64 | }, 65 | { 66 | "label": "executionListener", 67 | "binding": { 68 | "type": "camunda:executionListener", 69 | "event": "end", 70 | "scriptFormat": "groovy" 71 | } 72 | } 73 | ] 74 | } 75 | ] -------------------------------------------------------------------------------- /test/spec/provider/element-templates/util/handleLegacyScopes.spec.js: -------------------------------------------------------------------------------- 1 | import { isArray } from 'min-dash'; 2 | 3 | import handleLegacyScopes from 'src/provider/element-templates/util/handleLegacyScopes'; 4 | 5 | 6 | describe('provider/element-template - handleLegacyScopes', function() { 7 | 8 | it('should transform legacy scopes descriptor', function() { 9 | 10 | // given 11 | const templates = require('../fixtures/scopes-single-connector'); 12 | 13 | const scopesDescriptor = templates[ 0 ].scopes; 14 | 15 | // when 16 | const scopes = handleLegacyScopes(scopesDescriptor); 17 | 18 | // then 19 | expect(isArray(scopes)).to.be.true; 20 | 21 | expect(scopes).to.have.length(1); 22 | 23 | expect(scopes[ 0 ].type).to.eql('camunda:Connector'); 24 | 25 | expect(scopes[ 0 ].properties).to.eql(scopesDescriptor[ 'camunda:Connector' ].properties); 26 | }); 27 | 28 | 29 | it('should keep scopes untouched', function() { 30 | 31 | // given 32 | const templates = require('../fixtures/scopes-array'); 33 | 34 | const scopesDescriptor = templates[ 0 ].scopes; 35 | 36 | // when 37 | const scopes = handleLegacyScopes(scopesDescriptor); 38 | 39 | // then 40 | expect(isArray(scopes)).to.be.true; 41 | 42 | expect(scopes).to.eql(scopesDescriptor); 43 | }); 44 | 45 | }); -------------------------------------------------------------------------------- /test/spec/provider/element-templates/util/validate.spec.js: -------------------------------------------------------------------------------- 1 | import validate from 'src/provider/element-templates/util/validate'; 2 | 3 | 4 | describe('provider/element-template - validate', function() { 5 | 6 | it('should return validation errors only', function() { 7 | 8 | // given 9 | const templateDescriptors = require('../fixtures/error-bindings-invalid'); 10 | 11 | // when 12 | const errors = validate(templateDescriptors); 13 | 14 | // then 15 | expect(errors).to.have.length(7); 16 | 17 | expect(errors[ 0 ] instanceof Error).to.be.true; 18 | }); 19 | 20 | }); -------------------------------------------------------------------------------- /test/spec/provider/zeebe/CalledDecisionProps.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /test/spec/provider/zeebe/Forms.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /test/spec/provider/zeebe/Header.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /test/spec/provider/zeebe/InputOutputParameter.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /test/test.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600&display=swap'); 2 | 3 | html, body, .modeler-container, .modeler-container > div { 4 | height: 100%; 5 | margin: 0; 6 | font-family: 'IBM Plex Sans', sans-serif; 7 | } 8 | 9 | .test-container { 10 | height: 800px !important; 11 | } 12 | 13 | .test-content-container { 14 | width: 100%; 15 | display: flex; 16 | flex: 1; 17 | flex-direction: row; 18 | } 19 | 20 | .modeler-container { 21 | flex: 1; 22 | position: relative; 23 | } 24 | 25 | .modeler-container, .properties-container { 26 | overflow-y: auto; 27 | } 28 | 29 | .properties-container { 30 | position: relative; 31 | flex: none; 32 | height: 100%; 33 | width: 300px; 34 | border-left: solid 1px #cccccc; 35 | } 36 | 37 | .properties-container .bio-properties-panel { 38 | --font-family: 'IBM Plex Sans', sans-serif !important; 39 | } -------------------------------------------------------------------------------- /test/testBundle.js: -------------------------------------------------------------------------------- 1 | const allTests = require.context('.', true, /.spec\.js$/); 2 | 3 | allTests.keys().forEach(allTests); --------------------------------------------------------------------------------