Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function(group, element) {
// Only return an entry, if the currently selected
// element is a start event.
if (is(element, 'bpmn:ChoreographyTask')) {
group.entries.push(entryFactory.textField({
id : 'spell',
description : 'Apply a black magic spell',
label : 'Spell',
modelProperty : 'spell'
}));
}
}
validation = {
type: 'Type must not contain spaces'
};
}
}
else {
validation = {
type: 'ServiceTask must have a type'
};
}
}
return validation;
}
}));
group.entries.push(entryFactory.textField({
id: 'taskDefinitionRetries',
label: translate('Retries'),
modelProperty: 'retries',
get: function(element) {
return {
retries: (getTaskDefinition(element) || {}).retries
};
},
set: function(element, values) {
const bo = getBusinessObject(element);
const commands = [];
// create extensionElements
let extensionElements = bo.get('extensionElements');
return {
outputCollection: getProperty(element, 'outputCollection')
};
},
set: function(element, values) {
return setProperties(element, {
outputCollection: values.outputCollection || undefined
});
},
}));
// output element //////////////////////////////////////////////////////
entries.push(entryFactory.textField({
id: 'multiInstance-outputElement',
label: translate('Output Element'),
modelProperty: 'outputElement',
get: function(element) {
return {
outputElement: getProperty(element, 'outputElement')
};
},
set: function(element, values) {
return setProperties(element, {
outputElement: values.outputElement || undefined
});
export default function(group, element) {
// Only return an entry, if the currently selected
// element is a start event.
if (is(element, 'bpmn:StartEvent')) {
group.entries.push(entryFactory.textField({
id : 'spell',
description : 'Apply a black magic spell',
label : 'Spell',
modelProperty : 'spell'
}));
}
}
function createNumberInput(attribute, prefix, getDistributionElement) {
let attributeName = attribute.name;
let propertyName = prefix+'.'+attributeName;
let textField = entryFactory.textField({
id : propertyName,
label : attributeName,
modelProperty : propertyName,
get : element => {
let distribution = getDistributionElement(element);
let attributeElement = distribution.$children.find(each => each.$type == 'scylla:'+attributeName);
let toReturn = {};
toReturn[propertyName] = attributeElement.$body;
return toReturn;
},
set: (element, value) => {
let distribution = getDistributionElement(element);
let attributeElement = distribution.$children.find(each => each.$type == 'scylla:'+attributeName);
attributeElement.$body = value && value[propertyName];
},
validate: function(element, values) {
let value;
if (oldType) {
const definition = timerEventDefinition.get(oldType);
value = definition.get('body');
}
props[newType] = createFormalExpression(timerEventDefinition, value, bpmnFactory);
}
return cmdHelper.updateBusinessObject(element, timerEventDefinition, props);
}
}));
group.entries.push(entryFactory.textField({
id: 'timer-event-definition',
label: 'Timer Definition',
modelProperty: 'timerDefinition',
get: function(element, node) {
const type = getTimerDefinitionType(timerEventDefinition);
const definition = type && timerEventDefinition.get(type);
const value = definition && definition.get('body');
return {
timerDefinition: value
};
},
set: function(element, values) {
const type = getTimerDefinitionType(timerEventDefinition);
const definition = type && timerEventDefinition.get(type);
export default function(group, element) {
if (is(element, 'bpmn:Task')) {
group.entries.push(entryFactory.textField({
id : 'fluffiness',
description : 'How fluffy is the start event?',
label : 'Fluffiness',
modelProperty : 'fluffiness'
}));
}
}
var createTextField = function(id, label) {
return entryFactory.textField({
id : id,
description : label,
label : label,
modelProperty : id,
get: function(element,node) {
return getElementValue(element, node, id);
},
set: function(element,values,node) {
return setElementValue(element,values,node, id);
}
});
};
var createSelectBox = function(id, label, selectOptions) {
export default function(group, bpmnFactory, timerEventDefinition) {
group.entries.push(entryFactory.textField({
id: 'timer-event-duration',
label: 'Timer Duration',
modelProperty: 'timerDefinition',
get: function(element, node) {
const type = 'timeDuration';
const definition = type && timerEventDefinition.get(type);
const value = definition && definition.get('body');
return {
timerDefinition: value
};
},
set: function(element, values) {
const type = 'timeDuration';
let definition = type && timerEventDefinition.get(type);
const modelProperty = options.modelProperty || 'name';
const extensionElementKey = options.extensionElement || 'zeebe:Subscription';
const shouldValidate = options.shouldValidate || false;
function getElements(bo, type, prop) {
const elems = extensionElementsHelper.getExtensionElements(bo, type) || [];
return !prop ? elems : (elems[0] || {})[prop] || [];
}
function getExtensionElement(element) {
const bo = getBusinessObject(element);
return (getElements(bo, extensionElementKey) || [])[0];
}
const entry = entryFactory.textField({
id: id,
label: label,
modelProperty: modelProperty,
get: function(element, node) {
const reference = definition.get(referenceProperty);
const props = {};
props[modelProperty] = reference && (getExtensionElement(reference) || {})[modelProperty];
return props;
},
set: function(element, values, node) {
const reference = definition.get(referenceProperty);
const bo = getBusinessObject(reference);
reference.businessObject = bo;