Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
payloadMappings = createPayloadMappings(parent, bpmnFactory, {
mapping: []
});
commands.push(cmdHelper.addAndRemoveElementsFromList(
element,
extensionElements,
'values',
'extensionElements',
[payloadMappings],
[]
));
}
const newElem = createMapping(type, payloadMappings, bpmnFactory, { source: 'sourceValue', target: 'targetValue', type: 'PUT' });
commands.push(cmdHelper.addElementsTolist(element, payloadMappings, prop, [newElem]));
return commands;
};
};
inputParameters: [],
outputParameters: []
});
commands.push(cmdHelper.addAndRemoveElementsFromList(
element,
extensionElements,
'values',
'extensionElements',
[ inputOutput ],
[]
));
}
const newElem = createParameter(type, inputOutput, bpmnFactory, { source: 'sourceValue', target: 'targetValue' });
commands.push(cmdHelper.addElementsTolist(element, inputOutput, prop, [ newElem ]));
return commands;
};
};
var setElementValue = function(element,values,node,propertyName) {
var bo = getBusinessObject(element);
var entry = values;
var extensionElements = bo.get('extensionElements');
var updates= [];
if (!extensionElements) {
extensionElements = bpmnFactory.create('bpmn:ExtensionElements');
updates.push(cmdHelper.updateBusinessObject(
element, bo, objectWithKey('extensionElements', extensionElements)
));
}
var camundaProperties = findExtension(extensionElements, 'camunda:Properties');
if (!camundaProperties) {
camundaProperties = bpmnFactory.create('camunda:Properties');
updates.push(cmdHelper.addElementsTolist(
element, extensionElements, 'values', [ camundaProperties ]
));
}
var existingCamundaProperty = findCamundaProperty(camundaProperties,{'name':propertyName});
if (values != null && values[propertyName] != null) {
values = values[propertyName];
}
var camundaProperty = bpmnFactory.create('camunda:Property', {
name: propertyName,
value: values || ''
});
updates.push(cmdHelper.addAndRemoveElementsFromList(
element,
camundaProperties,
'values',
null,