Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var createSelectBox = function(id, label, selectOptions) {
return entryFactory.selectBox({
id : id,
description : label,
label : label,
selectOptions: selectOptions,
modelProperty : id,
get: function(element,node) {
return getElementValue(element, node, id);
},
set: function(element,values,node) {
return setElementValue(element,values,node, id);
}
});
};
function createDistributionSelectBox(parentName){
let getDistributionElement = distributionElementAccessor(parentName);
return entryFactory.selectBox({
id : 'distribution',
//description : 'How is the duration distributed?',
label : 'Distribution',
modelProperty : distributionProperty,
selectOptions : distributions,
get : element => {
const distribution = getDistributionElement(element);
backend.print("Element is "+JSON.stringify(element));
backend.print("Element is "+JSON.stringify(getBusinessObject(element)));
backend.print("Distribution is "+JSON.stringify(distribution));
let toReturn = {};
toReturn[distributionProperty] = distribution ? distributionElementToId(distribution) : undefined;
return toReturn;
},
set: (element, value) => {
const moddle = modeler.get('moddle'),
function createTimeUnitSelectBox(parentName) {
return entryFactory.selectBox({
id : 'timeUnit',
//description : 'Which timeUnit?',
label : 'Timeunit',
//modelProperty : 'distribution',
selectOptions : timeUnits(),
get : element => {
const duration = getExtension(getBusinessObject(element), 'scylla:'+parentName);
return {undefined : (duration ? duration.timeUnit : timeUnits()[0].value)};
},
set: (element, value) => {
const moddle = modeler.get('moddle'),
modeling = modeler.get('modeling');
let businessObject = getBusinessObject(element);
const extensionElements = businessObject.extensionElements || moddle.create('bpmn:ExtensionElements');
let duration = getExtension(businessObject, 'scylla:'+parentName);
export default function(group, bpmnFactory, timerEventDefinition, timerOptions) {
const selectOptions = timerOptions;
group.entries.push(entryFactory.selectBox({
id: 'timer-event-definition-type',
label: 'Timer Definition Type',
selectOptions: selectOptions,
emptyParameter: true,
modelProperty: 'timerDefinitionType',
get: function(element, node) {
return {
timerDefinitionType: getTimerDefinitionType(timerEventDefinition) || ''
};
},
set: function(element, values) {
const props = {
timeDuration: undefined,
timeDate: undefined,
}
}
else {
validation.target = 'Mapping must have a Target';
}
}
return validation;
},
disabled: function(element, node) {
return !isSelected(element, node);
}
}));
entries.push(entryFactory.selectBox({
id: 'mapping-type',
label: 'Type',
selectOptions: [
{ name: 'PUT', value: 'PUT' },
{ name: 'COLLECT', value: 'COLLECT' }
],
modelProperty: 'type',
emptyParameter: false,
get: function(element, node) {
return (getSelected(element, node) || {});
},
set: function(element, values, node) {
const param = getSelected(element, node);