bpmn-moddle 0.12.3 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.travis.yml +2 -5
- package/lib/simple.js +3 -2
- package/package.json +5 -5
- package/resources/bpmn/json/bpmn.json +9 -7
- package/resources/bpmn/json/bpmndi.json +1 -1
- package/resources/bpmn-io/json/bioc.json +41 -0
- package/.npmignore +0 -6
- package/test/expect.js +0 -7
- package/test/fixtures/bpmn/activity-children.bpmn +0 -23
- package/test/fixtures/bpmn/callActivity-calledElement.part.bpmn +0 -7
- package/test/fixtures/bpmn/catch-event-dataOutputAssociations.part.bpmn +0 -5
- package/test/fixtures/bpmn/category.bpmn +0 -28
- package/test/fixtures/bpmn/complex.bpmn +0 -3680
- package/test/fixtures/bpmn/conversation-children.bpmn +0 -23
- package/test/fixtures/bpmn/data-object-reference.bpmn +0 -17
- package/test/fixtures/bpmn/definitions-children.bpmn +0 -13
- package/test/fixtures/bpmn/di/bpmnDiagram-extension.part.bpmn +0 -17
- package/test/fixtures/bpmn/di/bpmnDiagram.part.bpmn +0 -12
- package/test/fixtures/bpmn/di/bpmnEdge-waypoint.part.bpmn +0 -4
- package/test/fixtures/bpmn/di/bpmnEdge.part.bpmn +0 -5
- package/test/fixtures/bpmn/di/bpmnShape.part.bpmn +0 -4
- package/test/fixtures/bpmn/di-extension.bpmn +0 -26
- package/test/fixtures/bpmn/documentation-extension-elements.bpmn +0 -15
- package/test/fixtures/bpmn/documentation.bpmn +0 -11
- package/test/fixtures/bpmn/empty-definitions-default-ns.bpmn +0 -4
- package/test/fixtures/bpmn/empty-definitions.bpmn +0 -5
- package/test/fixtures/bpmn/error/binary.png +0 -0
- package/test/fixtures/bpmn/error/categoryValue.bpmn +0 -27
- package/test/fixtures/bpmn/error/di-no-bpmn-element.bpmn +0 -13
- package/test/fixtures/bpmn/error/duplicate-ids.bpmn +0 -8
- package/test/fixtures/bpmn/error/extension-definition-missing.bpmn +0 -6
- package/test/fixtures/bpmn/error/no-xml.txt +0 -1
- package/test/fixtures/bpmn/error/undeclared-ns-child.bpmn +0 -6
- package/test/fixtures/bpmn/error/unrecognized-child.bpmn +0 -6
- package/test/fixtures/bpmn/escalation-error.bpmn +0 -6
- package/test/fixtures/bpmn/event-references.part.bpmn +0 -6
- package/test/fixtures/bpmn/extension/camunda/inputOutput-list.part.bpmn +0 -9
- package/test/fixtures/bpmn/extension/camunda/inputOutput-map.part.bpmn +0 -12
- package/test/fixtures/bpmn/extension/camunda/inputOutput-mixed.part.bpmn +0 -13
- package/test/fixtures/bpmn/extension/camunda/inputOutput-plain.part.bpmn +0 -3
- package/test/fixtures/bpmn/extension/camunda/inputOutput-script.part.bpmn +0 -9
- package/test/fixtures/bpmn/extension/camunda/inputOutput.bpmn +0 -22
- package/test/fixtures/bpmn/extension/drools.part.bpmn +0 -9
- package/test/fixtures/bpmn/extension-attributes.bpmn +0 -20
- package/test/fixtures/bpmn/extension-elements.bpmn +0 -9
- package/test/fixtures/bpmn/inputOutputSpecification-children.bpmn +0 -19
- package/test/fixtures/bpmn/interface-implementationRef.part.bpmn +0 -2
- package/test/fixtures/bpmn/itemDefinition-structureRef.part.bpmn +0 -2
- package/test/fixtures/bpmn/lane-childLaneSets.part.bpmn +0 -8
- package/test/fixtures/bpmn/lane-children.bpmn +0 -46
- package/test/fixtures/bpmn/multiInstanceLoopCharacteristics-completionCondition.part.bpmn +0 -5
- package/test/fixtures/bpmn/multiInstanceLoopCharacteristics.bpmn +0 -181
- package/test/fixtures/bpmn/operation-implementationRef.part.bpmn +0 -2
- package/test/fixtures/bpmn/operation-messageRef.bpmn +0 -12
- package/test/fixtures/bpmn/participant-interfaceRef.bpmn +0 -20
- package/test/fixtures/bpmn/potentialOwner.bpmn +0 -11
- package/test/fixtures/bpmn/process-children.bpmn +0 -24
- package/test/fixtures/bpmn/scriptTask-script.part.bpmn +0 -4
- package/test/fixtures/bpmn/sequenceFlow-conditionExpression.part.bpmn +0 -5
- package/test/fixtures/bpmn/simple-default-ns.bpmn +0 -31
- package/test/fixtures/bpmn/simple.bpmn +0 -31
- package/test/fixtures/bpmn/sub-process-flow-nodes.part.bpmn +0 -8
- package/test/fixtures/bpmn/sub-process.part.bpmn +0 -10
- package/test/fixtures/bpmn/subprocess-flow-nodes-outgoing.part.bpmn +0 -16
- package/test/fixtures/bpmn/throw-event-dataInputAssociations.part.bpmn +0 -5
- package/test/fixtures/bpmn/timerEventDefinition.part.bpmn +0 -5
- package/test/fixtures/bpmn/vendor/signavio-complex-no-extensions.bpmn +0 -2151
- package/test/fixtures/bpmn/vendor/yaoqiang-event-definitions.bpmn +0 -396
- package/test/fixtures/bpmn/vendor.xsd +0 -14
- package/test/fixtures/bpmn/xsi-type.bpmn +0 -61
- package/test/fixtures/json/model/camunda.json +0 -224
- package/test/fixtures/json/model/drools.json +0 -24
- package/test/fixtures/xsd/BPMN20.xsd +0 -39
- package/test/fixtures/xsd/Vendor.xsd +0 -14
- package/test/helper.js +0 -23
- package/test/integration/camunda/read.js +0 -203
- package/test/integration/camunda/roundtrip.js +0 -48
- package/test/integration/camunda/write.js +0 -249
- package/test/integration/misc.js +0 -107
- package/test/matchers.js +0 -19
- package/test/spec/adapter/cmof/builder.js +0 -194
- package/test/spec/adapter/cmof/generate-simple.js +0 -548
- package/test/spec/bpmn-moddle.js +0 -208
- package/test/spec/xml/edit.js +0 -76
- package/test/spec/xml/read.js +0 -986
- package/test/spec/xml/roundtrip.js +0 -497
- package/test/spec/xml/write.js +0 -927
- package/test/xml-helper.js +0 -39
package/test/xml-helper.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var SchemaValidator = require('xsd-schema-validator');
|
|
4
|
-
|
|
5
|
-
var BPMN_XSD = 'test/fixtures/xsd/BPMN20.xsd';
|
|
6
|
-
|
|
7
|
-
var Helper = require('./helper');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
module.exports.fromFile = function(moddle, file, done) {
|
|
11
|
-
var fileContents = Helper.readFile(file);
|
|
12
|
-
|
|
13
|
-
moddle.fromXML(fileContents, 'bpmn:Definitions', done);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
module.exports.toXML = function(element, opts, done) {
|
|
17
|
-
element.$model.toXML(element, opts, done);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
module.exports.validate = function(err, xml, done) {
|
|
21
|
-
|
|
22
|
-
if (err) {
|
|
23
|
-
return done(err);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (!xml) {
|
|
27
|
-
return done(new Error('XML is not defined'));
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
SchemaValidator.validateXML(xml, BPMN_XSD, function(err, result) {
|
|
31
|
-
|
|
32
|
-
if (err) {
|
|
33
|
-
return done(err);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
expect(result.valid).to.be.true;
|
|
37
|
-
done();
|
|
38
|
-
});
|
|
39
|
-
};
|