Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
describe('implementation type', function() {
var moddle = new BpmnModdle({
camunda: CamundaBpmnModdle
});
describe('service task like', function() {
var serviceTask;
beforeEach(function() {
serviceTask = moddle.create('bpmn:ServiceTask');
});
it('should return no implementation type', function() {
// when
* so they could be extended.
*
*/
window.ProcessMaker.EventBus.$emit('modeler-before-init', {
registerComponentMixin: this.registerComponentMixin,
});
this.registerNode(Process);
/* Initialize the BpmnModdle and its extensions */
window.ProcessMaker.EventBus.$emit('modeler-init', {
registerInspectorExtension,
registerBpmnExtension: this.registerBpmnExtension,
registerNode: this.registerNode,
});
this.moddle = new BpmnModdle(this.extensions);
this.linter = new Linter(linterConfig);
},
mounted() {
function parse(xml, done) {
var moddle = new BpmnModdle();
moddle.fromXML(xml, 'bpmn:Definitions', done);
}
function moddleContext(source, options = {}) {
const moddleOptions = options.extensions && Object.keys(options.extensions).reduce((result, ext) => {
result[ext] = options.extensions[ext].moddleOptions;
return result;
}, {});
const bpmnModdle = new BpmnModdle(moddleOptions);
return new Promise((resolve, reject) => {
bpmnModdle.fromXML(Buffer.isBuffer(source) ? source.toString() : source.trim(), (err, definitions, moddleCtx) => {
if (err) return reject(err);
resolve(moddleCtx);
});
});
}
function runImport(diagram, xml, diagramId, done) {
if (isFunction(diagramId)) {
done = diagramId;
diagramId = null;
}
var moddle = new BpmnModdle();
moddle.fromXML(xml, function(err, definitions) {
var selectedDiagram = find(definitions.diagrams, function(element) {
return element.id === diagramId;
});
importBpmnDiagram(diagram, definitions, selectedDiagram, done);
});
}
function createModdle(xml, done) {
var moddle = new BpmnModdle();
moddle.fromXML(xml, 'bpmn:Definitions', function(err, definitions, context) {
done(err, definitions, context, moddle);
});
}
'bpmn:ExclusiveGateway',
'bpmn:InclusiveGateway'
];
const activities = [
'bpmn:Task',
'bpmn:ScriptTask',
'bpmn:ServiceTask',
'bpmn:UserTask',
'bpmn:SubProcess',
'bpmn:ParallelGateway'
];
const cache = {};
const moddle = new BpmnModdle();
export default {
activities,
gateways,
eventActivities,
valid,
invalid,
userTask,
multipleInbound,
resource,
create,
};
const invalidProcess = `
beforeEach(() => {
const moddle = new BpmnModdle();
handler = handlers[property];
mockElement = getDiagramElementMock({
[property]: [moddle.create('bpmn:Documentation', { text: 'documentation-lorem-ipsum' })]
});
modeling = getModelingMock();
});