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);
--------------------------------------------------------------------------------