Socket
Socket
Sign inDemoInstall

bpmn-moddle

Package Overview
Dependencies
Maintainers
3
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bpmn-moddle - npm Package Compare versions

Comparing version 0.10.0 to 0.10.1

test/fixtures/bpmn/conversation-children.bpmn

2

package.json
{
"name": "bpmn-moddle",
"version": "0.10.0",
"version": "0.10.1",
"description": "A moddle wrapper for BPMN 2.0",

@@ -5,0 +5,0 @@ "scripts": {

@@ -590,12 +590,7 @@ {

{
"name": "inputSet",
"type": "InputSet"
"name": "dataInputs",
"type": "DataInput",
"isMany": true
},
{
"name": "eventDefinitionRefs",
"type": "EventDefinition",
"isMany": true,
"isReference": true
},
{
"name": "dataInputAssociations",

@@ -606,5 +601,4 @@ "type": "DataInputAssociation",

{
"name": "dataInputs",
"type": "DataInput",
"isMany": true
"name": "inputSet",
"type": "InputSet"
},

@@ -615,2 +609,8 @@ {

"isMany": true
},
{
"name": "eventDefinitionRefs",
"type": "EventDefinition",
"isMany": true,
"isReference": true
}

@@ -633,12 +633,7 @@ ]

{
"name": "outputSet",
"type": "OutputSet"
"name": "dataOutputs",
"type": "DataOutput",
"isMany": true
},
{
"name": "eventDefinitionRefs",
"type": "EventDefinition",
"isMany": true,
"isReference": true
},
{
"name": "dataOutputAssociations",

@@ -649,5 +644,4 @@ "type": "DataOutputAssociation",

{
"name": "dataOutputs",
"type": "DataOutput",
"isMany": true
"name": "outputSet",
"type": "OutputSet"
},

@@ -658,2 +652,8 @@ {

"isMany": true
},
{
"name": "eventDefinitionRefs",
"type": "EventDefinition",
"isMany": true,
"isReference": true
}

@@ -938,6 +938,2 @@ ]

{
"name": "transformation",
"type": "FormalExpression"
},
{
"name": "assignment",

@@ -957,2 +953,9 @@ "type": "Assignment",

"isReference": true
},
{
"name": "transformation",
"type": "FormalExpression",
"xml": {
"serialize": "property"
}
}

@@ -1989,20 +1992,19 @@ ]

{
"name": "choreographyRef",
"type": "Choreography",
"isMany": true,
"isReference": true
"name": "participants",
"type": "Participant",
"isMany": true
},
{
"name": "artifacts",
"type": "Artifact",
"name": "messageFlows",
"type": "MessageFlow",
"isMany": true
},
{
"name": "participantAssociations",
"type": "ParticipantAssociation",
"name": "artifacts",
"type": "Artifact",
"isMany": true
},
{
"name": "messageFlowAssociations",
"type": "MessageFlowAssociation",
"name": "conversations",
"type": "ConversationNode",
"isMany": true

@@ -2015,9 +2017,9 @@ },

{
"name": "participants",
"type": "Participant",
"name": "participantAssociations",
"type": "ParticipantAssociation",
"isMany": true
},
{
"name": "messageFlows",
"type": "MessageFlow",
"name": "messageFlowAssociations",
"type": "MessageFlowAssociation",
"isMany": true

@@ -2031,5 +2033,6 @@ },

{
"name": "conversations",
"type": "ConversationNode",
"isMany": true
"name": "choreographyRef",
"type": "Choreography",
"isMany": true,
"isReference": true
},

@@ -2036,0 +2039,0 @@ {

@@ -68,3 +68,7 @@ 'use strict';

builder.alter('Definitions', function(desc) {
builder.reorderProperties(desc, [ 'rootElements', 'diagrams', 'relationships' ]);
builder.reorderProperties(desc, [
'rootElements',
'diagrams',
'relationships'
]);
});

@@ -75,3 +79,8 @@

builder.alter('InputOutputSpecification', function(desc) {
builder.reorderProperties(desc, [ 'dataInputs', 'dataOutputs', 'inputSets', 'outputSets' ]);
builder.reorderProperties(desc, [
'dataInputs',
'dataOutputs',
'inputSets',
'outputSets'
]);
});

@@ -98,3 +107,43 @@

// fix catchEvent children order
builder.alter('CatchEvent', function(desc) {
builder.reorderProperties(desc, [
'dataOutputs',
'dataOutputAssociations',
'outputSet',
'eventDefinitions',
'eventDefinitionRefs',
]);
});
// fix throwEvent children order
builder.alter('ThrowEvent', function(desc) {
builder.reorderProperties(desc, [
'dataInputs',
'dataInputAssociations',
'inputSet',
'eventDefinitions',
'eventDefinitionRefs',
]);
});
// fix Collaboration child element order
builder.alter('Collaboration', function(desc) {
builder.reorderProperties(desc, [
'participants',
'messageFlows',
'artifacts',
'conversations',
'conversationAssociations',
'participantAssociations',
'messageFlowAssociations',
'correlationKeys',
'choreographyRef',
'conversationLinks'
]);
});
// fix PotentialOwner#resourceRef

@@ -119,6 +168,16 @@

builder.alter('DataAssociation', function(desc) {
builder.swapProperties(desc, 'targetRef', 'sourceRef');
builder.reorderProperties(desc, [
'sourceRef',
'targetRef',
'transformation'
]);
});
builder.alter('DataAssociation#transformation', function(desc) {
desc.xml = {
'serialize': 'property'
};
});
// fix Activity order serialization

@@ -319,8 +378,8 @@

pkg.types.push({
"name": "Extension",
"properties": [
'name': 'Extension',
'properties': [
{
"name": "values",
"type": "Element",
"isMany": true
'name': 'values',
'type': 'Element',
'isMany': true
}

@@ -333,4 +392,4 @@ ]

data.properties.unshift({
"name": "extension",
"type": "Extension"
'name': 'extension',
'type': 'Extension'
});

@@ -337,0 +396,0 @@ });

@@ -129,2 +129,26 @@ 'use strict';

it('TimerEventDefinition#expression', function(done) {
// given
var file = 'test/fixtures/bpmn/timerEventDefinition.part.bpmn';
// when
fromFile(file, 'bpmn:TimerEventDefinition', function(err, result) {
// then
expect(result).to.jsonEqual({
$type: 'bpmn:TimerEventDefinition',
id: 'Definition_1',
timeCycle: {
$type: 'bpmn:FormalExpression',
id: 'TimeCycle_1',
body: '1w'
}
});
done(err);
});
});
it('Documentation', function(done) {

@@ -131,0 +155,0 @@

@@ -42,6 +42,6 @@ 'use strict';

it('complex process', function(done) {
it('extension attributes', function(done) {
// given
fromFile('test/fixtures/bpmn/complex-no-extensions.bpmn', function(err, result) {
fromFile('test/fixtures/bpmn/extension-attributes.bpmn', function(err, result) {

@@ -60,6 +60,6 @@ if (err) {

it('extension attributes', function(done) {
it('documentation / extensionElements order', function(done) {
// given
fromFile('test/fixtures/bpmn/extension-attributes.bpmn', function(err, result) {
fromFile('test/fixtures/bpmn/documentation-extension-elements.bpmn', function(err, result) {

@@ -78,6 +78,6 @@ if (err) {

it('documentation / extensionElements order', function(done) {
it('activity children order', function(done) {
// given
fromFile('test/fixtures/bpmn/documentation-extension-elements.bpmn', function(err, result) {
fromFile('test/fixtures/bpmn/activity-children.bpmn', function(err, result) {

@@ -96,6 +96,6 @@ if (err) {

it('activity children order', function(done) {
it('conversation children order', function(done) {
// given
fromFile('test/fixtures/bpmn/activity-children.bpmn', function(err, result) {
fromFile('test/fixtures/bpmn/conversation-children.bpmn', function(err, result) {

@@ -301,2 +301,57 @@ if (err) {

describe('vendor', function() {
describe('signavio', function() {
it('complex process', function(done) {
// given
fromFile('test/fixtures/bpmn/complex-no-extensions.bpmn', function(err, result) {
if (err) {
return done(err);
}
// when
toXML(result, { format: true }, function(err, xml) {
validate(err, xml, done);
});
});
});
});
describe('yaoqiang', function() {
it('event definitions', function(done) {
// given
fromFile('test/fixtures/bpmn/event-definitions-yaoqiang.bpmn', function(err, result, context) {
if (err) {
return done(err);
}
var warningsStr = context.warnings.map(function(w) {
return '\n\t- ' + w.message;
}).join('');
if (warningsStr) {
return done(new Error('import warnings: ' + warningsStr));
}
// when
toXML(result, { format: true }, function(err, xml) {
validate(err, xml, done);
});
});
});
});
});
});

@@ -384,2 +384,42 @@ 'use strict';

it('Collaboration', function(done) {
// given
var participant = moddle.create('bpmn:Participant', {
id: 'Participant_1'
});
var textAnnotation = moddle.create('bpmn:TextAnnotation', {
id: 'TextAnnotation_1'
});
var collaboration = moddle.create('bpmn:Collaboration', {
id: 'Collaboration_1',
participants: [ participant ],
artifacts: [ textAnnotation ]
});
var expectedXML =
'<bpmn:collaboration xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" id="Collaboration_1">' +
'<bpmn:participant id="Participant_1" />' +
'<bpmn:textAnnotation id="TextAnnotation_1" />' +
'</bpmn:collaboration>';
// when
write(collaboration, function(err, result) {
if (err) {
return done(err);
}
// then
expect(result).to.eql(expectedXML);
done();
});
});
it('ExtensionElements', function(done) {

@@ -386,0 +426,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc